Home » Archimedes archive » Acorn User » AU 1997-08 B.adf » Regulars » starinfo/Hayward/MagicForm

starinfo/Hayward/MagicForm

This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.

Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.

Tape/disk: Home » Archimedes archive » Acorn User » AU 1997-08 B.adf » Regulars
Filename: starinfo/Hayward/MagicForm
Read OK:
File size: 1875 bytes
Load address: 0000
Exec address: 0000
File contents
Format of the Magic files used by !Magic.

To get at the Magic file Shift-double click on !Magic to open its application
directory, and then load the file called 'Magic' in to a text editor.

The format of this file is based on the format of the Unix file
identification tool 'file', the corresponding file on Unix systems is called
/etc/magic. Unix has no built in file type system, so files are identified by
extensions such as .tar.gz and by magic numbers, which are a few bytes of
information normally located at the start of the file. !Magic supports
[almost] a superset of the syntax of that file and can be used to detect a
large number of Risc OS and foreign file formats.

Lines starting with a '#' are comments and are ignored. By convention the
first line should contain '#! file', which is the magic number used to
identify the contents as a magic file. Comments should be entered liberally
throughout the file - they are stripped out when the file is parseed and do
not take up any memory or time except when Magic loads the file for the first
time. The file will only ever be parsed again if it changes, and is not
normally parsed on start-up.

Each basic file type starts with a line like the following:

0	string			Archive\0	ArcFS archive

The 0 at the start of the line gives an offset in to the file at which data
will be looked for. 

The second field (separated by white space) indicates what type of data is to
be looked for. The following types are suported:


byte        A single byte is read from the file.
short       Two bytes are read, in the normal byte order for that machine
            (little endian on Acorns - least significant byte first).
leshort     Identical to short.
beshort     Like short, but the order of the two bytes are reversed.
long        A word (4 bytes) are read from the file in little endian order.
lelong      Identical to long.
belong      Like long, but the four bytes are read in reverse order.
string      A string is read from the file of up to the same length as
            the string against which it is to be compared.
date        Not implemented. Would otherwise load in a 4 byte Unix date.
            This is not used in the NetBSD magic file that I have.

long types can be preceded by a u (eg ulong) in which case they are treated as
unsigned, all other types are treated as unsigned by default.

If the type is immediately followed by an &, then this introduces a mask with
which the file contents will be ANDed before comparisson, eg byte&42.
Expression following the & can start with 0, in which case they are treated
as octal values, 0x, in which case they are treated as hex, and any other
digit to indicate decimal.

This field is followed by whitespace (tabs, spaces, etc).

The next field contains the data against which the file should be matched. If
this field starts with <, > or = then the field is compared to the file
contents and matched if the file contents are less than, greater than or
equal to the rest of the field. If this symbol is ommmited, = is assumed.
These are the only three comparisson types available for strings.

If a numeric field starts with & the the match succeeds if all buts set in
the field's value are set in the file. ^ is similar, except that all bits
must be clear. Finally, if the field contains just x then anything will match
(this is useful when part of the file must be displayed in the file type
string). A similar effect for strings can be obtained with >\0

If a numeric type is required then the above should be immediately followed
by either a hex, octal or decimal value. Hex values start with 0x (eg 0xef),
octal values with 0 (eg 002) and decimal values with any other digit.

Strings can contain normal C escape sequences, so \\ must be used for \, \0
indicates ASCII NULL, \x32 hex 32, \03 octal 3, \n newline, \b backspace etc.
Any whitespace in the string must be escaped by preceding it with a \, and if
the string starts with <, = or > this too must be escaped, eg \<HTML

The last field contains the file type name. This may contain special fields
which will be replaced by whatever file contents have been matched (they are
printf style format commands). %s is replaced by a string, %d converts the
value to a decimal, %x to lower case hex and so on. %% must be used for
literal '%'s.

If the last field is ommited then it is assumed that the following line must also be true for the filetype to be a match. eg:

40	long			16
44	long			16
49	byte			x		IntMetrics font data, version %i

Ensures that the word 16 appears at offsets 40 and 44, and any byte at 49.
(The contents of this byte are then printed in place of the %i). This syntax
is not available in Unix magic, and was added because identifying many Risc
OS files requires more than idetifying most Unix files.

If subsequent lines start with a | then they are treated as alternatives to
the prvious line, eg:

2	string		-lh0-
|2	string		-lh1-
|2	string		-lz4-
|2	string		-lz5-		LHarc 1.x archive data [%5s]

ensures that files with either -lh0- -lh1- -lz4- or -lz5- at offset 2 are
matched. This is also not available with Unix (NetBSD) magic, and is mainly
to reduce the number of duplicate menu entries appeearing in !Magic.

Lines starting with one or more >s are subtypes, and are only checked if the previous basic type was a match. eg:

0	string		%!		PostScript document text
>2	string		PS-Adobe-	conforming
>>11	string		>\0		at level %.3s
>>>15	string		EPS		- type %s
>>>15	string		Query		- type %s
>>>15	string		ExitServer	- type %s

Indicates a main type of PostScript, which may optionally also be
'conforming' in which case 'conforming' is added to the PostScript type.
Sub-sbutypes are treated similarly.

