[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freedesktop-xdg
Subject:    Re: shared-mime-info: match offset attribute with '>' expressions?
From:       David Faure <dfaure () trolltech ! com>
Date:       2006-05-09 11:00:52
Message-ID: 200605091300.52454.dfaure () trolltech ! com
[Download RAW message or body]

On Monday 08 May 2006 13:46, Daniel Leidert wrote:
> Hello,
> 
> A question. The (probably outdated?) shared-mime-info database
> specification states, that the offset attribute can contain a single
> number or a range in the form 'start:end'. But KDE MIME magic e.g. also
> allows an expression '>start'. Wouldn't it be nice to have such an
> expression too?

I think you are confused about the expression ">start". This syntax, coming from
the magic file for the file(1) command, means " and if the data at [start] is ".
It's a continuation line, used to add a new criteria to a previous line, the ">" basically
means "and". Not "starting from". For mimetype-determination-from-contents to be
fast, offsets have to be fixed, not variable. At least this was the case back when file(1)
was implemented, maybe today's computers are fast enough for your request to be
valid; I just wanted to point out a misunderstanding about the file(1) (and kde's) syntax.

-- 
David Faure, faure@kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic