diff options
author | Thomas Leonard <tal@ecs.soton.ac.uk> | 2003-03-03 13:06:42 +0000 |
---|---|---|
committer | Thomas Leonard <tal@ecs.soton.ac.uk> | 2003-03-03 13:06:42 +0000 |
commit | 935ce10bc823a3c47190f29e89b09df5023bdd78 (patch) | |
tree | 15e9b09b50a984f1ea3cfa226b856cfd8dd2a2ed /shared-mime-info-spec.xml | |
parent | 13c58d8b1e8a32af5f67353bd48c4a5bf5bf831a (diff) | |
download | shared-mime-info-935ce10bc823a3c47190f29e89b09df5023bdd78.tar.gz |
Added missing magic markers to spec.
Diffstat (limited to 'shared-mime-info-spec.xml')
-rw-r--r-- | shared-mime-info-spec.xml | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/shared-mime-info-spec.xml b/shared-mime-info-spec.xml index 433f11b3..b82587f9 100644 --- a/shared-mime-info-spec.xml +++ b/shared-mime-info-spec.xml @@ -572,21 +572,21 @@ Each section is introduced by giving the priority and type in brackets. Higher priority entries come first. <screen>[50:text/x-diff]</screen> Each line in the section takes the form: -<screen>indent start-offset value [ "&" mask ] [ "~" word-size ] [ "+" range-length ] "\n"</screen> +<screen>[ indent ] ">" start-offset "=" value +[ "&" mask ] [ "~" word-size ] [ "+" range-length ] "\n"</screen> <informaltable> <tgroup cols="3"> <thead><row><entry>Part</entry><entry>Example</entry><entry>Meaning</entry></row></thead> <tbody> - <row><entry>indent</entry><entry>>></entry><entry>The number of > characters at the - start of a line indicates the nesting depth of the rule, as in the traditional file format. - </entry></row> - <row><entry>start-offset</entry><entry><offset></entry><entry>The offset into the - file to look for a match (4 byte big endian).</entry></row> - <row><entry>value</entry><entry><size><value></entry><entry> + <row><entry>indent</entry><entry>0</entry><entry>The nesting + depth of the rule, corresponding to the number of '>' characters in the traditional file format.</entry></row> + <row><entry>">" start-offset</entry><entry>>4</entry><entry>The offset into the + file to look for a match.</entry></row> + <row><entry>"=" value</entry><entry>=\0x0\0x2\0x55\0x40</entry><entry> Two bytes giving the (big-endian) length of the value, followed by the value itself. </entry></row> - <row><entry>"&" mask</entry><entry><mask></entry><entry> + <row><entry>"&" mask</entry><entry>&\0xff\0xf0</entry><entry> The mask, which (if present) is exactly the same length as the value. </entry></row> <row><entry>"~" word-size</entry><entry>~2</entry><entry>On little-endian machines, the @@ -617,11 +617,10 @@ one less than the entry. The test number is an index into the array of tests. The text/x-diff above example would (on its own) create this magic file: <programlisting><![CDATA[ 00000000 4d 49 4d 45 2d 4d 61 67 69 63 00 0a 5b 35 30 3a |MIME-Magic..[50:| -00000010 74 65 78 74 2f 78 2d 64 69 66 66 5d 0a 00 00 00 |text/x-diff]....| -00000020 00 00 05 64 69 66 66 09 0a 00 00 00 00 00 04 2a |...diff........*| -00000030 2a 2a 09 0a 00 00 00 00 00 17 43 6f 6d 6d 6f 6e |**........Common| -00000040 20 73 75 62 64 69 72 65 63 74 6f 72 69 65 73 3a | subdirectories:| -00000050 20 0a | .| +00000010 74 65 78 74 2f 78 2d 64 69 66 66 5d 0a 3e 30 3d |text/x-diff].>0=| +00000020 00 05 64 69 66 66 09 0a 3e 30 3d 00 04 2a 2a 2a |..diff..>0=..***| +00000030 09 0a 3e 30 3d 00 17 43 6f 6d 6d 6f 6e 20 73 75 |..>0=..Common su| +00000040 62 64 69 72 65 63 74 6f 72 69 65 73 3a 20 0a |bdirectories: .| ]]></programlisting> </para> </sect2> |