Lastly, the first field, the offset, may be contained in brackets in which
case it is treated as indirect. eg (16) means use an offset read from the
file at offset 16. The offset read is, by default, a word but suffixing the
number by l b or s specifies a long, byte of short explicitly, eg (16b). A
further offset to be added to the offset read from the file can be specified,
eg (16+12) reads a word from offset 16, adds 12 and then uses that as an
offset in to the file. (16-12) is also valid. As with Unix magic, endianess
can not be specified.
00000000  46 6f 72 6d 61 74 20 6f  66 20 74 68 65 20 4d 61  |Format of the Ma|
00000010  67 69 63 20 66 69 6c 65  73 20 75 73 65 64 20 62  |gic files used b|
00000020  79 20 21 4d 61 67 69 63  2e 0a 0a 54 6f 20 67 65  |y !Magic...To ge|
00000030  74 20 61 74 20 74 68 65  20 4d 61 67 69 63 20 66  |t at the Magic f|
00000040  69 6c 65 20 53 68 69 66  74 2d 64 6f 75 62 6c 65  |ile Shift-double|
00000050  20 63 6c 69 63 6b 20 6f  6e 20 21 4d 61 67 69 63  | click on !Magic|
00000060  20 74 6f 20 6f 70 65 6e  20 69 74 73 20 61 70 70  | to open its app|
00000070  6c 69 63 61 74 69 6f 6e  0a 64 69 72 65 63 74 6f  |lication.directo|
00000080  72 79 2c 20 61 6e 64 20  74 68 65 6e 20 6c 6f 61  |ry, and then loa|
00000090  64 20 74 68 65 20 66 69  6c 65 20 63 61 6c 6c 65  |d the file calle|
000000a0  64 20 27 4d 61 67 69 63  27 20 69 6e 20 74 6f 20  |d 'Magic' in to |
000000b0  61 20 74 65 78 74 20 65  64 69 74 6f 72 2e 0a 0a  |a text editor...|
000000c0  54 68 65 20 66 6f 72 6d  61 74 20 6f 66 20 74 68  |The format of th|
000000d0  69 73 20 66 69 6c 65 20  69 73 20 62 61 73 65 64  |is file is based|
000000e0  20 6f 6e 20 74 68 65 20  66 6f 72 6d 61 74 20 6f  | on the format o|
000000f0  66 20 74 68 65 20 55 6e  69 78 20 66 69 6c 65 0a  |f the Unix file.|
00000100  69 64 65 6e 74 69 66 69  63 61 74 69 6f 6e 20 74  |identification t|
00000110  6f 6f 6c 20 27 66 69 6c  65 27 2c 20 74 68 65 20  |ool 'file', the |
00000120  63 6f 72 72 65 73 70 6f  6e 64 69 6e 67 20 66 69  |corresponding fi|
00000130  6c 65 20 6f 6e 20 55 6e  69 78 20 73 79 73 74 65  |le on Unix syste|
00000140  6d 73 20 69 73 20 63 61  6c 6c 65 64 0a 2f 65 74  |ms is called./et|
00000150  63 2f 6d 61 67 69 63 2e  20 55 6e 69 78 20 68 61  |c/magic. Unix ha|
00000160  73 20 6e 6f 20 62 75 69  6c 74 20 69 6e 20 66 69  |s no built in fi|
00000170  6c 65 20 74 79 70 65 20  73 79 73 74 65 6d 2c 20  |le type system, |
00000180  73 6f 20 66 69 6c 65 73  20 61 72 65 20 69 64 65  |so files are ide|
00000190  6e 74 69 66 69 65 64 20  62 79 0a 65 78 74 65 6e  |ntified by.exten|
000001a0  73 69 6f 6e 73 20 73 75  63 68 20 61 73 20 2e 74  |sions such as .t|
000001b0  61 72 2e 67 7a 20 61 6e  64 20 62 79 20 6d 61 67  |ar.gz and by mag|
000001c0  69 63 20 6e 75 6d 62 65  72 73 2c 20 77 68 69 63  |ic numbers, whic|
000001d0  68 20 61 72 65 20 61 20  66 65 77 20 62 79 74 65  |h are a few byte|
000001e0  73 20 6f 66 0a 69 6e 66  6f 72 6d 61 74 69 6f 6e  |s of.information|
000001f0  20 6e 6f 72 6d 61 6c 6c  79 20 6c 6f 63 61 74 65  | normally locate|
00000200  64 20 61 74 20 74 68 65  20 73 74 61 72 74 20 6f  |d at the start o|
00000210  66 20 74 68 65 20 66 69  6c 65 2e 20 21 4d 61 67  |f the file. !Mag|
00000220  69 63 20 73 75 70 70 6f  72 74 73 0a 5b 61 6c 6d  |ic supports.[alm|
00000230  6f 73 74 5d 20 61 20 73  75 70 65 72 73 65 74 20  |ost] a superset |
00000240  6f 66 20 74 68 65 20 73  79 6e 74 61 78 20 6f 66  |of the syntax of|
00000250  20 74 68 61 74 20 66 69  6c 65 20 61 6e 64 20 63  | that file and c|
00000260  61 6e 20 62 65 20 75 73  65 64 20 74 6f 20 64 65  |an be used to de|
00000270  74 65 63 74 20 61 0a 6c  61 72 67 65 20 6e 75 6d  |tect a.large num|
00000280  62 65 72 20 6f 66 20 52  69 73 63 20 4f 53 20 61  |ber of Risc OS a|
00000290  6e 64 20 66 6f 72 65 69  67 6e 20 66 69 6c 65 20  |nd foreign file |
000002a0  66 6f 72 6d 61 74 73 2e  0a 0a 4c 69 6e 65 73 20  |formats...Lines |
000002b0  73 74 61 72 74 69 6e 67  20 77 69 74 68 20 61 20  |starting with a |
000002c0  27 23 27 20 61 72 65 20  63 6f 6d 6d 65 6e 74 73  |'#' are comments|
000002d0  20 61 6e 64 20 61 72 65  20 69 67 6e 6f 72 65 64  | and are ignored|
000002e0  2e 20 42 79 20 63 6f 6e  76 65 6e 74 69 6f 6e 20  |. By convention |
000002f0  74 68 65 0a 66 69 72 73  74 20 6c 69 6e 65 20 73  |the.first line s|
00000300  68 6f 75 6c 64 20 63 6f  6e 74 61 69 6e 20 27 23  |hould contain '#|
00000310  21 20 66 69 6c 65 27 2c  20 77 68 69 63 68 20 69  |! file', which i|
00000320  73 20 74 68 65 20 6d 61  67 69 63 20 6e 75 6d 62  |s the magic numb|
00000330  65 72 20 75 73 65 64 20  74 6f 0a 69 64 65 6e 74  |er used to.ident|
00000340  69 66 79 20 74 68 65 20  63 6f 6e 74 65 6e 74 73  |ify the contents|
00000350  20 61 73 20 61 20 6d 61  67 69 63 20 66 69 6c 65  | as a magic file|
00000360  2e 20 43 6f 6d 6d 65 6e  74 73 20 73 68 6f 75 6c  |. Comments shoul|
00000370  64 20 62 65 20 65 6e 74  65 72 65 64 20 6c 69 62  |d be entered lib|
00000380  65 72 61 6c 6c 79 0a 74  68 72 6f 75 67 68 6f 75  |erally.throughou|
00000390  74 20 74 68 65 20 66 69  6c 65 20 2d 20 74 68 65  |t the file - the|
000003a0  79 20 61 72 65 20 73 74  72 69 70 70 65 64 20 6f  |y are stripped o|
000003b0  75 74 20 77 68 65 6e 20  74 68 65 20 66 69 6c 65  |ut when the file|
000003c0  20 69 73 20 70 61 72 73  65 65 64 20 61 6e 64 20  | is parseed and |
000003d0  64 6f 0a 6e 6f 74 20 74  61 6b 65 20 75 70 20 61  |do.not take up a|
000003e0  6e 79 20 6d 65 6d 6f 72  79 20 6f 72 20 74 69 6d  |ny memory or tim|
000003f0  65 20 65 78 63 65 70 74  20 77 68 65 6e 20 4d 61  |e except when Ma|
00000400  67 69 63 20 6c 6f 61 64  73 20 74 68 65 20 66 69  |gic loads the fi|
00000410  6c 65 20 66 6f 72 20 74  68 65 20 66 69 72 73 74  |le for the first|
00000420  0a 74 69 6d 65 2e 20 54  68 65 20 66 69 6c 65 20  |.time. The file |
00000430  77 69 6c 6c 20 6f 6e 6c  79 20 65 76 65 72 20 62  |will only ever b|
00000440  65 20 70 61 72 73 65 64  20 61 67 61 69 6e 20 69  |e parsed again i|
00000450  66 20 69 74 20 63 68 61  6e 67 65 73 2c 20 61 6e  |f it changes, an|
00000460  64 20 69 73 20 6e 6f 74  0a 6e 6f 72 6d 61 6c 6c  |d is not.normall|
00000470  79 20 70 61 72 73 65 64  20 6f 6e 20 73 74 61 72  |y parsed on star|
00000480  74 2d 75 70 2e 0a 0a 45  61 63 68 20 62 61 73 69  |t-up...Each basi|
00000490  63 20 66 69 6c 65 20 74  79 70 65 20 73 74 61 72  |c file type star|
000004a0  74 73 20 77 69 74 68 20  61 20 6c 69 6e 65 20 6c  |ts with a line l|
000004b0  69 6b 65 20 74 68 65 20  66 6f 6c 6c 6f 77 69 6e  |ike the followin|
000004c0  67 3a 0a 0a 30 09 73 74  72 69 6e 67 09 09 09 41  |g:..0.string...A|
000004d0  72 63 68 69 76 65 5c 30  09 41 72 63 46 53 20 61  |rchive\0.ArcFS a|
000004e0  72 63 68 69 76 65 0a 0a  54 68 65 20 30 20 61 74  |rchive..The 0 at|
000004f0  20 74 68 65 20 73 74 61  72 74 20 6f 66 20 74 68  | the start of th|
00000500  65 20 6c 69 6e 65 20 67  69 76 65 73 20 61 6e 20  |e line gives an |
00000510  6f 66 66 73 65 74 20 69  6e 20 74 6f 20 74 68 65  |offset in to the|
00000520  20 66 69 6c 65 20 61 74  20 77 68 69 63 68 20 64  | file at which d|
00000530  61 74 61 0a 77 69 6c 6c  20 62 65 20 6c 6f 6f 6b  |ata.will be look|
00000540  65 64 20 66 6f 72 2e 20  0a 0a 54 68 65 20 73 65  |ed for. ..The se|
00000550  63 6f 6e 64 20 66 69 65  6c 64 20 28 73 65 70 61  |cond field (sepa|
00000560  72 61 74 65 64 20 62 79  20 77 68 69 74 65 20 73  |rated by white s|
00000570  70 61 63 65 29 20 69 6e  64 69 63 61 74 65 73 20  |pace) indicates |
00000580  77 68 61 74 20 74 79 70  65 20 6f 66 20 64 61 74  |what type of dat|
00000590  61 20 69 73 20 74 6f 0a  62 65 20 6c 6f 6f 6b 65  |a is to.be looke|
000005a0  64 20 66 6f 72 2e 20 54  68 65 20 66 6f 6c 6c 6f  |d for. The follo|
000005b0  77 69 6e 67 20 74 79 70  65 73 20 61 72 65 20 73  |wing types are s|
000005c0  75 70 6f 72 74 65 64 3a  0a 0a 0a 62 79 74 65 20  |uported:...byte |
000005d0  20 20 20 20 20 20 20 41  20 73 69 6e 67 6c 65 20  |       A single |
000005e0  62 79 74 65 20 69 73 20  72 65 61 64 20 66 72 6f  |byte is read fro|
000005f0  6d 20 74 68 65 20 66 69  6c 65 2e 0a 73 68 6f 72  |m the file..shor|
00000600  74 20 20 20 20 20 20 20  54 77 6f 20 62 79 74 65  |t       Two byte|
00000610  73 20 61 72 65 20 72 65  61 64 2c 20 69 6e 20 74  |s are read, in t|
00000620  68 65 20 6e 6f 72 6d 61  6c 20 62 79 74 65 20 6f  |he normal byte o|
00000630  72 64 65 72 20 66 6f 72  20 74 68 61 74 20 6d 61  |rder for that ma|
00000640  63 68 69 6e 65 0a 20 20  20 20 20 20 20 20 20 20  |chine.          |
00000650  20 20 28 6c 69 74 74 6c  65 20 65 6e 64 69 61 6e  |  (little endian|
00000660  20 6f 6e 20 41 63 6f 72  6e 73 20 2d 20 6c 65 61  | on Acorns - lea|
00000670  73 74 20 73 69 67 6e 69  66 69 63 61 6e 74 20 62  |st significant b|
00000680  79 74 65 20 66 69 72 73  74 29 2e 0a 6c 65 73 68  |yte first)..lesh|
00000690  6f 72 74 20 20 20 20 20  49 64 65 6e 74 69 63 61  |ort     Identica|
000006a0  6c 20 74 6f 20 73 68 6f  72 74 2e 0a 62 65 73 68  |l to short..besh|
000006b0  6f 72 74 20 20 20 20 20  4c 69 6b 65 20 73 68 6f  |ort     Like sho|
000006c0  72 74 2c 20 62 75 74 20  74 68 65 20 6f 72 64 65  |rt, but the orde|
000006d0  72 20 6f 66 20 74 68 65  20 74 77 6f 20 62 79 74  |r of the two byt|
000006e0  65 73 20 61 72 65 20 72  65 76 65 72 73 65 64 2e  |es are reversed.|
000006f0  0a 6c 6f 6e 67 20 20 20  20 20 20 20 20 41 20 77  |.long        A w|
00000700  6f 72 64 20 28 34 20 62  79 74 65 73 29 20 61 72  |ord (4 bytes) ar|
00000710  65 20 72 65 61 64 20 66  72 6f 6d 20 74 68 65 20  |e read from the |
00000720  66 69 6c 65 20 69 6e 20  6c 69 74 74 6c 65 20 65  |file in little e|
00000730  6e 64 69 61 6e 20 6f 72  64 65 72 2e 0a 6c 65 6c  |ndian order..lel|
00000740  6f 6e 67 20 20 20 20 20  20 49 64 65 6e 74 69 63  |ong      Identic|
00000750  61 6c 20 74 6f 20 6c 6f  6e 67 2e 0a 62 65 6c 6f  |al to long..belo|
00000760  6e 67 20 20 20 20 20 20  4c 69 6b 65 20 6c 6f 6e  |ng      Like lon|
00000770  67 2c 20 62 75 74 20 74  68 65 20 66 6f 75 72 20  |g, but the four |
00000780  62 79 74 65 73 20 61 72  65 20 72 65 61 64 20 69  |bytes are read i|
00000790  6e 20 72 65 76 65 72 73  65 20 6f 72 64 65 72 2e  |n reverse order.|
000007a0  0a 73 74 72 69 6e 67 20  20 20 20 20 20 41 20 73  |.string      A s|
000007b0  74 72 69 6e 67 20 69 73  20 72 65 61 64 20 66 72  |tring is read fr|
000007c0  6f 6d 20 74 68 65 20 66  69 6c 65 20 6f 66 20 75  |om the file of u|
000007d0  70 20 74 6f 20 74 68 65  20 73 61 6d 65 20 6c 65  |p to the same le|
000007e0  6e 67 74 68 20 61 73 0a  20 20 20 20 20 20 20 20  |ngth as.        |
000007f0  20 20 20 20 74 68 65 20  73 74 72 69 6e 67 20 61  |    the string a|
00000800  67 61 69 6e 73 74 20 77  68 69 63 68 20 69 74 20  |gainst which it |
00000810  69 73 20 74 6f 20 62 65  20 63 6f 6d 70 61 72 65  |is to be compare|
00000820  64 2e 0a 64 61 74 65 20  20 20 20 20 20 20 20 4e  |d..date        N|
00000830  6f 74 20 69 6d 70 6c 65  6d 65 6e 74 65 64 2e 20  |ot implemented. |
00000840  57 6f 75 6c 64 20 6f 74  68 65 72 77 69 73 65 20  |Would otherwise |
00000850  6c 6f 61 64 20 69 6e 20  61 20 34 20 62 79 74 65  |load in a 4 byte|
00000860  20 55 6e 69 78 20 64 61  74 65 2e 0a 20 20 20 20  | Unix date..    |
00000870  20 20 20 20 20 20 20 20  54 68 69 73 20 69 73 20  |        This is |
00000880  6e 6f 74 20 75 73 65 64  20 69 6e 20 74 68 65 20  |not used in the |
00000890  4e 65 74 42 53 44 20 6d  61 67 69 63 20 66 69 6c  |NetBSD magic fil|
000008a0  65 20 74 68 61 74 20 49  20 68 61 76 65 2e 0a 0a  |e that I have...|
000008b0  6c 6f 6e 67 20 74 79 70  65 73 20 63 61 6e 20 62  |long types can b|
000008c0  65 20 70 72 65 63 65 64  65 64 20 62 79 20 61 20  |e preceded by a |
000008d0  75 20 28 65 67 20 75 6c  6f 6e 67 29 20 69 6e 20  |u (eg ulong) in |
000008e0  77 68 69 63 68 20 63 61  73 65 20 74 68 65 79 20  |which case they |
000008f0  61 72 65 20 74 72 65 61  74 65 64 20 61 73 0a 75  |are treated as.u|
00000900  6e 73 69 67 6e 65 64 2c  20 61 6c 6c 20 6f 74 68  |nsigned, all oth|
00000910  65 72 20 74 79 70 65 73  20 61 72 65 20 74 72 65  |er types are tre|
00000920  61 74 65 64 20 61 73 20  75 6e 73 69 67 6e 65 64  |ated as unsigned|
00000930  20 62 79 20 64 65 66 61  75 6c 74 2e 0a 0a 49 66  | by default...If|
00000940  20 74 68 65 20 74 79 70  65 20 69 73 20 69 6d 6d  | the type is imm|
00000950  65 64 69 61 74 65 6c 79  20 66 6f 6c 6c 6f 77 65  |ediately followe|
00000960  64 20 62 79 20 61 6e 20  26 2c 20 74 68 65 6e 20  |d by an &, then |
00000970  74 68 69 73 20 69 6e 74  72 6f 64 75 63 65 73 20  |this introduces |
00000980  61 20 6d 61 73 6b 20 77  69 74 68 0a 77 68 69 63  |a mask with.whic|
00000990  68 20 74 68 65 20 66 69  6c 65 20 63 6f 6e 74 65  |h the file conte|
000009a0  6e 74 73 20 77 69 6c 6c  20 62 65 20 41 4e 44 65  |nts will be ANDe|
000009b0  64 20 62 65 66 6f 72 65  20 63 6f 6d 70 61 72 69  |d before compari|
000009c0  73 73 6f 6e 2c 20 65 67  20 62 79 74 65 26 34 32  |sson, eg byte&42|
000009d0  2e 0a 45 78 70 72 65 73  73 69 6f 6e 20 66 6f 6c  |..Expression fol|
000009e0  6c 6f 77 69 6e 67 20 74  68 65 20 26 20 63 61 6e  |lowing the & can|
000009f0  20 73 74 61 72 74 20 77  69 74 68 20 30 2c 20 69  | start with 0, i|
00000a00  6e 20 77 68 69 63 68 20  63 61 73 65 20 74 68 65  |n which case the|
00000a10  79 20 61 72 65 20 74 72  65 61 74 65 64 0a 61 73  |y are treated.as|
00000a20  20 6f 63 74 61 6c 20 76  61 6c 75 65 73 2c 20 30  | octal values, 0|
00000a30  78 2c 20 69 6e 20 77 68  69 63 68 20 63 61 73 65  |x, in which case|
00000a40  20 74 68 65 79 20 61 72  65 20 74 72 65 61 74 65  | they are treate|
00000a50  64 20 61 73 20 68 65 78  2c 20 61 6e 64 20 61 6e  |d as hex, and an|
00000a60  79 20 6f 74 68 65 72 0a  64 69 67 69 74 20 74 6f  |y other.digit to|
00000a70  20 69 6e 64 69 63 61 74  65 20 64 65 63 69 6d 61  | indicate decima|
00000a80  6c 2e 0a 0a 54 68 69 73  20 66 69 65 6c 64 20 69  |l...This field i|
00000a90  73 20 66 6f 6c 6c 6f 77  65 64 20 62 79 20 77 68  |s followed by wh|
00000aa0  69 74 65 73 70 61 63 65  20 28 74 61 62 73 2c 20  |itespace (tabs, |
00000ab0  73 70 61 63 65 73 2c 20  65 74 63 29 2e 0a 0a 54  |spaces, etc)...T|
00000ac0  68 65 20 6e 65 78 74 20  66 69 65 6c 64 20 63 6f  |he next field co|
00000ad0  6e 74 61 69 6e 73 20 74  68 65 20 64 61 74 61 20  |ntains the data |
00000ae0  61 67 61 69 6e 73 74 20  77 68 69 63 68 20 74 68  |against which th|
00000af0  65 20 66 69 6c 65 20 73  68 6f 75 6c 64 20 62 65  |e file should be|
00000b00  20 6d 61 74 63 68 65 64  2e 20 49 66 0a 74 68 69  | matched. If.thi|
00000b10  73 20 66 69 65 6c 64 20  73 74 61 72 74 73 20 77  |s field starts w|
00000b20  69 74 68 20 3c 2c 20 3e  20 6f 72 20 3d 20 74 68  |ith <, > or = th|
00000b30  65 6e 20 74 68 65 20 66  69 65 6c 64 20 69 73 20  |en the field is |
00000b40  63 6f 6d 70 61 72 65 64  20 74 6f 20 74 68 65 20  |compared to the |
00000b50  66 69 6c 65 0a 63 6f 6e  74 65 6e 74 73 20 61 6e  |file.contents an|
00000b60  64 20 6d 61 74 63 68 65  64 20 69 66 20 74 68 65  |d matched if the|
00000b70  20 66 69 6c 65 20 63 6f  6e 74 65 6e 74 73 20 61  | file contents a|
00000b80  72 65 20 6c 65 73 73 20  74 68 61 6e 2c 20 67 72  |re less than, gr|
00000b90  65 61 74 65 72 20 74 68  61 6e 20 6f 72 0a 65 71  |eater than or.eq|
00000ba0  75 61 6c 20 74 6f 20 74  68 65 20 72 65 73 74 20  |ual to the rest |
00000bb0  6f 66 20 74 68 65 20 66  69 65 6c 64 2e 20 49 66  |of the field. If|
00000bc0  20 74 68 69 73 20 73 79  6d 62 6f 6c 20 69 73 20  | this symbol is |
00000bd0  6f 6d 6d 6d 69 74 65 64  2c 20 3d 20 69 73 20 61  |ommmited, = is a|
00000be0  73 73 75 6d 65 64 2e 0a  54 68 65 73 65 20 61 72  |ssumed..These ar|
00000bf0  65 20 74 68 65 20 6f 6e  6c 79 20 74 68 72 65 65  |e the only three|
00000c00  20 63 6f 6d 70 61 72 69  73 73 6f 6e 20 74 79 70  | comparisson typ|
00000c10  65 73 20 61 76 61 69 6c  61 62 6c 65 20 66 6f 72  |es available for|
00000c20  20 73 74 72 69 6e 67 73  2e 0a 0a 49 66 20 61 20  | strings...If a |
00000c30  6e 75 6d 65 72 69 63 20  66 69 65 6c 64 20 73 74  |numeric field st|
00000c40  61 72 74 73 20 77 69 74  68 20 26 20 74 68 65 20  |arts with & the |
00000c50  74 68 65 20 6d 61 74 63  68 20 73 75 63 63 65 65  |the match succee|
00000c60  64 73 20 69 66 20 61 6c  6c 20 62 75 74 73 20 73  |ds if all buts s|
00000c70  65 74 20 69 6e 0a 74 68  65 20 66 69 65 6c 64 27  |et in.the field'|
00000c80  73 20 76 61 6c 75 65 20  61 72 65 20 73 65 74 20  |s value are set |
00000c90  69 6e 20 74 68 65 20 66  69 6c 65 2e 20 5e 20 69  |in the file. ^ i|
00000ca0  73 20 73 69 6d 69 6c 61  72 2c 20 65 78 63 65 70  |s similar, excep|
00000cb0  74 20 74 68 61 74 20 61  6c 6c 20 62 69 74 73 0a  |t that all bits.|
00000cc0  6d 75 73 74 20 62 65 20  63 6c 65 61 72 2e 20 46  |must be clear. F|
00000cd0  69 6e 61 6c 6c 79 2c 20  69 66 20 74 68 65 20 66  |inally, if the f|
00000ce0  69 65 6c 64 20 63 6f 6e  74 61 69 6e 73 20 6a 75  |ield contains ju|
00000cf0  73 74 20 78 20 74 68 65  6e 20 61 6e 79 74 68 69  |st x then anythi|
00000d00  6e 67 20 77 69 6c 6c 20  6d 61 74 63 68 0a 28 74  |ng will match.(t|
00000d10  68 69 73 20 69 73 20 75  73 65 66 75 6c 20 77 68  |his is useful wh|
00000d20  65 6e 20 70 61 72 74 20  6f 66 20 74 68 65 20 66  |en part of the f|
00000d30  69 6c 65 20 6d 75 73 74  20 62 65 20 64 69 73 70  |ile must be disp|
00000d40  6c 61 79 65 64 20 69 6e  20 74 68 65 20 66 69 6c  |layed in the fil|
00000d50  65 20 74 79 70 65 0a 73  74 72 69 6e 67 29 2e 20  |e type.string). |
00000d60  41 20 73 69 6d 69 6c 61  72 20 65 66 66 65 63 74  |A similar effect|
00000d70  20 66 6f 72 20 73 74 72  69 6e 67 73 20 63 61 6e  | for strings can|
00000d80  20 62 65 20 6f 62 74 61  69 6e 65 64 20 77 69 74  | be obtained wit|
00000d90  68 20 3e 5c 30 0a 0a 49  66 20 61 20 6e 75 6d 65  |h >\0..If a nume|
00000da0  72 69 63 20 74 79 70 65  20 69 73 20 72 65 71 75  |ric type is requ|
00000db0  69 72 65 64 20 74 68 65  6e 20 74 68 65 20 61 62  |ired then the ab|
00000dc0  6f 76 65 20 73 68 6f 75  6c 64 20 62 65 20 69 6d  |ove should be im|
00000dd0  6d 65 64 69 61 74 65 6c  79 20 66 6f 6c 6c 6f 77  |mediately follow|
00000de0  65 64 0a 62 79 20 65 69  74 68 65 72 20 61 20 68  |ed.by either a h|
00000df0  65 78 2c 20 6f 63 74 61  6c 20 6f 72 20 64 65 63  |ex, octal or dec|
00000e00  69 6d 61 6c 20 76 61 6c  75 65 2e 20 48 65 78 20  |imal value. Hex |
00000e10  76 61 6c 75 65 73 20 73  74 61 72 74 20 77 69 74  |values start wit|
00000e20  68 20 30 78 20 28 65 67  20 30 78 65 66 29 2c 0a  |h 0x (eg 0xef),.|
00000e30  6f 63 74 61 6c 20 76 61  6c 75 65 73 20 77 69 74  |octal values wit|
00000e40  68 20 30 20 28 65 67 20  30 30 32 29 20 61 6e 64  |h 0 (eg 002) and|
00000e50  20 64 65 63 69 6d 61 6c  20 76 61 6c 75 65 73 20  | decimal values |
00000e60  77 69 74 68 20 61 6e 79  20 6f 74 68 65 72 20 64  |with any other d|
00000e70  69 67 69 74 2e 0a 0a 53  74 72 69 6e 67 73 20 63  |igit...Strings c|
00000e80  61 6e 20 63 6f 6e 74 61  69 6e 20 6e 6f 72 6d 61  |an contain norma|
00000e90  6c 20 43 20 65 73 63 61  70 65 20 73 65 71 75 65  |l C escape seque|
00000ea0  6e 63 65 73 2c 20 73 6f  20 5c 5c 20 6d 75 73 74  |nces, so \\ must|
00000eb0  20 62 65 20 75 73 65 64  20 66 6f 72 20 5c 2c 20  | be used for \, |
00000ec0  5c 30 0a 69 6e 64 69 63  61 74 65 73 20 41 53 43  |\0.indicates ASC|
00000ed0  49 49 20 4e 55 4c 4c 2c  20 5c 78 33 32 20 68 65  |II NULL, \x32 he|
00000ee0  78 20 33 32 2c 20 5c 30  33 20 6f 63 74 61 6c 20  |x 32, \03 octal |
00000ef0  33 2c 20 5c 6e 20 6e 65  77 6c 69 6e 65 2c 20 5c  |3, \n newline, \|
00000f00  62 20 62 61 63 6b 73 70  61 63 65 20 65 74 63 2e  |b backspace etc.|
00000f10  0a 41 6e 79 20 77 68 69  74 65 73 70 61 63 65 20  |.Any whitespace |
00000f20  69 6e 20 74 68 65 20 73  74 72 69 6e 67 20 6d 75  |in the string mu|
00000f30  73 74 20 62 65 20 65 73  63 61 70 65 64 20 62 79  |st be escaped by|
00000f40  20 70 72 65 63 65 64 69  6e 67 20 69 74 20 77 69  | preceding it wi|
00000f50  74 68 20 61 20 5c 2c 20  61 6e 64 20 69 66 0a 74  |th a \, and if.t|
00000f60  68 65 20 73 74 72 69 6e  67 20 73 74 61 72 74 73  |he string starts|
00000f70  20 77 69 74 68 20 3c 2c  20 3d 20 6f 72 20 3e 20  | with <, = or > |
00000f80  74 68 69 73 20 74 6f 6f  20 6d 75 73 74 20 62 65  |this too must be|
00000f90  20 65 73 63 61 70 65 64  2c 20 65 67 20 5c 3c 48  | escaped, eg \<H|
00000fa0  54 4d 4c 0a 0a 54 68 65  20 6c 61 73 74 20 66 69  |TML..The last fi|
00000fb0  65 6c 64 20 63 6f 6e 74  61 69 6e 73 20 74 68 65  |eld contains the|
00000fc0  20 66 69 6c 65 20 74 79  70 65 20 6e 61 6d 65 2e  | file type name.|
00000fd0  20 54 68 69 73 20 6d 61  79 20 63 6f 6e 74 61 69  | This may contai|
00000fe0  6e 20 73 70 65 63 69 61  6c 20 66 69 65 6c 64 73  |n special fields|
00000ff0  0a 77 68 69 63 68 20 77  69 6c 6c 20 62 65 20 72  |.which will be r|
00001000  65 70 6c 61 63 65 64 20  62 79 20 77 68 61 74 65  |eplaced by whate|
00001010  76 65 72 20 66 69 6c 65  20 63 6f 6e 74 65 6e 74  |ver file content|
00001020  73 20 68 61 76 65 20 62  65 65 6e 20 6d 61 74 63  |s have been matc|
00001030  68 65 64 20 28 74 68 65  79 20 61 72 65 0a 70 72  |hed (they are.pr|
00001040  69 6e 74 66 20 73 74 79  6c 65 20 66 6f 72 6d 61  |intf style forma|
00001050  74 20 63 6f 6d 6d 61 6e  64 73 29 2e 20 25 73 20  |t commands). %s |
00001060  69 73 20 72 65 70 6c 61  63 65 64 20 62 79 20 61  |is replaced by a|
00001070  20 73 74 72 69 6e 67 2c  20 25 64 20 63 6f 6e 76  | string, %d conv|
00001080  65 72 74 73 20 74 68 65  0a 76 61 6c 75 65 20 74  |erts the.value t|
00001090  6f 20 61 20 64 65 63 69  6d 61 6c 2c 20 25 78 20  |o a decimal, %x |
000010a0  74 6f 20 6c 6f 77 65 72  20 63 61 73 65 20 68 65  |to lower case he|
000010b0  78 20 61 6e 64 20 73 6f  20 6f 6e 2e 20 25 25 20  |x and so on. %% |
000010c0  6d 75 73 74 20 62 65 20  75 73 65 64 20 66 6f 72  |must be used for|
000010d0  0a 6c 69 74 65 72 61 6c  20 27 25 27 73 2e 0a 0a  |.literal '%'s...|
000010e0  49 66 20 74 68 65 20 6c  61 73 74 20 66 69 65 6c  |If the last fiel|
000010f0  64 20 69 73 20 6f 6d 6d  69 74 65 64 20 74 68 65  |d is ommited the|
00001100  6e 20 69 74 20 69 73 20  61 73 73 75 6d 65 64 20  |n it is assumed |
00001110  74 68 61 74 20 74 68 65  20 66 6f 6c 6c 6f 77 69  |that the followi|
00001120  6e 67 20 6c 69 6e 65 20  6d 75 73 74 20 61 6c 73  |ng line must als|
00001130  6f 20 62 65 20 74 72 75  65 20 66 6f 72 20 74 68  |o be true for th|
00001140  65 20 66 69 6c 65 74 79  70 65 20 74 6f 20 62 65  |e filetype to be|
00001150  20 61 20 6d 61 74 63 68  2e 20 65 67 3a 0a 0a 34  | a match. eg:..4|
00001160  30 09 6c 6f 6e 67 09 09  09 31 36 0a 34 34 09 6c  |0.long...16.44.l|
00001170  6f 6e 67 09 09 09 31 36  0a 34 39 09 62 79 74 65  |ong...16.49.byte|
00001180  09 09 09 78 09 09 49 6e  74 4d 65 74 72 69 63 73  |...x..IntMetrics|
00001190  20 66 6f 6e 74 20 64 61  74 61 2c 20 76 65 72 73  | font data, vers|
000011a0  69 6f 6e 20 25 69 0a 0a  45 6e 73 75 72 65 73 20  |ion %i..Ensures |
000011b0  74 68 61 74 20 74 68 65  20 77 6f 72 64 20 31 36  |that the word 16|
000011c0  20 61 70 70 65 61 72 73  20 61 74 20 6f 66 66 73  | appears at offs|
000011d0  65 74 73 20 34 30 20 61  6e 64 20 34 34 2c 20 61  |ets 40 and 44, a|
000011e0  6e 64 20 61 6e 79 20 62  79 74 65 20 61 74 20 34  |nd any byte at 4|
000011f0  39 2e 0a 28 54 68 65 20  63 6f 6e 74 65 6e 74 73  |9..(The contents|
00001200  20 6f 66 20 74 68 69 73  20 62 79 74 65 20 61 72  | of this byte ar|
00001210  65 20 74 68 65 6e 20 70  72 69 6e 74 65 64 20 69  |e then printed i|
00001220  6e 20 70 6c 61 63 65 20  6f 66 20 74 68 65 20 25  |n place of the %|
00001230  69 29 2e 20 54 68 69 73  20 73 79 6e 74 61 78 0a  |i). This syntax.|
00001240  69 73 20 6e 6f 74 20 61  76 61 69 6c 61 62 6c 65  |is not available|
00001250  20 69 6e 20 55 6e 69 78  20 6d 61 67 69 63 2c 20  | in Unix magic, |
00001260  61 6e 64 20 77 61 73 20  61 64 64 65 64 20 62 65  |and was added be|
00001270  63 61 75 73 65 20 69 64  65 6e 74 69 66 79 69 6e  |cause identifyin|
00001280  67 20 6d 61 6e 79 20 52  69 73 63 0a 4f 53 20 66  |g many Risc.OS f|
00001290  69 6c 65 73 20 72 65 71  75 69 72 65 73 20 6d 6f  |iles requires mo|
000012a0  72 65 20 74 68 61 6e 20  69 64 65 74 69 66 79 69  |re than idetifyi|
000012b0  6e 67 20 6d 6f 73 74 20  55 6e 69 78 20 66 69 6c  |ng most Unix fil|
000012c0  65 73 2e 0a 0a 49 66 20  73 75 62 73 65 71 75 65  |es...If subseque|
000012d0  6e 74 20 6c 69 6e 65 73  20 73 74 61 72 74 20 77  |nt lines start w|
000012e0  69 74 68 20 61 20 7c 20  74 68 65 6e 20 74 68 65  |ith a | then the|
000012f0  79 20 61 72 65 20 74 72  65 61 74 65 64 20 61 73  |y are treated as|
00001300  20 61 6c 74 65 72 6e 61  74 69 76 65 73 20 74 6f  | alternatives to|
00001310  0a 74 68 65 20 70 72 76  69 6f 75 73 20 6c 69 6e  |.the prvious lin|
00001320  65 2c 20 65 67 3a 0a 0a  32 09 73 74 72 69 6e 67  |e, eg:..2.string|
00001330  09 09 2d 6c 68 30 2d 0a  7c 32 09 73 74 72 69 6e  |..-lh0-.|2.strin|
00001340  67 09 09 2d 6c 68 31 2d  0a 7c 32 09 73 74 72 69  |g..-lh1-.|2.stri|
00001350  6e 67 09 09 2d 6c 7a 34  2d 0a 7c 32 09 73 74 72  |ng..-lz4-.|2.str|
00001360  69 6e 67 09 09 2d 6c 7a  35 2d 09 09 4c 48 61 72  |ing..-lz5-..LHar|
00001370  63 20 31 2e 78 20 61 72  63 68 69 76 65 20 64 61  |c 1.x archive da|
00001380  74 61 20 5b 25 35 73 5d  0a 0a 65 6e 73 75 72 65  |ta [%5s]..ensure|
00001390  73 20 74 68 61 74 20 66  69 6c 65 73 20 77 69 74  |s that files wit|
000013a0  68 20 65 69 74 68 65 72  20 2d 6c 68 30 2d 20 2d  |h either -lh0- -|
000013b0  6c 68 31 2d 20 2d 6c 7a  34 2d 20 6f 72 20 2d 6c  |lh1- -lz4- or -l|
000013c0  7a 35 2d 20 61 74 20 6f  66 66 73 65 74 20 32 20  |z5- at offset 2 |
000013d0  61 72 65 0a 6d 61 74 63  68 65 64 2e 20 54 68 69  |are.matched. Thi|
000013e0  73 20 69 73 20 61 6c 73  6f 20 6e 6f 74 20 61 76  |s is also not av|
000013f0  61 69 6c 61 62 6c 65 20  77 69 74 68 20 55 6e 69  |ailable with Uni|
00001400  78 20 28 4e 65 74 42 53  44 29 20 6d 61 67 69 63  |x (NetBSD) magic|
00001410  2c 20 61 6e 64 20 69 73  20 6d 61 69 6e 6c 79 0a  |, and is mainly.|
00001420  74 6f 20 72 65 64 75 63  65 20 74 68 65 20 6e 75  |to reduce the nu|
00001430  6d 62 65 72 20 6f 66 20  64 75 70 6c 69 63 61 74  |mber of duplicat|
00001440  65 20 6d 65 6e 75 20 65  6e 74 72 69 65 73 20 61  |e menu entries a|
00001450  70 70 65 65 61 72 69 6e  67 20 69 6e 20 21 4d 61  |ppeearing in !Ma|
00001460  67 69 63 2e 0a 0a 4c 69  6e 65 73 20 73 74 61 72  |gic...Lines star|
00001470  74 69 6e 67 20 77 69 74  68 20 6f 6e 65 20 6f 72  |ting with one or|
00001480  20 6d 6f 72 65 20 3e 73  20 61 72 65 20 73 75 62  | more >s are sub|
00001490  74 79 70 65 73 2c 20 61  6e 64 20 61 72 65 20 6f  |types, and are o|
000014a0  6e 6c 79 20 63 68 65 63  6b 65 64 20 69 66 20 74  |nly checked if t|
000014b0  68 65 20 70 72 65 76 69  6f 75 73 20 62 61 73 69  |he previous basi|
000014c0  63 20 74 79 70 65 20 77  61 73 20 61 20 6d 61 74  |c type was a mat|
000014d0  63 68 2e 20 65 67 3a 0a  0a 30 09 73 74 72 69 6e  |ch. eg:..0.strin|
000014e0  67 09 09 25 21 09 09 50  6f 73 74 53 63 72 69 70  |g..%!..PostScrip|
000014f0  74 20 64 6f 63 75 6d 65  6e 74 20 74 65 78 74 0a  |t document text.|
00001500  3e 32 09 73 74 72 69 6e  67 09 09 50 53 2d 41 64  |>2.string..PS-Ad|
00001510  6f 62 65 2d 09 63 6f 6e  66 6f 72 6d 69 6e 67 0a  |obe-.conforming.|
00001520  3e 3e 31 31 09 73 74 72  69 6e 67 09 09 3e 5c 30  |>>11.string..>\0|
00001530  09 09 61 74 20 6c 65 76  65 6c 20 25 2e 33 73 0a  |..at level %.3s.|
00001540  3e 3e 3e 31 35 09 73 74  72 69 6e 67 09 09 45 50  |>>>15.string..EP|
00001550  53 09 09 2d 20 74 79 70  65 20 25 73 0a 3e 3e 3e  |S..- type %s.>>>|
00001560  31 35 09 73 74 72 69 6e  67 09 09 51 75 65 72 79  |15.string..Query|
00001570  09 09 2d 20 74 79 70 65  20 25 73 0a 3e 3e 3e 31  |..- type %s.>>>1|
00001580  35 09 73 74 72 69 6e 67  09 09 45 78 69 74 53 65  |5.string..ExitSe|
00001590  72 76 65 72 09 2d 20 74  79 70 65 20 25 73 0a 0a  |rver.- type %s..|
000015a0  49 6e 64 69 63 61 74 65  73 20 61 20 6d 61 69 6e  |Indicates a main|
000015b0  20 74 79 70 65 20 6f 66  20 50 6f 73 74 53 63 72  | type of PostScr|
000015c0  69 70 74 2c 20 77 68 69  63 68 20 6d 61 79 20 6f  |ipt, which may o|
000015d0  70 74 69 6f 6e 61 6c 6c  79 20 61 6c 73 6f 20 62  |ptionally also b|
000015e0  65 0a 27 63 6f 6e 66 6f  72 6d 69 6e 67 27 20 69  |e.'conforming' i|
000015f0  6e 20 77 68 69 63 68 20  63 61 73 65 20 27 63 6f  |n which case 'co|
00001600  6e 66 6f 72 6d 69 6e 67  27 20 69 73 20 61 64 64  |nforming' is add|
00001610  65 64 20 74 6f 20 74 68  65 20 50 6f 73 74 53 63  |ed to the PostSc|
00001620  72 69 70 74 20 74 79 70  65 2e 0a 53 75 62 2d 73  |ript type..Sub-s|
00001630  62 75 74 79 70 65 73 20  61 72 65 20 74 72 65 61  |butypes are trea|
00001640  74 65 64 20 73 69 6d 69  6c 61 72 6c 79 2e 0a 0a  |ted similarly...|
00001650  4c 61 73 74 6c 79 2c 20  74 68 65 20 66 69 72 73  |Lastly, the firs|
00001660  74 20 66 69 65 6c 64 2c  20 74 68 65 20 6f 66 66  |t field, the off|
00001670  73 65 74 2c 20 6d 61 79  20 62 65 20 63 6f 6e 74  |set, may be cont|
00001680  61 69 6e 65 64 20 69 6e  20 62 72 61 63 6b 65 74  |ained in bracket|
00001690  73 20 69 6e 20 77 68 69  63 68 0a 63 61 73 65 20  |s in which.case |
000016a0  69 74 20 69 73 20 74 72  65 61 74 65 64 20 61 73  |it is treated as|
000016b0  20 69 6e 64 69 72 65 63  74 2e 20 65 67 20 28 31  | indirect. eg (1|
000016c0  36 29 20 6d 65 61 6e 73  20 75 73 65 20 61 6e 20  |6) means use an |
000016d0  6f 66 66 73 65 74 20 72  65 61 64 20 66 72 6f 6d  |offset read from|
000016e0  20 74 68 65 0a 66 69 6c  65 20 61 74 20 6f 66 66  | the.file at off|
000016f0  73 65 74 20 31 36 2e 20  54 68 65 20 6f 66 66 73  |set 16. The offs|
00001700  65 74 20 72 65 61 64 20  69 73 2c 20 62 79 20 64  |et read is, by d|
00001710  65 66 61 75 6c 74 2c 20  61 20 77 6f 72 64 20 62  |efault, a word b|
00001720  75 74 20 73 75 66 66 69  78 69 6e 67 20 74 68 65  |ut suffixing the|
00001730  0a 6e 75 6d 62 65 72 20  62 79 20 6c 20 62 20 6f  |.number by l b o|
00001740  72 20 73 20 73 70 65 63  69 66 69 65 73 20 61 20  |r s specifies a |
00001750  6c 6f 6e 67 2c 20 62 79  74 65 20 6f 66 20 73 68  |long, byte of sh|
00001760  6f 72 74 20 65 78 70 6c  69 63 69 74 6c 79 2c 20  |ort explicitly, |
00001770  65 67 20 28 31 36 62 29  2e 20 41 0a 66 75 72 74  |eg (16b). A.furt|
00001780  68 65 72 20 6f 66 66 73  65 74 20 74 6f 20 62 65  |her offset to be|
00001790  20 61 64 64 65 64 20 74  6f 20 74 68 65 20 6f 66  | added to the of|
000017a0  66 73 65 74 20 72 65 61  64 20 66 72 6f 6d 20 74  |fset read from t|
000017b0  68 65 20 66 69 6c 65 20  63 61 6e 20 62 65 20 73  |he file can be s|
000017c0  70 65 63 69 66 69 65 64  2c 0a 65 67 20 28 31 36  |pecified,.eg (16|
000017d0  2b 31 32 29 20 72 65 61  64 73 20 61 20 77 6f 72  |+12) reads a wor|
000017e0  64 20 66 72 6f 6d 20 6f  66 66 73 65 74 20 31 36  |d from offset 16|
000017f0  2c 20 61 64 64 73 20 31  32 20 61 6e 64 20 74 68  |, adds 12 and th|
00001800  65 6e 20 75 73 65 73 20  74 68 61 74 20 61 73 20  |en uses that as |
00001810  61 6e 0a 6f 66 66 73 65  74 20 69 6e 20 74 6f 20  |an.offset in to |
00001820  74 68 65 20 66 69 6c 65  2e 20 28 31 36 2d 31 32  |the file. (16-12|
00001830  29 20 69 73 20 61 6c 73  6f 20 76 61 6c 69 64 2e  |) is also valid.|
00001840  20 41 73 20 77 69 74 68  20 55 6e 69 78 20 6d 61  | As with Unix ma|
00001850  67 69 63 2c 20 65 6e 64  69 61 6e 65 73 73 0a 63  |gic, endianess.c|
00001860  61 6e 20 6e 6f 74 20 62  65 20 73 70 65 63 69 66  |an not be specif|
00001870  69 65 64 2e 0a                                    |ied..|
00001875