home *** CD-ROM | disk | FTP | other *** search
/ Geek Gadgets 1 / ADE-1.bin / ade-bin / lib / magic < prev    next >
Encoding:
magic text file  |  1996-10-13  |  103.9 KB  |  3,088 lines

  1. # Magic file created Sun Oct 13 23:25:56 MST 1996 by 
  2. #! file
  3. # Magic data for file(1) command.
  4. # Machine-genererated from src/cmd/file/magdir/*; edit there only!
  5. # Format is described in magic(files), where:
  6. # files is 4 on V7 and BSD, 4 on SV, and ?? in the SVID.
  7.  
  8. #------------------------------------------------------------------------------
  9. # Localstuff:  file(1) magic for locally observed files
  10. #
  11. # $Id: Localstuff,v 1.3 1995/01/21 21:09:00 christos Exp $
  12. # Add any locally observed files here.  Remember:
  13. # text if readable, executable if runnable binary, data if unreadable.
  14.  
  15. #------------------------------------------------------------------------------
  16. # alliant:  file(1) magic for Alliant FX series a.out files
  17. #
  18. # If the FX series is the one that had a processor with a 68K-derived
  19. # instruction set, the "short" should probably become "beshort" and the
  20. # "long" should probably become "belong".
  21. # If it's the i860-based one, they should probably become either the
  22. # big-endian or little-endian versions, depending on the mode they ran
  23. # the 860 in....
  24. #
  25. 0    short        0420        0420 Alliant virtual executable
  26. >2    short        &0x0020        common library
  27. >16    long        >0        not stripped
  28. 0    short        0421        0421 Alliant compact executable
  29. >2    short        &0x0020        common library
  30. >16    long        >0        not stripped
  31. #------------------------------------------------------------------------------
  32. # alpha architecture description
  33. #
  34.  
  35. 0    leshort        0603        COFF format alpha
  36. >22    leshort&030000    !020000        executable
  37. >24    leshort        0410        pure
  38. >24    leshort        0413        paged
  39. >22    leshort&020000    !0        dynamically linked
  40. >16    lelong        !0        not stripped
  41. >16    lelong        0        stripped
  42. >22    leshort&030000    020000        shared library
  43. >24    leshort        0407        object
  44. >27    byte        x        - version %d
  45. >26    byte        x        .%d
  46. >28    byte        x        -%d
  47.  
  48. #------------------------------------------------------------------------------
  49. # amiga:  file(1) magic for Amiga file formats
  50. #
  51. 0    belong        0x000003f3    AmigaOS hunk format executable
  52.  
  53. #------------------------------------------------------------------------------
  54. # animation:  file(1) magic for animation/movie formats
  55. #
  56. # animation formats
  57. # MPEG, FLI, DL originally from vax@ccwf.cc.utexas.edu (VaX#n8)
  58. # FLC, SGI, Apple originally from Daniel Quinlan (quinlan@yggdrasil.com)
  59.  
  60. # MPEG animation format
  61. 0    string        \000\000\001\263    MPEG file
  62.  
  63. # FLI animation format
  64. 4    leshort        0xAF11            FLI file
  65. >6    leshort        x            - %d frames,
  66. >8    leshort        x            width=%d pixels,
  67. >10    leshort        x            height=%d pixels,
  68. >12    leshort        x            depth=%d,
  69. >16    leshort        x            ticks/frame=%d
  70. # FLC animation format
  71. 4    leshort        0xAF12            FLC file
  72. >6    leshort        x            - %d frames
  73. >8    leshort        x            width=%d pixels,
  74. >10    leshort        x            height=%d pixels,
  75. >12    leshort        x            depth=%d,
  76. >16    leshort        x            ticks/frame=%d
  77.  
  78. # DL animation format
  79. # XXX - collision with most `mips' magic
  80. #
  81. # I couldn't find a real magic number for these, however, this
  82. # -appears- to work.  Note that it might catch other files, too, so be
  83. # careful!
  84. #
  85. # Note that title and author appear in the two 20-byte chunks
  86. # at decimal offsets 2 and 22, respectively, but they are XOR'ed with
  87. # 255 (hex FF)!  The DL format is really bad.
  88. #
  89. #0    byte    1    DL version 1, medium format (160x100, 4 images/screen)
  90. #>42    byte    x    - %d screens,
  91. #>43    byte    x    %d commands
  92. #0    byte    2    DL version 2
  93. #>1    byte    1    - large format (320x200,1 image/screen),
  94. #>1    byte    2    - medium format (160x100,4 images/screen),
  95. #>1    byte    >2    - unknown format,
  96. #>42    byte    x    %d screens,
  97. #>43    byte    x    %d commands
  98. # Based on empirical evidence, DL version 3 have several nulls following the
  99. # \003.  Most of them start with non-null values at hex offset 0x34 or so.
  100. #0    string    \3\0\0\0\0\0\0\0\0\0\0\0    DL version 3
  101.  
  102. # SGI and Apple formats
  103. 0    string        MOVI        Silicon Graphics movie file
  104. 4    string        moov        Apple QuickTime movie file (moov)
  105. 4    string        mdat        Apple QuickTime movie file (mdat)
  106.  
  107. #------------------------------------------------------------------------------
  108. # apl:  file(1) magic for APL (see also "pdp" and "vax" for other APL
  109. #       workspaces)
  110. #
  111. 0    long        0100554        APL workspace (Ken's original?)
  112.  
  113. #------------------------------------------------------------------------------
  114. # apple:  file(1) magic for Apple II file formats
  115. #
  116. 0    string        FiLeStArTfIlEsTaRt    binscii (apple ][) text
  117. 0    string        \x0aGL            Binary II (apple ][) data
  118. 0    string        \x76\xff        Squeezed (apple ][) data
  119. 0    string        SIT!            StuffIt (macintosh) text
  120. 0    string        NuFile            NuFile archive (apple ][) data
  121. 0    string        N\xf5F\xe9l\xe5        NuFile archive (apple ][) data
  122.  
  123. #------------------------------------------------------------------------------
  124. # archive:  file(1) magic for archive formats (see also "msdos" for self-
  125. #           extracting compressed archives)
  126. #
  127. # cpio, ar, arc, arj, hpack, lha/lharc, rar, squish, uc2, zip, zoo, etc.
  128. # pre-POSIX "tar" archives are handled in the C code.
  129.  
  130. # POSIX tar archives
  131. 257    string        ustar\0        POSIX tar archive
  132. 257    string        ustar\040\040\0    GNU tar archive
  133.  
  134. # cpio archives
  135. #
  136. # Yes, the top two "cpio archive" formats *are* supposed to just be "short".
  137. # The idea is to indicate archives produced on machines with the same
  138. # byte order as the machine running "file" with "cpio archive", and
  139. # to indicate archives produced on machines with the opposite byte order
  140. # from the machine running "file" with "byte-swapped cpio archive".
  141. #
  142. # The SVR4 "cpio(4)" hints that there are additional formats, but they
  143. # are defined as "short"s; I think all the new formats are
  144. # character-header formats and thus are strings, not numbers.
  145. 0    short        070707        cpio archive
  146. 0    short        0143561        byte-swapped cpio archive
  147. 0    string        070707        ASCII cpio archive (pre-SVR4 or odc)
  148. 0    string        070701        ASCII cpio archive (SVR4 with no CRC)
  149. 0    string        070702        ASCII cpio archive (SVR4 with CRC)
  150.  
  151. # other archives
  152. 0    long        0177555        very old archive
  153. 0    short        0177555        very old PDP-11 archive
  154. 0    long        0177545        old archive
  155. 0    short        0177545        old PDP-11 archive
  156. 0    long        0100554        apl workspace
  157. 0    string        =<ar>        archive
  158.  
  159. # MIPS archive (needs to go first)
  160. #
  161. 0    string    !<arch>\n__________E    MIPS archive
  162. >20    string    U            with MIPS Ucode members
  163. >21    string    L            with MIPSEL members
  164. >21    string    B            with MIPSEB members
  165. >19    string    L            and an EL hash table
  166. >19    string    B            and an EB hash table
  167. >22    string    X            -- out of date
  168.  
  169. 0    string        !<arch>        archive
  170. >8    string        __.SYMDEF    random library
  171. 0    string        -h-        Software Tools format archive text
  172.  
  173. #
  174. # XXX - why are there multiple <ar> thingies?  Note that 0x213c6172 is
  175. # "!<ar", so, for new-style (4.xBSD/SVR2andup) archives, we have:
  176. #
  177. # 0    string        !<arch>        current ar archive
  178. # 0    long        0x213c6172    archive file
  179. #
  180. # and for SVR3.1 archives, we have:
  181. #
  182. # 0    string        \<ar>        System V Release 1 ar archive
  183. # 0    string        =<ar>        archive
  184. # 0    string        =<ar>        archive
  185. #
  186. # XXX - did Aegis really store shared libraries, breakpointed modules,
  187. # and absolute code program modules in the same format as new-style
  188. # "ar" archives?
  189. #
  190. 0    string        !<arch>        current ar archive
  191. >8    string        __.SYMDEF    random library
  192. >8    string        debian-split    part of multipart Debian package
  193. >8    string        debian-binary    Debian binary package
  194. >0    belong        =65538        - pre SR9.5
  195. >0    belong        =65539        - post SR9.5
  196. >0    beshort        2        - object archive
  197. >0    beshort        3        - shared library module
  198. >0    beshort        4        - debug break-pointed module
  199. >0    beshort        5        - absolute code program module
  200. 0    string        \<ar>        System V Release 1 ar archive
  201. 0    string        =<ar>        archive
  202. #
  203. # XXX - from "vax", which appears to collect a bunch of byte-swapped
  204. # thingies, to help you recognize VAX files on big-endian machines;
  205. # with "leshort", "lelong", and "string", that's no longer necessary....
  206. #
  207. 0    belong        0x65ff0000    VAX 3.0 archive
  208. 0    belong        0x3c61723e    VAX 5.0 archive
  209. #
  210. 0    long        0x213c6172    archive file
  211. 0    lelong        0177555        very old VAX archive
  212. 0    leshort        0177555        very old PDP-11 archive
  213. #
  214. # XXX - "pdp" claims that 0177545 can have an __.SYMDEF member and thus
  215. # be a random library (it said 0xff65 rather than 0177545).
  216. #
  217. 0    lelong        0177545        old VAX archive
  218. >8    string        __.SYMDEF    random library
  219. 0    leshort        0177545        old PDP-11 archive
  220. >8    string        __.SYMDEF    random library
  221. #
  222. 0    string        =<ar>        archive
  223. #
  224. # From "pdp":
  225. #
  226. 0    lelong        0x39bed        PDP-11 old archive
  227. 0    lelong        0x39bee        PDP-11 4.0 archive
  228. #
  229. 0    string        -h-        Software Tools format archive text
  230.  
  231. # ARC archiver, from Daniel Quinlan (quinlan@yggdrasil.com)
  232. #
  233. # The first byte is the magic (0x1a), byte 2 is the compression type for
  234. # the first file (0x01 through 0x09), and bytes 3 to 15 are the MS-DOS
  235. # filename of the first file (null terminated).  Since some types collide
  236. # we only test some types on basis of frequency: 0x08 (83%), 0x09 (5%),
  237. # 0x02 (5%), 0x03 (3%), 0x04 (2%), 0x06 (2%).  0x01 collides with terminfo.
  238. 0    lelong&0x8080ffff    0x0000081a    ARC archive data, dynamic LZW
  239. 0    lelong&0x8080ffff    0x0000091a    ARC archive data, squashed
  240. 0    lelong&0x8080ffff    0x0000021a    ARC archive data, uncompressed
  241. 0    lelong&0x8080ffff    0x0000031a    ARC archive data, packed
  242. 0    lelong&0x8080ffff    0x0000041a    ARC archive data, squeezed
  243. 0    lelong&0x8080ffff    0x0000061a    ARC archive data, crunched
  244.  
  245. # Acorn archive formats (Disaster prone simpleton, m91dps@ecs.ox.ac.uk)
  246. # I can't create either SPARK or ArcFS archives so I have not tested this stuff
  247. # [GRR:  the original entries collide with ARC, above; replaced with combined
  248. #  version (not tested)]
  249. #0    byte        0x1a        RISC OS archive
  250. #>1    string        archive        (ArcFS format)
  251. 0    string        \032archive    RISC OS archive (ArcFS format)
  252.  
  253. # ARJ archiver (jason@jarthur.Claremont.EDU)
  254. 0    leshort        0xea60        ARJ archive data
  255. >5    byte        x        \b, v%d,
  256. >8    byte        &0x04        multi-volume,
  257. >8    byte        &0x10        slash-switched,
  258. >8    byte        &0x20        backup,
  259. >34    string        x        original name: %s,
  260. >7    byte        0        os: MS-DOS
  261. >7    byte        1        os: PRIMOS
  262. >7    byte        2        os: Unix
  263. >7    byte        3        os: Amiga
  264. >7    byte        4        os: Macintosh
  265. >7    byte        5        os: OS/2
  266. >7    byte        6        os: Apple ][ GS
  267. >7    byte        7        os: Atari ST
  268. >7    byte        8        os: NeXT
  269. >7    byte        9        os: VAX/VMS
  270. >3    byte        >0        %d]
  271.  
  272. # HA archiver (Greg Roelofs, newt@uchicago.edu)
  273. # This is a really bad format. A file containing HAWAII will match this...
  274. #0    string        HA        HA archive data,
  275. #>2    leshort        =1        1 file,
  276. #>2    leshort        >1        %u files,
  277. #>4    byte&0x0f    =0        first is type CPY
  278. #>4    byte&0x0f    =1        first is type ASC
  279. #>4    byte&0x0f    =2        first is type HSC
  280. #>4    byte&0x0f    =0x0e        first is type DIR
  281. #>4    byte&0x0f    =0x0f        first is type SPECIAL
  282.  
  283. # HPACK archiver (Peter Gutmann, pgut1@cs.aukuni.ac.nz)
  284. 0    string        HPAK        HPACK archive data
  285.  
  286. # JAM Archive volume format, by Dmitry.Kohmanyuk@UA.net
  287. 0    string        \351,\001JAM\        JAM archive,
  288. >7    string        >\0            version %.4s
  289. >0x26    byte        =0x27            -
  290. >>0x2b    string          >\0            label %.11s,
  291. >>0x27    lelong        x            serial %08x,
  292. >>0x36    string        >\0            fstype %.8s
  293.  
  294. # LHARC/LHA archiver (Greg Roelofs, newt@uchicago.edu)
  295. 2    string        -lh0-        LHarc 1.x archive data [lh0]
  296. 2    string        -lh1-        LHarc 1.x archive data [lh1]
  297. 2    string        -lz4-        LHarc 1.x archive data [lz4]
  298. 2    string        -lz5-        LHarc 1.x archive data [lz5]
  299. #    [never seen any but the last; -lh4- reported in comp.compression:]
  300. 2    string        -lzs-        LHa 2.x? archive data [lzs]
  301. 2    string        -lh -        LHa 2.x? archive data [lh ]
  302. 2    string        -lhd-        LHa 2.x? archive data [lhd]
  303. 2    string        -lh2-        LHa 2.x? archive data [lh2]
  304. 2    string        -lh3-        LHa 2.x? archive data [lh3]
  305. 2    string        -lh4-        LHa (2.x) archive data [lh4]
  306. 2    string        -lh5-        LHa (2.x) archive data [lh5]
  307. >20    byte        x        - header level %d
  308.  
  309. # RAR archiver (Greg Roelofs, newt@uchicago.edu)
  310. 0    string        Rar!        RAR archive data
  311.  
  312. # SQUISH archiver (Greg Roelofs, newt@uchicago.edu)
  313. 0    string        SQSH        squished archive data (Acorn RISCOS)
  314.  
  315. # UC2 archiver (Greg Roelofs, newt@uchicago.edu)
  316. # I can't figure out the self-extracting form of these buggers...
  317. 0    string        UC2\x1a        UC2 archive data
  318.  
  319. # ZIP archives (Greg Roelofs, c/o zip-bugs@wkuvx1.wku.edu)
  320. 0    string        PK\003\004    Zip archive data
  321. >4    byte        0x09        \b, at least v0.9 to extract
  322. >4    byte        0x0a        \b, at least v1.0 to extract
  323. >4    byte        0x0b        \b, at least v1.1 to extract
  324. >4    byte        0x14        \b, at least v2.0 to extract
  325.  
  326. # Zoo archiver
  327. 20    lelong        0xfdc4a7dc    Zoo archive data
  328. >4    byte        >48        \b, v%c.
  329. >>6    byte        >47        \b%c
  330. >>>7    byte        >47        \b%c
  331. >32    byte        >0        \b, modify: v%d
  332. >>33    byte        x        \b.%d+
  333. >42    lelong        0xfdc4a7dc    \b,
  334. >>70    byte        >0        extract: v%d
  335. >>>71    byte        x        \b.%d+
  336.  
  337. # Shell archives
  338. 10    string        #\ This\ is\ a\ shell\ archive    shell archive text
  339.  
  340. #------------------------------------------------------------------------------
  341. # att3b:  file(1) magic for AT&T 3B machines
  342. #
  343. # The `versions' should be un-commented if they work for you.
  344. # (Was the problem just one of endianness?)
  345. #
  346. # 3B20
  347. #
  348. 0    beshort        0550        3b20 COFF executable
  349. >12    belong        >0        not stripped
  350. #>22    beshort        >0        - version %ld
  351. 0    beshort        0551        3b20 COFF executable (TV)
  352. >12    belong        >0        not stripped
  353. #>22    beshort        >0        - version %ld
  354. #
  355. # WE32K
  356. #
  357. 0    beshort        0560        WE32000 COFF
  358. >18    beshort        ^00000020    object
  359. >18    beshort        &00000020    executable
  360. >12    belong        >0        not stripped
  361. >18    beshort        ^00010000    N/A on 3b2/300 w/paging
  362. >18    beshort        &00020000    32100 required
  363. >18    beshort        &00040000    and MAU hardware required
  364. >20    beshort        0407        (impure)
  365. >20    beshort        0410        (pure)
  366. >20    beshort        0413        (demand paged)
  367. >20    beshort        0443        (target shared library)
  368. >22    beshort        >0        - version %ld
  369. 0    beshort        0561        WE32000 COFF executable (TV)
  370. >12    belong        >0        not stripped
  371. #>18    beshort        &00020000    - 32100 required
  372. #>18    beshort        &00040000    and MAU hardware required
  373. #>22    beshort        >0        - version %ld
  374. #
  375. # core file for 3b2 
  376. 0    string        \000\004\036\212\200    3b2 core file
  377. >364    string        >\0        of '%s'
  378.  
  379. #------------------------------------------------------------------------------
  380. # audio:  file(1) magic for sound formats (see also "iff")
  381. #
  382. # Jan Nicolai Langfeldt (janl@ifi.uio.no), Dan Quinlan (quinlan@yggdrasil.com),
  383. # and others
  384. #
  385.  
  386. # Sun/NeXT audio data
  387. 0    string        .snd        Sun/NeXT audio data:
  388. >12    belong        1        8-bit ISDN u-law,
  389. >12    belong        2        8-bit linear PCM [REF-PCM],
  390. >12    belong        3        16-bit linear PCM,
  391. >12    belong        4        24-bit linear PCM,
  392. >12    belong        5        32-bit linear PCM,
  393. >12    belong        6        32-bit IEEE floating point,
  394. >12    belong        7        64-bit IEEE floating point,
  395. >12    belong        23        8-bit ISDN u-law compressed (CCITT G.721 ADPCM voice data encoding),
  396. >20    belong        1        mono,
  397. >20    belong        2        stereo,
  398. >20    belong        4        quad,
  399. >16    belong        >0        %d Hz
  400.  
  401. # DEC systems (e.g. DECstation 5000) use a variant of the Sun/NeXT format
  402. # that uses little-endian encoding and has a different magic number
  403. 0    lelong        0x0064732E    DEC audio data:
  404. >12    lelong        1        8-bit ISDN u-law,
  405. >12    lelong        2        8-bit linear PCM [REF-PCM],
  406. >12    lelong        3        16-bit linear PCM,
  407. >12    lelong        4        24-bit linear PCM,
  408. >12    lelong        5        32-bit linear PCM,
  409. >12    lelong        6        32-bit IEEE floating point,
  410. >12    lelong        7        64-bit IEEE floating point,
  411. >12    lelong        23        8-bit ISDN u-law compressed (CCITT G.721 ADPCM voice data encoding),
  412. >20    lelong        1        mono,
  413. >20    lelong        2        stereo,
  414. >20    lelong        4        quad,
  415. >16    lelong        >0        %d Hz
  416.  
  417. # Creative Labs AUDIO stuff
  418. 0    string    MThd            Standard MIDI data
  419. >9     byte    >0            (format %d)
  420. >11    byte    >1            using %d channels
  421. 0    string    CTMF            Creative Music (CMF) data
  422. 0    string    SBI            SoundBlaster instrument data
  423. 0    string    Creative\ Voice\ File    Creative Labs voice data
  424. # is this next line right?  it came this way...
  425. >19    byte    0x1A
  426. >23    byte    >0            - version %d
  427. >22    byte    >0            \b.%d
  428.  
  429. # first entry is also the string "NTRK"
  430. 0    belong        0x4e54524b    MultiTrack sound data
  431. >4    belong        x        - version %ld
  432.  
  433. # Microsoft WAVE format (*.wav)
  434. # [GRR 950115:  probably all of the shorts and longs should be leshort/lelong]
  435. 0    string        RIFF        Microsoft RIFF
  436. >8    string        WAVE        \b, WAVE audio data
  437. >>34    short        >0        \b, %d bit
  438. >>22    short        =1        \b, mono
  439. >>22    short        =2        \b, stereo
  440. >>22    short        >2        \b, %d channels
  441. >>24    long        >0        %d Hz
  442. # AVI == Audio Video Interleave
  443. >8      string          AVI\            \b, AVI data
  444.  
  445. # Extended MOD format (*.emd) (Greg Roelofs, newt@uchicago.edu); NOT TESTED
  446. # [based on posting 940824 by "Dirk/Elastik", husberg@lehtori.cc.tut.fi]
  447. 0    string        EMOD        Extended MOD sound data,
  448. >4    byte&0xf0    x        version %d
  449. >4    byte&0x0f    x        \b.%d,
  450. >45    byte        x        %d instruments
  451. >83    byte        0        (module)
  452. >83    byte        1        (song)
  453.  
  454. # Real Audio (Magic .ra\0375)
  455. 0    belong        0x2e7261fd    realaudio sound file
  456.  
  457. # Real Audio (Magic .ra\0375)
  458. 0    belong        0x2e7261fd    realaudio sound file
  459.  
  460. # MTM/669/FAR/S3M/ULT/XM format checking [Aaron Eppert, aeppert@dialin.ind.net]
  461. # Oct 31, 1995
  462. 0    string        MTM        MultiTracker Module sound file
  463. 0    string        if        Composer 669 Module sound data
  464. 0    string        FAR        Module sound data
  465. 0    string        MAS_U        ULT(imate) Module sound data
  466. 0x2c    string        SCRM        ScreamTracker III Module sound data
  467. 0    string        Extended Module    Extended Module sound data
  468.  
  469. #------------------------------------------------------------------------------
  470. # blit:  file(1) magic for 68K Blit stuff as seen from 680x0 machine
  471. #
  472. # Note that this 0407 conflicts with several other a.out formats...
  473. #
  474. # XXX - should this be redone with "be" and "le", so that it works on
  475. # little-endian machines as well?  If so, what's the deal with
  476. # "VAX-order" and "VAX-order2"?
  477. #
  478. #0    long        0407        68K Blit (standalone) executable
  479. #0    short        0407        VAX-order2 68K Blit (standalone) executable
  480. 0    short        03401        VAX-order 68K Blit (standalone) executable
  481. 0    long        0406        68k Blit mpx/mux executable
  482. 0    short        0406        VAX-order2 68k Blit mpx/mux executable
  483. 0    short        03001        VAX-order 68k Blit mpx/mux executable
  484. # Need more values for WE32 DMD executables.
  485. # Note that 0520 is the same as COFF
  486. #0    short        0520        tty630 layers executable
  487.  
  488. #------------------------------------------------------------------------------
  489. # c-lang:  file(1) magic for C programs (or REXX)
  490. #
  491.  
  492. # XPM icons (Greg Roelofs, newt@uchicago.edu)
  493. # if you uncomment "/*" for C/REXX below, also uncomment this entry
  494. #0    string        /*\ XPM\ */    X pixmap image data
  495.  
  496. # this first will upset you if you're a PL/1 shop...
  497. # in which case rm it; ascmagic will catch real C programs
  498. #0    string        /*        C or REXX program text
  499. 0    string        //        C++ program text
  500.  
  501. #------------------------------------------------------------------------------
  502. # chi:  file(1) magic for ChiWriter files
  503. #
  504. 0       string          \\1cw\          ChiWriter file
  505. >5      string          >\0             version %s
  506. 0       string          \\1cw           ChiWriter file
  507.  
  508. #------------------------------------------------------------------------------
  509. # clipper:  file(1) magic for Intergraph (formerly Fairchild) Clipper.
  510. #
  511. # XXX - what byte order does the Clipper use?
  512. #
  513. # XXX - what's the "!" stuff:
  514. #
  515. # >18    short        !074000,000000    C1 R1 
  516. # >18    short        !074000,004000    C2 R1
  517. # >18    short        !074000,010000    C3 R1
  518. # >18    short        !074000,074000    TEST
  519. #
  520. # I shall assume it's ANDing the field with the first value and
  521. # comparing it with the second, and rewrite it as:
  522. #
  523. # >18    short&074000    000000        C1 R1 
  524. # >18    short&074000    004000        C2 R1
  525. # >18    short&074000    010000        C3 R1
  526. # >18    short&074000    074000        TEST
  527. #
  528. # as SVR3.1's "file" doesn't support anything of the "!074000,000000"
  529. # sort, nor does SunOS 4.x, so either it's something Intergraph added
  530. # in CLIX, or something AT&T added in SVR3.2 or later, or something
  531. # somebody else thought was a good idea; it's not documented in the
  532. # man page for this version of "magic", nor does it appear to be
  533. # implemented (at least not after I blew off the bogus code to turn
  534. # old-style "&"s into new-style "&"s, which just didn't work at all).
  535. #
  536. 0    short        0575        CLIPPER COFF executable (VAX #)
  537. >20    short        0407        (impure)
  538. >20    short        0410        (5.2 compatible)
  539. >20    short        0411        (pure)
  540. >20    short        0413        (demand paged)
  541. >20    short        0443        (target shared library)
  542. >12    long        >0        not stripped
  543. >22    short        >0        - version %ld
  544. 0    short        0577        CLIPPER COFF executable
  545. >18    short&074000    000000        C1 R1 
  546. >18    short&074000    004000        C2 R1
  547. >18    short&074000    010000        C3 R1
  548. >18    short&074000    074000        TEST
  549. >20    short        0407        (impure)
  550. >20    short        0410        (pure)
  551. >20    short        0411        (separate I&D)
  552. >20    short        0413        (paged)
  553. >20    short        0443        (target shared library)
  554. >12    long        >0        not stripped
  555. >22    short        >0        - version %ld
  556. >48    long&01        01        alignment trap enabled
  557. >52    byte        1        -Ctnc
  558. >52    byte        2        -Ctsw
  559. >52    byte        3        -Ctpw
  560. >52    byte        4        -Ctcb
  561. >53    byte        1        -Cdnc
  562. >53    byte        2        -Cdsw
  563. >53    byte        3        -Cdpw
  564. >53    byte        4        -Cdcb
  565. >54    byte        1        -Csnc
  566. >54    byte        2        -Cssw
  567. >54    byte        3        -Cspw
  568. >54    byte        4        -Cscb
  569. 4    string        pipe        CLIPPER instruction trace
  570. 4    string        prof        CLIPPER instruction profile
  571.  
  572. #------------------------------------------------------------------------------
  573. # commands:  file(1) magic for various shells and interpreters
  574. #
  575. 0    string        :\ shell archive or commands for antique kernel text
  576. 0    string        #!/bin/sh        Bourne shell script text
  577. 0    string        #!\ /bin/sh        Bourne shell script text
  578. 0    string        #!/bin/csh        C shell script text
  579. 0    string        #!\ /bin/csh        C shell script text
  580. # korn shell magic, sent by George Wu, gwu@clyde.att.com
  581. 0    string        #!/bin/ksh        Korn shell script text
  582. 0    string        #!\ /bin/ksh        Korn shell script text
  583. 0    string         #!/bin/tcsh        Tenex C shell script text
  584. 0    string         #!\ /bin/tcsh        Tenex C shell script text
  585. 0    string        #!/usr/local/tcsh    Tenex C shell script text
  586. 0    string         #!\ /usr/local/tcsh    Tenex C shell script text
  587. 0    string        #!/usr/local/bin/tcsh    Tenex C shell script text
  588. 0    string        #!\ /usr/local/bin/tcsh    Tenex C shell script text
  589. #
  590. # zsh/ash/ae/nawk/gawk magic from cameron@cs.unsw.oz.au (Cameron Simpson)
  591. 0    string        #!/usr/local/bin/zsh    Paul Falstad's zsh
  592. 0    string        #!\ /usr/local/bin/zsh    Paul Falstad's zsh
  593. 0    string        #!/usr/local/bin/ash    Neil Brown's ash
  594. 0    string        #!\ /usr/local/bin/ash    Neil Brown's ash
  595. 0    string        #!/usr/local/bin/ae    Neil Brown's ae
  596. 0    string        #!\ /usr/local/bin/ae    Neil Brown's ae
  597. 0    string        #!/bin/nawk        new awk script text
  598. 0    string        #!\ /bin/nawk        new awk script text
  599. 0    string        #!/usr/bin/nawk        new awk script text
  600. 0    string        #!\ /usr/bin/nawk    new awk script text
  601. 0    string        #!/usr/local/bin/nawk    new awk script text
  602. 0    string        #!\ /usr/local/bin/nawk    new awk script text
  603. 0    string        #!/bin/gawk        GNU awk script text
  604. 0    string        #!\ /bin/gawk        GNU awk script text
  605. 0    string        #!/usr/bin/gawk        GNU awk script text
  606. 0    string        #!\ /usr/bin/gawk    GNU awk script text
  607. 0    string        #!/usr/local/bin/gawk    GNU awk script text
  608. 0    string        #!\ /usr/local/bin/gawk    GNU awk script text
  609. #
  610. 0    string        #!/bin/awk        awk commands text
  611. 0    string        #!\ /bin/awk        awk commands text
  612. 0    string        #!/usr/bin/awk        awk commands text
  613. 0    string        #!\ /usr/bin/awk    awk commands text
  614. 0    string        BEGIN            awk commands text
  615.  
  616. # For Larry Wall's perl language.  The ``eval'' line recognizes an
  617. # outrageously clever hack for USG systems.
  618. #                Keith Waclena <keith@cerberus.uchicago.edu>
  619. 0    string        #!/bin/perl            perl commands text
  620. 0    string        #!\ /bin/perl            perl commands text
  621. 0    string        eval\ "exec\ /bin/perl        perl commands text
  622. 0    string        #!/usr/bin/perl            perl commands text
  623. 0    string        #!\ /usr/bin/perl        perl commands text
  624. 0    string        eval\ "exec\ /usr/bin/perl    perl commands text
  625. 0    string        #!/usr/local/bin/perl        perl commands text
  626. 0    string        #!\ /usr/local/bin/perl        perl commands text
  627. 0    string        eval\ "exec\ /usr/local/bin/perl    perl commands text
  628.  
  629. # AT&T Bell Labs' Plan 9 shell
  630. 0    string        #!/bin/rc    Plan 9 rc shell script text
  631. 0    string        #!\ /bin/rc    Plan 9 rc shell script text
  632.  
  633. # bash shell magic, from Peter Tobias (tobias@server.et-inf.fho-emden.de)
  634. 0    string        #!/bin/bash    Bourne-Again shell script text
  635. 0    string        #!\ /bin/bash    Bourne-Again shell script text
  636. 0    string        #!/usr/local/bin/bash    Bourne-Again shell script text
  637. 0    string        #!\ /usr/local/bin/bash    Bourne-Again shell script text
  638.  
  639. # generic shell magic
  640. 0    string        #!\ /            a
  641. >3    string        >\0            %s script text
  642. 0    string        #!/            a
  643. >2    string        >\0            %s script text
  644. 0    string        #!\             commands text
  645. >3    string        >\0            for %s
  646.  
  647. #------------------------------------------------------------------------------
  648. # compress:  file(1) magic for pure-compression formats (no archives)
  649. #
  650. # compress, gzip, pack, compact, huf, squeeze, crunch, freeze, yabba, etc.
  651. #
  652. # Formats for various forms of compressed data
  653. # Formats for "compress" proper have been moved into "compress.c",
  654. # because it tries to uncompress it to figure out what's inside.
  655.  
  656. # standard unix compress
  657. 0    string        \037\235    compress'd data
  658. >2    byte&0x80    >0        block compressed
  659. >2    byte&0x1f    x        %d bits
  660.  
  661. # gzip (GNU zip, not to be confused with Info-ZIP or PKWARE zip archiver)
  662. 0       string          \037\213        gzip compressed data
  663. >2      byte            <8              \b, reserved method,
  664. >2      byte            8               \b, deflated,
  665. >3    byte        &0x01        ASCII,
  666. >3    byte        &0x02        continuation,
  667. >3    byte        &0x04        extra field,
  668. >3    byte        &0x08        original filename,
  669. >3    byte        &0x10        comment,
  670. >3    byte        &0x20        encrypted,
  671. >4    ledate        x        last modified: %s,
  672. >8    byte        2        max compression,
  673. >8    byte        4        max speed,
  674. >9    byte        =0x00        os: MS-DOS
  675. >9    byte        =0x01        os: Amiga
  676. >9    byte        =0x02        os: VMS
  677. >9    byte        =0x03        os: Unix
  678. >9    byte        =0x05        os: Atari
  679. >9    byte        =0x06        os: OS/2
  680. >9    byte        =0x07        os: MacOS
  681. >9    byte        =0x0A        os: Tops/20
  682. >9    byte        =0x0B        os: Win/32
  683.  
  684. # packed data, Huffman (minimum redundancy) codes on a byte-by-byte basis
  685. 0    string        \037\036    packed data
  686. >2    belong        >1        \b, %d characters originally
  687. >2    belong        =1        \b, %d character originally
  688. #
  689. # This magic number is byte-order-independent.  XXX - Does that mean this
  690. # is big-endian, little-endian, either, or that you can't tell?
  691. # this short is valid for SunOS
  692. 0    short        017437        old packed data
  693.  
  694. # XXX - why *two* entries for "compacted data", one of which is
  695. # byte-order independent, and one of which is byte-order dependent?
  696. #
  697. 0    short        0x1fff        compacted data
  698. # This string is valid for SunOS (BE) and a matching "short" is listed
  699. # in the Ultrix (LE) magic file.
  700. 0    string        \377\037    compacted data
  701. 0    short        0145405        huf output
  702.  
  703. # Squeeze and Crunch...
  704. # These numbers were gleaned from the Unix versions of the programs to
  705. # handle these formats.  Note that I can only uncrunch, not crunch, and
  706. # I didn't have a crunched file handy, so the crunch number is untested.
  707. #                Keith Waclena <keith@cerberus.uchicago.edu>
  708. 0    leshort        0x76FF        squeezed data (CP/M, DOS)
  709. 0    leshort        0x76FE        crunched data (CP/M, DOS)
  710.  
  711. # Freeze
  712. 0    string        \037\237    frozen file 2.1
  713. 0    string        \037\236    frozen file 1.0 (or gzip 0.5)
  714.  
  715. # SCO compress -H (LZH)
  716. 0    string        \037\240    SCO compress -H (LZH) data
  717.  
  718. # European GSM 06.10 is a provisional standard for full-rate speech
  719. # transcoding, prI-ETS 300 036, which uses RPE/LTP (residual pulse
  720. # excitation/long term prediction) coding at 13 kbit/s.
  721. #
  722. # There's only a magic nibble (4 bits); that nibble repeats every 33
  723. # bytes.  This isn't suited for use, but maybe we can use it someday.
  724. #
  725. # This will cause very short GSM files to be declared as data and
  726. # mismatches to be declared as data too!
  727. #0    byte&0xF0    0xd0    data
  728. #>33    byte&0xF0    0xd0
  729. #>66    byte&0xF0    0xd0
  730. #>99    byte&0xF0    0xd0
  731. #>132    byte&0xF0    0xd0    GSM 06.10 compressed audio
  732.  
  733. #------------------------------------------------------------------------------
  734. # convex:  file(1) magic for Convex boxes
  735. #
  736. # Convexes are big-endian.
  737. #
  738. 0    long        0513        Convex executable
  739.  
  740. #------------------------------------------------------------------------------
  741. # database:  file(1) magic for various databases
  742. #
  743. # extracted from header/code files by Graeme Wilford (eep2gw@ee.surrey.ac.uk)
  744. #
  745. #
  746. # GDBM magic numbers
  747. #  Will be maintained as part of the GDBM distribution in the future.
  748. #  <downsj@teeny.org>
  749. 0    belong    0x13579ace    GNU dbm 1.x or ndbm database, big endian
  750. 0    lelong    0x13579ace    GNU dbm 1.x or ndbm database, little endian
  751. 0    string    GDBM        GNU dbm 2.x database
  752. #
  753. 0    belong    0x061561    Berkeley DB Hash file
  754. >4    belong    >0        (Version %d,
  755. >8    belong    1234        Little Endian,
  756. >8    belong    4321        Big Endian,
  757. >12    belong    x        Bucket Size %d,
  758. >16    belong    x        Directory Size %d,
  759. >20    belong    x        Segment Size %d,
  760. >24    belong    x        Segment Shift %d,
  761. >28    belong    x        Overflow Point %d,
  762. >32    belong    x        Last Freed %d,
  763. >36    belong    x        Max Bucket %d,
  764. >40    belong    x        High Mask 0x%x,
  765. >44    belong    x        Low Mask 0x%x,
  766. >48    belong    x        Fill Factor %d,
  767. >52    belong    x        Number of Keys %d)
  768. #
  769. 0    belong    0x053162    Berkeley DB Btree file
  770. >4    belong    >0        (Version %d,
  771. >8    belong    x        Page Size %d,
  772. >12    belong    x        Free Page %d,
  773. >16    belong    x        Number of Records %d,
  774. >20    belong    x        Flags 0x%x)
  775.  
  776. #------------------------------------------------------------------------------
  777. # diamond:  file(1) magic for Diamond system
  778. #
  779. # ... diamond is a multi-media mail and electronic conferencing system....
  780. #
  781. # XXX - I think it was either renamed Slate, or replaced by Slate....
  782. #
  783. #    The full deal is too long...
  784. #0    string    <list>\n<protocol\ bbn-multimedia-format>    Diamond Multimedia Document
  785. 0    string    =<list>\n<protocol\ bbn-m    Diamond Multimedia Document
  786.  
  787. #------------------------------------------------------------------------------
  788. # diff:  file(1) magic for diff(1) output
  789. #
  790. 0    string        diff\     'diff' output text
  791. 0    string        ***\         'diff' output text
  792. 0    string        Only\ in\     'diff' output text
  793. 0    string        Common\ subdirectories:\     'diff' output text
  794.  
  795. #------------------------------------------------------------------------------
  796. # dump:  file(1) magic for dump file format--for new and old dump filesystems
  797. #
  798. # We specify both byte orders in order to recognize byte-swapped dumps.
  799. #
  800. 24    belong    60012        new-fs dump file (big endian),
  801. >4    bedate    x        Previous dump %s,
  802. >8    bedate    x        This dump %s,
  803. >12    belong    >0        Volume %ld,
  804. >692    belong    0        Level zero, type:
  805. >692    belong    >0        Level %d, type:
  806. >0    belong    1        tape header,
  807. >0    belong    2        beginning of file record,
  808. >0    belong    3        map of inodes on tape,
  809. >0    belong    4        continuation of file record,
  810. >0    belong    5        end of volume,
  811. >0    belong    6        map of inodes deleted,
  812. >0    belong    7        end of medium (for floppy),
  813. >676    string    >\0        Label %s,
  814. >696    string    >\0        Filesystem %s,
  815. >760    string    >\0        Device %s,
  816. >824    string    >\0        Host %s,
  817. >888    belong    >0        Flags %x
  818.  
  819. 24    belong    60011        old-fs dump file (big endian),
  820. #>4    bedate    x        Previous dump %s,
  821. #>8    bedate    x        This dump %s,
  822. >12    belong    >0        Volume %ld,
  823. >692    belong    0        Level zero, type:
  824. >692    belong    >0        Level %d, type:
  825. >0    belong    1        tape header,
  826. >0    belong    2        beginning of file record,
  827. >0    belong    3        map of inodes on tape,
  828. >0    belong    4        continuation of file record,
  829. >0    belong    5        end of volume,
  830. >0    belong    6        map of inodes deleted,
  831. >0    belong    7        end of medium (for floppy),
  832. >676    string    >\0        Label %s,
  833. >696    string    >\0        Filesystem %s,
  834. >760    string    >\0        Device %s,
  835. >824    string    >\0        Host %s,
  836. >888    belong    >0        Flags %x
  837.  
  838. 24    lelong    60012        new-fs dump file (little endian),
  839. >4    ledate    x        Previous dump %s,
  840. >8    ledate    x        This dump %s,
  841. >12    lelong    >0        Volume %ld,
  842. >692    lelong    0        Level zero, type:
  843. >692    lelong    >0        Level %d, type:
  844. >0    lelong    1        tape header,
  845. >0    lelong    2        beginning of file record,
  846. >0    lelong    3        map of inodes on tape,
  847. >0    lelong    4        continuation of file record,
  848. >0    lelong    5        end of volume,
  849. >0    lelong    6        map of inodes deleted,
  850. >0    lelong    7        end of medium (for floppy),
  851. >676    string    >\0        Label %s,
  852. >696    string    >\0        Filesystem %s,
  853. >760    string    >\0        Device %s,
  854. >824    string    >\0        Host %s,
  855. >888    lelong    >0        Flags %x
  856.  
  857. 24    lelong    60011        old-fs dump file (little endian),
  858. #>4    ledate    x        Previous dump %s,
  859. #>8    ledate    x        This dump %s,
  860. >12    lelong    >0        Volume %ld,
  861. >692    lelong    0        Level zero, type:
  862. >692    lelong    >0        Level %d, type:
  863. >0    lelong    1        tape header,
  864. >0    lelong    2        beginning of file record,
  865. >0    lelong    3        map of inodes on tape,
  866. >0    lelong    4        continuation of file record,
  867. >0    lelong    5        end of volume,
  868. >0    lelong    6        map of inodes deleted,
  869. >0    lelong    7        end of medium (for floppy),
  870. >676    string    >\0        Label %s,
  871. >696    string    >\0        Filesystem %s,
  872. >760    string    >\0        Device %s,
  873. >824    string    >\0        Host %s,
  874. >888    lelong    >0        Flags %x
  875.  
  876. #------------------------------------------------------------------------------
  877. # elf:  file(1) magic for ELF executables
  878. #
  879. # We have to check the byte order flag to see what byte order all the
  880. # other stuff in the header is in.
  881. #
  882. # Byte order is probably big-endian for MIPS RS3000 and Amdahl.
  883. # MIPS RS3000 may also be for MIPS RS2000.
  884. #
  885. # updated by Daniel Quinlan (quinlan@yggdrasil.com)
  886. 0    string        \177ELF        ELF
  887. >4    byte        0        invalid class
  888. >4    byte        1        32-bit
  889. >4    byte        2        64-bit
  890. >5    byte        0        invalid byte order
  891. >5    byte        1        LSB
  892. >>16    leshort        0        no file type,
  893. >>16    leshort        1        relocatable,
  894. >>16    leshort        2        executable,
  895. >>16    leshort        3        shared object,
  896. # Core handling from Peter Tobias <tobias@server.et-inf.fho-emden.de>
  897. >>16    leshort        4        core file
  898. >>>576  string          >\0             of '%s'
  899. >>>400  lelong          >0              (signal %d),
  900. >>16    leshort        &0xff00        processor-specific,
  901. >>18    leshort        0        no machine,
  902. >>18    leshort        1        AT&T WE32100 - invalid byte order,
  903. >>18    leshort        2        SPARC - invalid byte order,
  904. >>18    leshort        3        Intel 80386,
  905. >>18    leshort        4        Motorola 68000 - invalid byte order,
  906. >>18    leshort        5        Motorola 88000 - invalid byte order,
  907. >>18    leshort        6        Intel 80486,
  908. >>18    leshort        7        Intel 80860,
  909. >>18    leshort        8        MIPS RS3000,
  910. >>18    leshort        9        Amdahl,
  911. >>20    lelong        0        invalid version
  912. >>20    lelong        1        version 1
  913. >>36    lelong        1        MathCoPro/FPU/MAU Required
  914. >5    byte        2        MSB
  915. >>16    beshort        0        no file type,
  916. >>16    beshort        1        relocatable,
  917. >>16    beshort        2        executable,
  918. >>16    beshort        3        shared object,
  919. >>16    beshort        4        core file,
  920. >>>576    string        >\0        of '%s'
  921. >>>400    lelong        >0        (signal %d),
  922. >>16    beshort        &0xff00        processor-specific,
  923. >>18    beshort        0        no machine,
  924. >>18    beshort        1        AT&T WE32100,
  925. >>18    beshort        2        SPARC,
  926. >>18    beshort        3        Intel 80386 - invalid byte order,
  927. >>18    beshort        4        Motorola 68000,
  928. >>18    beshort        5        Motorola 88000,
  929. >>18    beshort        6        Intel 80486 - invalid byte order,
  930. >>18    beshort        7        Intel 80860,
  931. >>18    beshort        8        MIPS RS3000,
  932. >>18    leshort        9        Amdahl,
  933. >>20    belong        0        invalid version
  934. >>20    belong        1        version 1
  935. >>36    belong        1        MathCoPro/FPU/MAU Required
  936.  
  937. #------------------------------------------------------------------------------
  938. # encore:  file(1) magic for Encore machines
  939. #
  940. # XXX - needs to have the byte order specified (NS32K was little-endian,
  941. # dunno whether they run the 88K in little-endian mode or not).
  942. #
  943. 0    short        0x154        Encore
  944. >20    short        0x107        executable
  945. >20    short        0x108        pure executable
  946. >20    short        0x10b        demand-paged executable
  947. >20    short        0x10f        unsupported executable
  948. >12    long        >0        not stripped
  949. >22    short        >0        - version %ld
  950. >22    short        0        -
  951. #>4    date        x        stamp %s
  952. 0    short        0x155        Encore unsupported executable
  953. >12    long        >0        not stripped
  954. >22    short        >0        - version %ld
  955. >22    short        0        -
  956. #>4    date        x        stamp %s
  957.  
  958. #------------------------------------------------------------------------------
  959. # filesystems:  file(1) magic for different filesystems
  960. #
  961. 0x438    leshort    0xEF53            Linux/i386 ext2 filesystem
  962. 0    string    \366\366\366\366    PC formatted floppy with no filesystem
  963.  
  964. #------------------------------------------------------------------------------
  965. # fonts:  file(1) magic for font data
  966. #
  967. 0    string        FONT        ASCII vfont text
  968. 0    short        0436        Berkeley vfont data
  969. 0    short        017001        byte-swapped Berkeley vfont data
  970.  
  971. # PostScript fonts (must precede "printer" entries), quinlan@yggdrasil.com
  972. 0    string        %!PS-AdobeFont-1.0    PostScript Type 1 font text
  973. >20    string        >\0            (%s)
  974. 6    string        %!PS-AdobeFont-1.0    PostScript Type 1 font program data
  975.  
  976. # X11 font files in SNF (Server Natural Format) format
  977. 0    belong        00000004        X11 SNF font data, MSB first
  978. 0    lelong        00000004        X11 SNF font data, LSB first
  979.  
  980. # X11 Bitmap Distribution Format, from Daniel Quinlan (quinlan@yggdrasil.com)
  981. 0    string        STARTFONT\040        X11 BDF font text
  982.  
  983. # X11 fonts, from Daniel Quinlan (quinlan@yggdrasil.com)
  984. # PCF must come before SGI additions ("MIPSEL MIPS-II COFF" collides)
  985. 0    string        \001fcp            X11 Portable Compiled Font data
  986. >12    byte        0x02            \b, LSB first
  987. >12    byte        0x0a            \b, MSB first
  988. 0    string        D1.0\015        X11 Speedo font data
  989.  
  990. #------------------------------------------------------------------------------
  991. # frame:  file(1) magic for FrameMaker files
  992. #
  993. # This stuff came on a FrameMaker demo tape, most of which is
  994. # copyright, but this file is "published" as witness the following:
  995. #
  996. 0    string        \<MakerFile    FrameMaker document
  997. >11    string        4.0         (4.0
  998. >11    string        3.0         (3.0
  999. >11    string        2.0         (2.0
  1000. >11    string        1.0         (1.0
  1001. >14    byte        x          %c)
  1002. 0    string        \<MIFFile    FrameMaker MIF (ASCII) file
  1003. >9    string        4.0         (4.0)
  1004. >9    string        3.0         (3.0)
  1005. >9    string        2.0         (2.0)
  1006. >9    string        1.0         (1.x)
  1007. 0    string        \<MakerDictionary    FrameMaker Dictionary text
  1008. >17    string        3.0         (3.0)
  1009. >17    string        2.0         (2.0)
  1010. >17    string        1.0         (1.x)
  1011. 0    string        \<MakerScreenFont    FrameMaker Font file
  1012. >17    string        1.01         (%s)
  1013. 0    string        \<MML        FrameMaker MML file
  1014. 0    string        \<BookFile    FrameMaker Book file
  1015. >10    string        3.0         (3.0
  1016. >10    string        2.0         (2.0
  1017. >10    string        1.0         (1.0
  1018. >13    byte        x          %c)
  1019. # XXX - this book entry should be verified, if you find one, uncomment this
  1020. #0    string        \<Book\     FrameMaker Book (ASCII) file
  1021. #>6    string        3.0         (3.0)
  1022. #>6    string        2.0         (2.0)
  1023. #>6    string        1.0         (1.0)
  1024. 0    string        \<Maker    Intermediate Print File    FrameMaker IPL file
  1025.  
  1026. #------------------------------------------------------------------------------
  1027. # hp:  file(1) magic for Hewlett Packard machines (see also "printer")
  1028. #
  1029. # XXX - somebody should figure out whether any byte order needs to be
  1030. # applied to the "TML" stuff; I'm assuming the Apollo stuff is
  1031. # big-endian as it was mostly 68K-based.
  1032. #
  1033. # HP-PA is big-endian, so it (and "800", which is *also* HP-PA-based; I
  1034. # assume "HPPA-RISC1.1" really means "HP-PA Version 1.1", which first
  1035. # showed up in the 700 series, although later 800 series machines are,
  1036. # I think, based on the PA7100 which implements HP-PA 1.1) are flagged
  1037. # as big-endian.
  1038. #
  1039. # I think the 500 series was the old stack-based machines, running a
  1040. # UNIX environment atop the "SUN kernel"; dunno whether it was
  1041. # big-endian or little-endian.
  1042. #
  1043. # Daniel Quinlan (quinlan@yggdrasil.com): hp200 machines are 68010 based;
  1044. # hp300 are 68020+68881 based; hp400 are also 68k.  The following basic
  1045. # HP magic is useful for reference, but using "long" magic is a better
  1046. # practice in order to avoid collisions.
  1047. #
  1048. # 0    beshort        200        hp200 (68010) BSD binary
  1049. # 0    beshort        300        hp300 (68020+68881) BSD binary
  1050. # 0    beshort        0x20c        hp200/300 HP-UX binary
  1051. # 0    beshort        0x20b        hp800 HP-UX binary
  1052.  
  1053. #
  1054. # The "misc" stuff needs a byte order; the archives look suspiciously
  1055. # like the old 177545 archives (0xff65 = 0177545).
  1056. #
  1057. #### Old Apollo stuff
  1058. 0    beshort        0627        Apollo m68k COFF executable
  1059. >18    beshort        ^040000        not stripped
  1060. >22    beshort        >0        - version %ld
  1061. 0    beshort        0624        apollo a88k COFF executable
  1062. >18    beshort        ^040000        not stripped
  1063. >22    beshort        >0        - version %ld
  1064. 0       long            01203604016     TML 0123 byte-order format
  1065. 0       long            01702407010     TML 1032 byte-order format
  1066. 0       long            01003405017     TML 2301 byte-order format
  1067. 0       long            01602007412     TML 3210 byte-order format
  1068. #### HPPA
  1069. 0    belong         0x02100106    HPPA-RISC1.1 relocatable object
  1070. 0    belong         0x02100107    HPPA-RISC1.1 executable
  1071. >(144)    belong        0x054ef630    dynamically linked
  1072. >96    belong        >0        - not stripped
  1073.  
  1074. 0    belong         0x02100108    HPPA-RISC1.1 shared executable
  1075. >(144)    belong        0x054ef630    dynamically linked
  1076. >96    belong        >0        - not stripped
  1077.  
  1078. 0    belong         0x0210010b    HPPA-RISC1.1 demand-load executable
  1079. >(144)    belong        0x054ef630    dynamically linked
  1080. >96    belong        >0        - not stripped
  1081.  
  1082. 0    belong         0x0210010e    HPPA-RISC1.1 shared library
  1083. >96    belong        >0        - not stripped
  1084.  
  1085. 0    belong         0x0210010d    HPPA-RISC1.1 dynamic load library
  1086. >96    belong        >0        - not stripped
  1087.  
  1088. #### 800
  1089. 0    belong         0x020b0106    HP s800 relocatable object
  1090.  
  1091. 0    belong         0x020b0107    HP s800 executable
  1092. >(144)    belong        0x054ef630    dynamically linked
  1093. >96    belong        >0        - not stripped
  1094.  
  1095. 0    belong         0x020b0108    HP s800 shared executable
  1096. >(144)    belong        0x054ef630    dynamically linked
  1097. >96    belong        >0        - not stripped
  1098.  
  1099. 0    belong         0x020b010b    HP s800 demand-load executable
  1100. >(144)    belong        0x054ef630    dynamically linked
  1101. >96    belong        >0        - not stripped
  1102.  
  1103. 0    belong         0x020b010e    HP s800 shared library
  1104. >96    belong        >0        - not stripped
  1105.  
  1106. 0    belong         0x020b010d    HP s800 dynamic load library
  1107. >96    belong        >0        - not stripped
  1108.  
  1109. 0    belong        0x213c6172    archive file
  1110. >68    belong         0x020b0619    - HP s800 relocatable library
  1111.  
  1112. #### 500
  1113. 0    long        0x02080106    HP s500 relocatable executable
  1114. >16    long        >0        - version %ld
  1115.  
  1116. 0    long        0x02080107    HP s500 executable
  1117. >16    long        >0        - version %ld
  1118.  
  1119. 0    long        0x02080108    HP s500 pure executable
  1120. >16    long        >0        - version %ld
  1121.  
  1122. #### 200
  1123. 0    belong         0x020c0108    HP s200 pure executable
  1124. >4    beshort        >0        - version %ld
  1125. >8    belong        &0x80000000    save fp regs
  1126. >8    belong        &0x40000000    dynamically linked
  1127. >8    belong        &0x20000000    debuggable
  1128. >36    belong        >0        not stripped
  1129.  
  1130. 0    belong        0x020c0107    HP s200 executable
  1131. >4    beshort        >0        - version %ld
  1132. >8    belong        &0x80000000    save fp regs
  1133. >8    belong        &0x40000000    dynamically linked
  1134. >8    belong        &0x20000000    debuggable
  1135. >36    belong        >0        not stripped
  1136.  
  1137. 0    belong        0x020c010b    HP s200 demand-load executable
  1138. >4    beshort        >0        - version %ld
  1139. >8    belong        &0x80000000    save fp regs
  1140. >8    belong        &0x40000000    dynamically linked
  1141. >8    belong        &0x20000000    debuggable
  1142. >36    belong        >0        not stripped
  1143.  
  1144. 0    belong        0x020c0106    HP s200 relocatable executable
  1145. >4    beshort        >0        - version %ld
  1146. >6    beshort        >0        - highwater %d
  1147. >8    belong        &0x80000000    save fp regs
  1148. >8    belong        &0x20000000    debuggable
  1149. >8    belong        &0x10000000    PIC
  1150.  
  1151. 0    belong         0x020a0108    HP s200 (2.x release) pure executable
  1152. >4    beshort        >0        - version %ld
  1153. >36    belong        >0        not stripped
  1154.  
  1155. 0    belong        0x020a0107    HP s200 (2.x release) executable
  1156. >4    beshort        >0        - version %ld
  1157. >36    belong        >0        not stripped
  1158.  
  1159. 0    belong        0x020c010e    HP s200 shared library
  1160. >4    beshort        >0        - version %ld
  1161. >6    beshort        >0        - highwater %d
  1162. >36    belong        >0        not stripped
  1163.  
  1164. 0    belong        0x020c010d    HP s200 dynamic load library
  1165. >4    beshort        >0        - version %ld
  1166. >6    beshort        >0        - highwater %d
  1167. >36    belong        >0        not stripped
  1168.  
  1169. #### MISC
  1170. 0    long        0x0000ff65    HP old archive
  1171. 0    long        0x020aff65    HP s200 old archive
  1172. 0    long        0x020cff65    HP s200 old archive
  1173. 0    long        0x0208ff65    HP s500 old archive
  1174.  
  1175. 0    long        0x015821a6    HP core file
  1176.  
  1177. 0    long        0x4da7eee8    HP-WINDOWS font
  1178. >8    byte        >0        - version %ld
  1179. 0    string        Bitmapfile    HP Bitmapfile
  1180.  
  1181. 0    string        IMGfile    CIS     compimg HP Bitmapfile
  1182. # XXX - see "lif"
  1183. 0    short        0x8000        lif file
  1184. 0    long        0x020c010c    compiled Lisp
  1185.  
  1186. 0    string        msgcat01    HP NLS message catalog,
  1187. >8    long        >0        %d messages
  1188.  
  1189. # addendum to /etc/magic with HP-48sx file-types by phk@data.fls.dk 1jan92
  1190. 0    string        HPHP48-        HP48 binary
  1191. >7    byte        >0        - Rev %c
  1192. >8    short        0x1129        (ADR)
  1193. >8    short        0x3329        (REAL)
  1194. >8    short        0x5529        (LREAL)
  1195. >8    short        0x7729        (COMPLX)
  1196. >8    short        0x9d29        (LCOMPLX)
  1197. >8    short        0xbf29        (CHAR)
  1198. >8    short        0xe829        (ARRAY)
  1199. >8    short        0x0a2a        (LNKARRAY)
  1200. >8    short        0x2c2a        (STRING)
  1201. >8    short        0x4e2a        (HXS)
  1202. >8    short        0x742a        (LIST)
  1203. >8    short        0x962a        (DIR)
  1204. >8    short        0xb82a        (ALG)
  1205. >8    short        0xda2a        (UNIT)
  1206. >8    short        0xfc2a        (TAGGED)
  1207. >8    short        0x1e2b        (GROB)
  1208. >8    short        0x402b        (LIB)
  1209. >8    short        0x622b        (BACKUP)
  1210. >8    short        0x882b        (LIBDATA)
  1211. >8    short        0x9d2d        (PROG)
  1212. >8    short        0xcc2d        (CODE)
  1213. >8    short        0x482e        (GNAME)
  1214. >8    short        0x6d2e        (LNAME)
  1215. >8    short        0x922e        (XLIB)
  1216. 0    string        %%HP:        HP48 text
  1217. >6    string        T(0)        - T(0)
  1218. >6    string        T(1)        - T(1)
  1219. >6    string        T(2)        - T(2)
  1220. >6    string        T(3)        - T(3)
  1221. >10    string        A(D)        A(D)
  1222. >10    string        A(R)        A(R)
  1223. >10    string        A(G)        A(G)
  1224. >14    string        F(.)        F(.);
  1225. >14    string        F(,)        F(,);
  1226.  
  1227. # hpBSD magic numbers
  1228. 0    beshort        200        hp200 (68010) BSD
  1229. >2    beshort        0407        impure binary
  1230. >2    beshort        0410        read-only binary
  1231. >2    beshort        0413        demand paged binary
  1232. 0    beshort        300        hp300 (68020+68881) BSD
  1233. >2    beshort        0407        impure binary
  1234. >2    beshort        0410        read-only binary
  1235. >2    beshort        0413        demand paged binary
  1236.  
  1237.  
  1238. #------------------------------------------------------------------------------
  1239. # ibm370:  file(1) magic for IBM 370 and compatibles.
  1240. #
  1241. # "ibm370" said that 0x15d == 0535 was "ibm 370 pure executable".
  1242. # What the heck *is* "USS/370"?
  1243. #
  1244. 0       beshort        0531        SVR2 executable (Amdahl-UTS)
  1245. >12    belong        >0        not stripped
  1246. >24     belong        >0        - version %ld
  1247. 0    beshort        0534        SVR2 pure executable (Amdahl-UTS)
  1248. >12    belong        >0        not stripped
  1249. >24    belong        >0        - version %ld
  1250. 0    beshort        0530        SVR2 pure executable (USS/370)
  1251. >12    belong        >0        not stripped
  1252. >24    belong        >0        - version %ld
  1253. 0    beshort        0535        SVR2 executable (USS/370)
  1254. >12    belong        >0        not stripped
  1255. >24    belong        >0        - version %ld
  1256.  
  1257. #------------------------------------------------------------------------------
  1258. # ibm6000:  file(1) magic for RS/6000 and the RT PC.
  1259. #
  1260. 0    beshort        0x01df        executable (RISC System/6000 V3.1) or obj module
  1261. >12    belong        >0        not stripped
  1262. # Breaks sun4 statically linked execs.
  1263. #0      beshort        0x0103        executable (RT Version 2) or obj module
  1264. #>2    byte        0x50        pure
  1265. #>28    belong        >0        not stripped
  1266. #>6    beshort        >0        - version %ld
  1267. 0    beshort        0x0104        shared library
  1268. 0    beshort        0x0105        ctab data
  1269. 0    beshort        0xfe04        structured file
  1270. 0    string        0xabcdef    message catalog
  1271. 0    string        \<aiaff>    archive
  1272.  
  1273. #------------------------------------------------------------------------------
  1274. # iff:    file(1) magic for Interchange File Format (see also "audio" & "images")
  1275. #
  1276. # Daniel Quinlan (quinlan@yggdrasil.com) -- IFF was designed by Electronic
  1277. # Arts for file interchange.  It has also been used by Apple, SGI, and
  1278. # especially Commodore-Amiga.
  1279. #
  1280. # IFF files begin with an 8 byte FORM header, followed by a 4 character
  1281. # FORM type, which is followed by the first chunk in the FORM.
  1282.  
  1283. 0    string        FORM        IFF data
  1284. #>4    belong        x        \b, FORM is %d bytes long
  1285. # audio formats
  1286. >8    string        AIFF        \b, AIFF audio
  1287. >8    string        AIFC        \b, AIFF-C compressed audio
  1288. >8    string        8SVX        \b, 8SVX 8-bit sampled sound voice
  1289. >8    string        SAMP        \b, SAMP sampled audio
  1290. # image formats
  1291. >8    string        ILBMBMHD    \b, ILBM interleaved image
  1292. >>20    beshort        x        \b, %d x
  1293. >>22    beshort        x        %d
  1294. >8    string        RGBN        \b, RGBN 12-bit RGB image
  1295. >8    string        RGB8        \b, RGB8 24-bit RGB image
  1296. >8    string        DR2D        \b, DR2D 2-D object
  1297. >8    string        TDDD        \b, TDDD 3-D rendering
  1298. # other formats
  1299. >8    string        FTXT        \b, FTXT formatted text
  1300.  
  1301. #------------------------------------------------------------------------------
  1302. # images:  file(1) magic for image formats (see also "iff")
  1303. #
  1304. # originally from jef@helios.ee.lbl.gov (Jef Poskanzer),
  1305. # additions by janl@ifi.uio.no as well as others. Jan also suggested
  1306. # merging several one- and two-line files into here.
  1307. #
  1308. # little magic: PCX (first byte is 0x0a)
  1309. # no magic: Targa
  1310.  
  1311. # PBMPLUS images
  1312. # The next byte following the magic is always whitespace.
  1313. 0    string        P1        PBM image text
  1314. 0    string        P2        PGM image text
  1315. 0    string        P3        PPM image text
  1316. 0    string        P4        PBM "rawbits" image data
  1317. 0    string        P5        PGM "rawbits" image data
  1318. 0    string        P6        PPM "rawbits" image data
  1319.  
  1320. # NIFF (Navy Interchange File Format, a modification of TIFF) images
  1321. 0    string        IIN1        NIFF image data
  1322.  
  1323. # Tag Image File Format, from Daniel Quinlan (quinlan@yggdrasil.com)
  1324. # The second word of TIFF files is the TIFF version number, 42, which has
  1325. # never changed.  The TIFF specification recommends testing for it.
  1326. 0    string        MM\x00\x2a    TIFF image data, big-endian
  1327. 0    string        II\x2a\x00    TIFF image data, little-endian
  1328.  
  1329. # PNG [Portable Network Graphics, or "PNG's Not GIF"] images
  1330. # (Greg Roelofs, newt@uchicago.edu)
  1331. #
  1332. # 137 P N G \r \n ^Z \n [4-byte length] H E A D [HEAD data] [HEAD crc] ...
  1333. #
  1334. 0    string        \x89PNG        PNG image data,
  1335. >4    belong        !0x0d0a1a0a    CORRUPTED,
  1336. >16    belong        x        %ld x
  1337. >20    belong        x        %ld,
  1338. >24    byte        x        %d-bit
  1339. >25    byte        0        grayscale,
  1340. >25    byte        2        \b/color RGB,
  1341. >25    byte        3        colormap,
  1342. >25    byte        4        gray+alpha,
  1343. >25    byte        6        \b/color RGBA,
  1344. #>26    byte        0        deflate/32K,
  1345. >28    byte        0        non-interlaced
  1346. >28    byte        1        interlaced
  1347.  
  1348. # GIF
  1349. 0    string        GIF8        GIF image data
  1350. >4    string        7a        \b, version 8%s,
  1351. >4    string        9a        \b, version 8%s,
  1352. >6    leshort        >0        %hd x
  1353. >8    leshort        >0        %hd,
  1354. #>10    byte        &0x80        color mapped,
  1355. #>10    byte&0x07    =0x00        2 colors
  1356. #>10    byte&0x07    =0x01        4 colors
  1357. #>10    byte&0x07    =0x02        8 colors
  1358. #>10    byte&0x07    =0x03        16 colors
  1359. #>10    byte&0x07    =0x04        32 colors
  1360. #>10    byte&0x07    =0x05        64 colors
  1361. #>10    byte&0x07    =0x06        128 colors
  1362. #>10    byte&0x07    =0x07        256 colors
  1363.  
  1364. # ITC (CMU WM) raster files.  It is essentially a byte-reversed Sun raster,
  1365. # 1 plane, no encoding.
  1366. 0    string        \361\0\100\273    CMU window manager raster image data
  1367. >4    lelong        >0        %d x
  1368. >8    lelong        >0        %d,
  1369. >12    lelong        >0        %d-bit
  1370.  
  1371. # Magick Image File Format
  1372. 0    string        id=ImageMagick    MIFF image data
  1373.  
  1374. # Artisan
  1375. 0    long        1123028772    Artisan image data
  1376. >4    long        1        \b, rectangular 24-bit
  1377. >4    long        2        \b, rectangular 8-bit with colormap
  1378. >4    long        3        \b, rectangular 32-bit (24-bit with matte)
  1379.  
  1380. # FIG (Facility for Interactive Generation of figures), an object-based format
  1381. 0    string        #FIG        FIG image text
  1382. >5    string        x        \b, version %.3s
  1383.  
  1384. # PHIGS
  1385. 0    string        ARF_BEGARF        PHIGS clear text archive
  1386. 0    string        @(#)SunPHIGS        SunPHIGS
  1387. # version number follows, in the form m.n
  1388. >40    string        SunBin            binary
  1389. >32    string        archive            archive
  1390.  
  1391. # GKS (Graphics Kernel System)
  1392. 0    string        GKSM        GKS Metafile
  1393. >24    string        SunGKS        \b, SunGKS
  1394.  
  1395. # CGM image files
  1396. 0    string        BEGMF        clear text Computer Graphics Metafile
  1397. # XXX - questionable magic
  1398. 0    beshort&0xffe0    0x0020        binary Computer Graphics Metafile
  1399. 0    beshort        0x3020        character Computer Graphics Metafile
  1400.  
  1401. # MGR bitmaps  (Michael Haardt, u31b3hs@pool.informatik.rwth-aachen.de)
  1402. 0    string    yz    MGR bitmap, modern format, 8-bit aligned
  1403. 0    string    zz    MGR bitmap, old format, 1-bit deep, 16-bit aligned
  1404. 0    string    xz    MGR bitmap, old format, 1-bit deep, 32-bit aligned
  1405. 0    string    yx    MGR bitmap, modern format, squeezed
  1406.  
  1407. # Fuzzy Bitmap (FBM) images
  1408. 0    string        %bitmap\0    FBM image data
  1409. >30    long        0x31        \b, mono
  1410. >30    long        0x33        \b, color
  1411.  
  1412. # facsimile data
  1413. 1    string        PC\ Research,\ Inc    group 3 fax data
  1414. >29    byte        0        \b, normal resolution (204x98 DPI)
  1415. >29    byte        1        \b, fine resolution (204x196 DPI)
  1416.  
  1417. # JPEG images
  1418. 0    beshort        0xffd8        JPEG image data
  1419. >6    string        JFIF        \b, JFIF standard
  1420. # HSI is Handmade Software's proprietary JPEG encoding scheme
  1421. 0    string        hsi1        JPEG image data, HSI proprietary
  1422.  
  1423. # PC bitmaps (OS/2, Windoze BMP files)  (Greg Roelofs, newt@uchicago.edu)
  1424. 0    string        BM        PC bitmap data
  1425. >14    leshort        12        \b, OS/2 1.x format
  1426. >>18    leshort        x        \b, %d x
  1427. >>20    leshort        x        %d
  1428. >14    leshort        64        \b, OS/2 2.x format
  1429. >>18    leshort        x        \b, %d x
  1430. >>20    leshort        x        %d
  1431. >14    leshort        40        \b, Windows 3.x format
  1432. >>18    lelong        x        \b, %d x
  1433. >>22    lelong        x        %d x
  1434. >>28    leshort        x        %d
  1435. 0    string        IC        PC icon data
  1436. 0    string        PI        PC pointer image data
  1437. 0    string        CI        PC color icon data
  1438. 0    string        CP        PC color pointer image data
  1439. # Conflicts with other entries [BABYL]
  1440. #0    string        BA        PC bitmap array data
  1441.  
  1442. # XPM icons (Greg Roelofs, newt@uchicago.edu)
  1443. # note possible collision with C/REXX entry in c-lang; currently commented out
  1444. 0    string        /*\ XPM\ */    X pixmap image text
  1445.  
  1446. # Utah Raster Toolkit RLE images (janl@ifi.uio.no)
  1447. 0    leshort        0xcc52        RLE image data,
  1448. >6    leshort        x        %d x
  1449. >8    leshort        x        %d
  1450. >2    leshort        >0        \b, lower left corner: %d
  1451. >4    leshort        >0        \b, lower right corner: %d
  1452. >10    byte&0x1    =0x1        \b, clear first
  1453. >10    byte&0x2    =0x2        \b, no background
  1454. >10    byte&0x4    =0x4        \b, alpha channel
  1455. >10    byte&0x8    =0x8        \b, comment
  1456. >11    byte        >0        \b, %d color channels
  1457. >12    byte        >0        \b, %d bits per pixel
  1458. >13    byte        >0        \b, %d color map channels
  1459.  
  1460. # image file format (Robert Potter, potter@cs.rochester.edu)
  1461. 0    string        Imagefile\ version-    iff image data
  1462. # this adds the whole header (inc. version number), informative but longish
  1463. >10    string        >\0        %s
  1464.  
  1465. # Sun raster images, from Daniel Quinlan (quinlan@yggdrasil.com)
  1466. 0    belong        0x59a66a95    Sun raster image data
  1467. >4    belong        >0        \b, %d x
  1468. >8    belong        >0        %d,
  1469. >12    belong        >0        %d-bit,
  1470. #>16    belong        >0        %d bytes long,
  1471. >20    belong        0        old format,
  1472. #>20    belong        1        standard,
  1473. >20    belong        2        compressed,
  1474. >20    belong        3        RGB,
  1475. >20    belong        4        TIFF,
  1476. >20    belong        5        IFF,
  1477. >20    belong        0xffff        reserved for testing,
  1478. >24    belong        0        no colormap
  1479. >24    belong        1        RGB colormap
  1480. >24    belong        2        raw colormap
  1481. #>28    belong        >0        colormap is %d bytes long
  1482.  
  1483. # SGI image file format, from Daniel Quinlan (quinlan@yggdrasil.com)
  1484. # file://sgi.com/graphics/SGIIMAGESPEC
  1485. 0    beshort        474        SGI image data
  1486. #>2    byte        0        \b, verbatim
  1487. >2    byte        1        \b, RLE
  1488. #>3    byte        1        \b, normal precision
  1489. >3    byte        2        \b, high precision
  1490. >4    beshort        x        \b, %d-D
  1491. >6    beshort        x        \b, %d x
  1492. >8    beshort        x        %d
  1493. >10    beshort        x        \b, %d channel
  1494. >10    beshort        !1        \bs
  1495. >80    string        >0        \b, "%s"
  1496.  
  1497. 0    string        IT01        FIT image data
  1498. >4    belong        x        \b, %d x
  1499. >8    belong        x        %d x
  1500. >12    belong        x        %d
  1501. #
  1502. 0    string        IT02        FIT image data
  1503. >4    belong        x        \b, %d x
  1504. >8    belong        x        %d x
  1505. >12    belong        x        %d
  1506. #
  1507. 2048    string        PCD_IPI        Kodak Photo CD image pack file
  1508. 0    string        PCD_OPA        Kodak Photo CD overview pack file
  1509.  
  1510. # FITS format.  Jeff Uphoff <juphoff@tarsier.cv.nrao.edu>
  1511. # FITS is the Flexible Image Transport System, the de facto standard for
  1512. # data and image transfer, storage, etc., for the astronomical community.
  1513. # (FITS floating point formats are big-endian.)
  1514. 0    string    SIMPLE\ \ =    FITS image data
  1515. >109    string    8        \b, 8-bit, character or unsigned binary integer
  1516. >108    string    16        \b, 16-bit, two's complement binary integer
  1517. >107    string    \ 32        \b, 32-bit, two's complement binary integer
  1518. >107    string    -32        \b, 32-bit, floating point, single precision
  1519. >107    string    -64        \b, 64-bit, floating point, double precision
  1520.  
  1521. # other images
  1522. 0    string    This\ is\ a\ BitMap\ file    Lisp Machine bit-array-file
  1523. 0    string        !!        Bennet Yee's "face" format
  1524.  
  1525. #------------------------------------------------------------------------------
  1526. # intel:  file(1) magic for x86 Unix
  1527. #
  1528. # Various flavors of x86 UNIX executable/object (other than Xenix, which
  1529. # is in "microsoft").  DOS is in "msdos"; the ambitious soul can do
  1530. # Windows as well.
  1531. #
  1532. # Windows NT belongs elsewhere, as you need x86 and MIPS and Alpha and
  1533. # whatever comes next (HP-PA Hummingbird?).  OS/2 may also go elsewhere
  1534. # as well, if, as, and when IBM makes it portable.
  1535. #
  1536. # The `versions' should be un-commented if they work for you.
  1537. # (Was the problem just one of endianness?)
  1538. #
  1539. 0    leshort        0502        basic-16 executable
  1540. >12    lelong        >0        not stripped
  1541. #>22    leshort        >0        - version %ld
  1542. 0    leshort        0503        basic-16 executable (TV)
  1543. >12    lelong        >0        not stripped
  1544. #>22    leshort        >0        - version %ld
  1545. 0    leshort        0510        x86 executable
  1546. >12    lelong        >0        not stripped
  1547. 0    leshort        0511        x86 executable (TV)
  1548. >12    lelong        >0        not stripped
  1549. 0    leshort        =0512        iAPX 286 executable small model (COFF)
  1550. >12    lelong        >0        not stripped
  1551. #>22    leshort        >0        - version %ld
  1552. 0    leshort        =0522        iAPX 286 executable large model (COFF)
  1553. >12    lelong        >0        not stripped
  1554. #>22    leshort        >0        - version %ld
  1555. # SGI labeled the next entry as "iAPX 386 executable" --Dan Quinlan
  1556. 0    leshort        =0514        80386 COFF executable
  1557. >12    lelong        >0        not stripped
  1558. >22    leshort        >0        - version %ld
  1559.  
  1560. #------------------------------------------------------------------------------
  1561. # interleaf:  file(1) magic for InterLeaf TPS:
  1562. #
  1563. 0    string        =\210OPS    Interleaf saved data
  1564. 0    string        =<!OPS        Interleaf document text
  1565. >5    string        ,\ Version\ =    \b, version
  1566. >>17    string        >\0        %.3s
  1567.  
  1568. #------------------------------------------------------------------------------
  1569. # ispell:  file(1) magic for ispell
  1570. #
  1571. # Ispell 3.0 has a magic of 0x9601 and ispell 3.1 has 0x9602.  This magic
  1572. # will match 0x9600 through 0x9603 in *both* little endian and big endian.
  1573. # (No other current magic entries collide.)
  1574. #
  1575. # Updated by Daniel Quinlan (quinlan@yggdrasil.com)
  1576. #
  1577. 0    leshort&0xFFFC    0x9600        little endian ispell
  1578. >0    byte        0        hash file (?),
  1579. >0    byte        1        3.0 hash file,
  1580. >0    byte        2        3.1 hash file,
  1581. >0    byte        3        hash file (?),
  1582. >2    leshort        0x00        8-bit, no capitalization, 26 flags
  1583. >2    leshort        0x01        7-bit, no capitalization, 26 flags
  1584. >2    leshort        0x02        8-bit, capitalization, 26 flags
  1585. >2    leshort        0x03        7-bit, capitalization, 26 flags
  1586. >2    leshort        0x04        8-bit, no capitalization, 52 flags
  1587. >2    leshort        0x05        7-bit, no capitalization, 52 flags
  1588. >2    leshort        0x06        8-bit, capitalization, 52 flags
  1589. >2    leshort        0x07        7-bit, capitalization, 52 flags
  1590. >2    leshort        0x08        8-bit, no capitalization, 128 flags
  1591. >2    leshort        0x09        7-bit, no capitalization, 128 flags
  1592. >2    leshort        0x0A        8-bit, capitalization, 128 flags
  1593. >2    leshort        0x0B        7-bit, capitalization, 128 flags
  1594. >2    leshort        0x0C        8-bit, no capitalization, 256 flags
  1595. >2    leshort        0x0D        7-bit, no capitalization, 256 flags
  1596. >2    leshort        0x0E        8-bit, capitalization, 256 flags
  1597. >2    leshort        0x0F        7-bit, capitalization, 256 flags
  1598. >4    leshort        >0        and %d string characters
  1599. 0    beshort&0xFFFC    0x9600        big endian ispell
  1600. >1    byte        0        hash file (?),
  1601. >1    byte        1        3.0 hash file,
  1602. >1    byte        2        3.1 hash file,
  1603. >1    byte        3        hash file (?),
  1604. >2    beshort        0x00        8-bit, no capitalization, 26 flags
  1605. >2    beshort        0x01        7-bit, no capitalization, 26 flags
  1606. >2    beshort        0x02        8-bit, capitalization, 26 flags
  1607. >2    beshort        0x03        7-bit, capitalization, 26 flags
  1608. >2    beshort        0x04        8-bit, no capitalization, 52 flags
  1609. >2    beshort        0x05        7-bit, no capitalization, 52 flags
  1610. >2    beshort        0x06        8-bit, capitalization, 52 flags
  1611. >2    beshort        0x07        7-bit, capitalization, 52 flags
  1612. >2    beshort        0x08        8-bit, no capitalization, 128 flags
  1613. >2    beshort        0x09        7-bit, no capitalization, 128 flags
  1614. >2    beshort        0x0A        8-bit, capitalization, 128 flags
  1615. >2    beshort        0x0B        7-bit, capitalization, 128 flags
  1616. >2    beshort        0x0C        8-bit, no capitalization, 256 flags
  1617. >2    beshort        0x0D        7-bit, no capitalization, 256 flags
  1618. >2    beshort        0x0E        8-bit, capitalization, 256 flags
  1619. >2    beshort        0x0F        7-bit, capitalization, 256 flags
  1620. >4    beshort        >0        and %d string characters
  1621. #------------------------------------------------------------
  1622. # Java ByteCode
  1623. 0    belong        0xcafebabe
  1624. >4    belong        0x0003002d    Java bytecode
  1625.  
  1626. #------------------------------------------------------------------------------
  1627. # karma:  file(1) magic for Karma data files
  1628. #
  1629. # From <rgooch@atnf.csiro.au>
  1630.  
  1631. 0    string        KarmaRHD Version    Karma Data Structure Version
  1632. >16    long        x        %lu
  1633.  
  1634. #------------------------------------------------------------------------------
  1635. # lex:  file(1) magic for lex
  1636. #
  1637. #    derived empirically, your offsets may vary!
  1638. 53    string        yyprevious    C program text (from lex)
  1639. >3    string        >\0         for %s
  1640. # C program text from GNU flex, from Daniel Quinlan <quinlan@yggdrasil.com>
  1641. 21    string        generated\ by\ flex    C program text (from flex)
  1642. # lex description file, from Daniel Quinlan <quinlan@yggdrasil.com>
  1643. 0    string        %{        lex description text
  1644.  
  1645. #------------------------------------------------------------------------------
  1646. # lif:  file(1) magic for lif
  1647. #
  1648. # XXX - byte order?  (Probably beshort, Daniel Quinlan <quinlan@yggdrasil.com>)
  1649. #
  1650. 0    short        0x8000        lif file
  1651.  
  1652. #------------------------------------------------------------------------------
  1653. # linux:  file(1) magic for Linux files
  1654. #
  1655. # Values for Linux/i386 binaries, from Daniel Quinlan <quinlan@yggdrasil.com>
  1656. # The following basic Linux magic is useful for reference, but using
  1657. # "long" magic is a better practice in order to avoid collisions.
  1658. #
  1659. # 2    leshort        100        Linux/i386
  1660. # >0    leshort        0407        impure executable (OMAGIC)
  1661. # >0    leshort        0410        pure executable (NMAGIC)
  1662. # >0    leshort        0413        demand-paged executable (ZMAGIC)
  1663. # >0    leshort        0314        demand-paged executable (QMAGIC)
  1664. #
  1665. 0    lelong        0x00640107    Linux/i386 impure executable (OMAGIC)
  1666. >16    lelong        0        \b, stripped
  1667. 0    lelong        0x00640108    Linux/i386 pure executable (NMAGIC)
  1668. >16    lelong        0        \b, stripped
  1669. 0    lelong        0x0064010b    Linux/i386 demand-paged executable (ZMAGIC)
  1670. >16    lelong        0        \b, stripped
  1671. 0    lelong        0x006400cc    Linux/i386 demand-paged executable (QMAGIC)
  1672. >16    lelong        0        \b, stripped
  1673. #
  1674. 0    string        \007\001\000    Linux/i386 object file
  1675. >20    lelong        >0x1020        \b, DLL library
  1676. # message catalogs, from Mitchum DSouza <m.dsouza@mrc-apu.cam.ac.uk>
  1677. 0    string        *nazgul*    compiled message catalog
  1678. >8    lelong        >0        \b, version %ld
  1679. # core dump file, from Bill Reynolds <bill@goshawk.lanl.gov>
  1680. 216    lelong        0421        Linux/i386 core file
  1681. >220    string        >\0        of '%s'
  1682. >200    lelong        >0        (signal %d)
  1683. #
  1684. # LILO boot/chain loaders, from Daniel Quinlan <quinlan@yggdrasil.com>
  1685. # this can be overridden by the DOS executable (COM) entry
  1686. 2    string        LILO        Linux/i386 LILO boot/chain loader
  1687. #
  1688. # Debian Packages, from Peter Tobias <tobias@server.et-inf.fho-emden.de>
  1689. 0    string        0.9
  1690. >8    byte        0x0a        Debian Binary Package
  1691. >>3    byte        >0        \b, created by dpkg 0.9%c
  1692. >>4    byte        >0        pl%c
  1693. # PSF fonts, from H. Peter Anvin <hpa@yggdrasil.com>
  1694. 0    leshort        0x0436        Linux/i386 PC Screen Font data,
  1695. >2    byte        0        256 characters, no directory,
  1696. >2    byte        1        512 characters, no directory,
  1697. >2    byte        2        256 characters, Unicode directory,
  1698. >2    byte        3        512 characters, Unicode directory,
  1699. >3    byte        >0        8x%d
  1700. # Linux swap file, from Daniel Quinlan <quinlan@yggdrasil.com>
  1701. 4086    string        SWAP-SPACE    Linux/i386 swap file
  1702. # ECOFF magic for OSF/1 and Linux (only tested under Linux though)
  1703. #
  1704. #    from Erik Troan (ewt@redhat.com) examining od dumps, so this
  1705. #        could be wrong
  1706. #      updated by David Mosberger (davidm@azstarnet.com) based on
  1707. #      GNU BFD and MIPS info found below.
  1708. #
  1709. 0    leshort        0x0183        ECOFF alpha
  1710. >24    leshort        0407        executable
  1711. >24    leshort        0410        pure
  1712. >24    leshort        0413        demand paged
  1713. >8    long        >0        not stripped
  1714. >8    long        0        stripped
  1715. >23    leshort        >0        - version %ld.
  1716. # linux Kernel images version 1.3.80 - ?
  1717. # from Axel Kohlmeyer <akohlmey@rincewind.chemie.uni-ulm.de>
  1718. 0       belong          0xb8c0078e      Linux/x86 kernel image,
  1719. >0x048c byte            0x31
  1720. >>0x048c string         x               version %s
  1721. >0x0493 byte            0x31
  1722. >>0x0493 string         x               version %s
  1723. #
  1724.  
  1725. #------------------------------------------------------------------------------
  1726. # lisp:  file(1) magic for lisp programs
  1727. #
  1728. # various lisp types, from Daniel Quinlan (quinlan@yggdrasil.com)
  1729. 0    string    ;;            Lisp/Scheme program text
  1730. # Emacs 18 - this is always correct, but not very magical.
  1731. 0    string    \012(            byte-compiled Emacs-Lisp program data
  1732. # Emacs 19
  1733. 0    string    ;ELC\023\000\000\000    byte-compiled Emacs-Lisp program data
  1734. #------------------------------------------------------------------------------
  1735. # mach file description
  1736. #
  1737. 0    belong        0xcafebabe    mach-o fat file
  1738. >4    belong        1        with 1 architecture
  1739. >4    belong        >1
  1740. >>4    belong        x        with %ld architectures        
  1741. #
  1742. 0    belong        0xfeedface    mach-o
  1743. >12    belong        1        object
  1744. >12    belong        2        executable
  1745. >12    belong        3        shared library
  1746. >12    belong        4        core
  1747. >12    belong        5        preload executable
  1748. >12    belong        >5
  1749. >>12    belong        x        filetype=%ld
  1750. >4    belong        <0
  1751. >>4    belong        x        architecture=%ld
  1752. >4    belong        1        vax
  1753. >4    belong        2        romp
  1754. >4    belong        3        architecture=3
  1755. >4    belong        4        ns32032
  1756. >4    belong        5        ns32332
  1757. >4    belong        6        for m68k architecture
  1758. >4    belong        7        i386
  1759. >4    belong        8        mips
  1760. >4    belong        9        ns32532
  1761. >4    belong        10        architecture=10
  1762. >4    belong        11        hp pa-risc
  1763. >4    belong        12        acorn
  1764. >4    belong        13        m88k
  1765. >4    belong        14        sparc
  1766. >4    belong        15        i860-big
  1767. >4    belong        16        i860
  1768. >4    belong        17        rs6000
  1769. >4    belong        18        powerPC
  1770. >4    belong        >18
  1771. >>4    belong        x        architecture=%ld
  1772.  
  1773. #------------------------------------------------------------------------------
  1774. # magic:  file(1) magic for magic files
  1775. #
  1776. 0    string        #\ Magic    magic text file for file(1) cmd
  1777.  
  1778. #------------------------------------------------------------------------------
  1779. # mail.news:  file(1) magic for mail and news
  1780. #
  1781. # Unfortunately, saved netnews also has From line added in some news software.
  1782. #0    string        From         mail text
  1783. # There are tests to ascmagic.c to cope with mail and news.
  1784. 0    string        Relay-Version:     old news text
  1785. 0    string        #!\ rnews    batched news text
  1786. 0    string        N#!\ rnews    mailed, batched news text
  1787. 0    string        Forward\ to     mail forwarding text
  1788. 0    string        Pipe\ to     mail piping text
  1789. 0    string        Return-Path:    smtp mail text
  1790. 0    string        Path:        news text
  1791. 0    string        Xref:        news text
  1792. 0    string        From:        news or mail text
  1793. 0    string        Article     saved news text
  1794. 0    string        BABYL        Emacs RMAIL text
  1795. 0    string        Received:    RFC 822 mail message
  1796. 0    string        MIME-Version:    MIME entity
  1797. 0    string        Content-    MIME entity
  1798.  
  1799. #------------------------------------------------------------------------------
  1800. # microsoft:  file(1) magic for Microsoft Xenix
  1801. #
  1802. # "Middle model" stuff, and "Xenix 8086 relocatable or 80286 small
  1803. # model" lifted from "magic.xenix", with comment "derived empirically;
  1804. # treat as folklore until proven"
  1805. #
  1806. # "small model", "large model", "huge model" stuff lifted from XXX
  1807. #
  1808. # XXX - "x.out" collides with PDP-11 archives
  1809. #
  1810. 0    string        core        core file (Xenix)
  1811. 0    byte        0x80        8086 relocatable (Microsoft)
  1812. 0    leshort        0xff65        x.out
  1813. >2    string        __.SYMDEF     randomized
  1814. >0    byte        x        archive
  1815. 0    leshort        0x206        Microsoft a.out
  1816. >8    leshort        1        Middle model
  1817. >0x1e    leshort        &0x10        overlay
  1818. >0x1e    leshort        &0x2        separate
  1819. >0x1e    leshort        &0x4        pure
  1820. >0x1e    leshort        &0x800        segmented
  1821. >0x1e    leshort        &0x400        standalone
  1822. >0x1e    leshort        &0x8        fixed-stack
  1823. >0x1c    byte        &0x80        byte-swapped
  1824. >0x1c    byte        &0x40        word-swapped
  1825. >0x10    lelong        >0        not-stripped
  1826. >0x1e    leshort        ^0xc000        pre-SysV
  1827. >0x1e    leshort        &0x4000        V2.3
  1828. >0x1e    leshort        &0x8000        V3.0
  1829. >0x1c    byte        &0x4        86
  1830. >0x1c    byte        &0xb        186
  1831. >0x1c    byte        &0x9        286
  1832. >0x1c    byte        &0xa        386
  1833. >0x1f    byte        <0x040        small model
  1834. >0x1f    byte        =0x048        large model    
  1835. >0x1f    byte        =0x049        huge model 
  1836. >0x1e    leshort        &0x1        executable
  1837. >0x1e    leshort        ^0x1        object file
  1838. >0x1e    leshort        &0x40        Large Text
  1839. >0x1e    leshort        &0x20        Large Data
  1840. >0x1e    leshort        &0x120        Huge Objects Enabled
  1841. >0x10    lelong        >0        not stripped
  1842.  
  1843. 0    leshort        0x140        old Microsoft 8086 x.out
  1844. >0x3    byte        &0x4        separate
  1845. >0x3    byte        &0x2        pure
  1846. >0    byte        &0x1        executable
  1847. >0    byte        ^0x1        relocatable
  1848. >0x14    lelong        >0        not stripped
  1849.  
  1850. 0    lelong        0x206        b.out
  1851. >0x1e    leshort        &0x10        overlay
  1852. >0x1e    leshort        &0x2        separate
  1853. >0x1e    leshort        &0x4        pure
  1854. >0x1e    leshort        &0x800        segmented
  1855. >0x1e    leshort        &0x400        standalone
  1856. >0x1e    leshort        &0x1        executable
  1857. >0x1e    leshort        ^0x1        object file
  1858. >0x1e    leshort        &0x4000        V2.3
  1859. >0x1e    leshort        &0x8000        V3.0
  1860. >0x1c    byte        &0x4        86
  1861. >0x1c    byte        &0xb        186
  1862. >0x1c    byte        &0x9        286
  1863. >0x1c    byte        &0x29        286
  1864. >0x1c    byte        &0xa        386
  1865. >0x1e    leshort        &0x4        Large Text
  1866. >0x1e    leshort        &0x2        Large Data
  1867. >0x1e    leshort        &0x102        Huge Objects Enabled
  1868.  
  1869. 0    leshort        0x580        XENIX 8086 relocatable or 80286 small model
  1870.  
  1871. #------------------------------------------------------------------------------
  1872. # mirage:  file(1) magic for Mirage executables
  1873. #
  1874. # XXX - byte order?
  1875. #
  1876. 0    long    31415        Mirage Assembler m.out executable
  1877.  
  1878. #------------------------------------------------------------------------------
  1879. # mkid:  file(1) magic for mkid(1) databases
  1880. #
  1881. # ID is the binary tags database produced by mkid(1).
  1882. #
  1883. # XXX - byte order?
  1884. #
  1885. 0    string        \311\304    ID tags data
  1886. >2    short        >0        version %d
  1887.  
  1888. #------------------------------------------------------------------------------
  1889. # mmdf:  file(1) magic for MMDF mail files
  1890. #
  1891. 0    string    \001\001\001\001    MMDF mailbox
  1892.  
  1893. #------------------------------------------------------------------------------
  1894. # motorola:  file(1) magic for Motorola 68K and 88K binaries
  1895. #
  1896. # 68K
  1897. #
  1898. 0    beshort        0520        mc68k COFF
  1899. >18    beshort        ^00000020    object
  1900. >18    beshort        &00000020    executable
  1901. >12    belong        >0        not stripped
  1902. >168    string        .lowmem        Apple toolbox
  1903. >20    beshort        0407        (impure)
  1904. >20    beshort        0410        (pure)
  1905. >20    beshort        0413        (demand paged)
  1906. >20    beshort        0421        (standalone)
  1907. 0    beshort        0521        mc68k executable (shared)
  1908. >12    belong        >0        not stripped
  1909. 0    beshort        0522        mc68k executable (shared demand paged)
  1910. >12    belong        >0        not stripped
  1911. #
  1912. # Motorola/UniSoft 68K Binary Compatibility Standard (BCS)
  1913. #
  1914. 0    beshort        0554        68K BCS executable
  1915. #
  1916. # 88K
  1917. #
  1918. # Motorola/88Open BCS
  1919. #
  1920. 0    beshort        0555        88K BCS executable
  1921. #
  1922. # Motorola S-Records, from Gerd Truschinski <gt@freebsd.first.gmd.de>
  1923. 0   string      S0          Motorola S-Record; binary data in text format
  1924.  
  1925. #------------------------------------------------------------------------------
  1926. # msdos:  file(1) magic for MS-DOS files
  1927. #
  1928.  
  1929. # .BAT files (Daniel Quinlan, quinlan@yggdrasil.com)
  1930. 0    string    @echo\ off    MS-DOS batch file text
  1931.  
  1932. # .EXE formats (Greg Roelofs, newt@uchicago.edu)
  1933. #
  1934. 0    string    MZ        MS-DOS executable (EXE)
  1935. >24    string    @        \b, OS/2 or Windows
  1936. >1638    string    -lh5-        \b, LHa SFX archive v2.13S
  1937. >7195    string    Rar!        \b, RAR self-extracting archive
  1938. #
  1939. # [GRR 950118:  file 3.15 has a buffer-size limitation; offsets bigger than
  1940. #   8161 bytes are ignored.  To make the following entries work, increase
  1941. #   HOWMANY in file.h to 32K at least, and maybe to 70K or more for OS/2,
  1942. #   NT/Win32 and VMS.]
  1943. # [GRR:  some company sells a self-extractor/displayer for image data(!)]
  1944. #
  1945. >11696    string    PK\003\004    \b, PKZIP SFX archive v1.1
  1946. >13297    string    PK\003\004    \b, PKZIP SFX archive v1.93a
  1947. >15588    string    PK\003\004    \b, PKZIP2 SFX archive v1.09
  1948. >15770    string    PK\003\004    \b, PKZIP SFX archive v2.04g
  1949. >28374    string    PK\003\004    \b, PKZIP2 SFX archive v1.02
  1950. #
  1951. # Info-ZIP self-extractors
  1952. #    these are the DOS versions:
  1953. >25115    string    PK\003\004    \b, Info-ZIP SFX archive v5.12
  1954. >26331    string    PK\003\004    \b, Info-ZIP SFX archive v5.12 w/decryption
  1955. #    these are the OS/2 versions (OS/2 is flagged above):
  1956. >47031    string    PK\003\004    \b, Info-ZIP SFX archive v5.12
  1957. >49845    string    PK\003\004    \b, Info-ZIP SFX archive v5.12 w/decryption
  1958. #    this is the NT/Win32 version:
  1959. >69120    string    PK\003\004    \b, Info-ZIP NT SFX archive v5.12 w/decryption
  1960. #
  1961. # TELVOX Teleinformatica CODEC self-extractor for OS/2:
  1962. >49801    string    \x79\xff\x80\xff\x76\xff    \b, CODEC archive v3.21
  1963. >>49824    leshort        =1            \b, 1 file
  1964. >>49824    leshort        >1            \b, %u files
  1965.  
  1966. # .COM formats (Daniel Quinlan, quinlan@yggdrasil.com)
  1967. # Uncommenting only the first two lines will cover about 2/3 of COM files,
  1968. # but it isn't feasible to match all COM files since there must be at least
  1969. # two dozen different one-byte "magics".
  1970. #0    byte        0xe9        MS-DOS executable (COM)
  1971. #0    byte        0x8c        MS-DOS executable (COM)
  1972. # 0xeb conflicts with "sequent" magic
  1973. #0    byte        0xeb        MS-DOS executable (COM)
  1974. #0    byte        0xb8        MS-DOS executable (COM)
  1975.  
  1976. # miscellaneous formats
  1977. 0    string        LZ        MS-DOS executable (built-in)
  1978. #0    byte        0xf0        MS-DOS program library data
  1979. #
  1980.  
  1981. # Popular applications
  1982. 2080    string    Microsoft\ Word\ 6.0\ Document    %s
  1983. #
  1984. 0    belong    0x31be0000    Microsoft Word Document
  1985. #
  1986. 2080    string    Microsoft\ Excel\ 5.0\ Worksheet    %s
  1987. #
  1988. 0    belong    0x00001a00    Lotus 1-2-3
  1989. >4    belong    0x00100400    wk3 document
  1990. >4    belong    0x02100400    wk4 document
  1991. >4    belong    0x07800100    fm3 or fmb document
  1992. >4    belong    0x07800000    fm3 or fmb document
  1993. #
  1994. 0    belong    0x00000200     Lotus 1-2-3
  1995. >4    belong    0x06040600    wk1 document
  1996. >4    belong    0x06800200    fmt document
  1997.  
  1998. #------------------------------------------------------------------------------
  1999. # ncr:  file(1) magic for NCR Tower objects
  2000. #
  2001. # contributed by
  2002. # Michael R. Wayne  ***  TMC & Associates  ***  INTERNET: wayne@ford-vax.arpa
  2003. # uucp: {philabs | pyramid} !fmsrl7!wayne   OR   wayne@fmsrl7.UUCP
  2004. #
  2005. 0    beshort        000610    Tower/XP rel 2 object
  2006. >12       belong        >0    not stripped
  2007. >20       beshort        0407    executable
  2008. >20       beshort        0410    pure executable
  2009. >22       beshort        >0    - version %ld
  2010. 0    beshort        000615    Tower/XP rel 2 object
  2011. >12       belong        >0    not stripped
  2012. >20       beshort        0407    executable
  2013. >20       beshort        0410    pure executable
  2014. >22       beshort        >0    - version %ld
  2015. 0    beshort        000620    Tower/XP rel 3 object
  2016. >12       belong        >0    not stripped
  2017. >20       beshort        0407    executable
  2018. >20       beshort        0410    pure executable
  2019. >22       beshort        >0    - version %ld
  2020. 0    beshort        000625    Tower/XP rel 3 object
  2021. >12       belong        >0    not stripped
  2022. >20       beshort        0407    executable
  2023. >20       beshort        0410    pure executable
  2024. >22       beshort        >0    - version %ld
  2025. 0    beshort        000630    Tower32/600/400 68020 object
  2026. >12       belong        >0    not stripped
  2027. >20       beshort        0407    executable
  2028. >20       beshort        0410    pure executable
  2029. >22       beshort        >0    - version %ld
  2030. 0    beshort        000640    Tower32/800 68020
  2031. >18       beshort        &020000    w/68881 object
  2032. >18       beshort        &040000    compatible object
  2033. >18       beshort        &~060000    object
  2034. >20       beshort        0407    executable
  2035. >20       beshort        0413    pure executable
  2036. >12       belong        >0    not stripped
  2037. >22       beshort        >0    - version %ld
  2038. 0    beshort        000645    Tower32/800 68010
  2039. >18       beshort        &040000    compatible object
  2040. >18       beshort        &~060000 object
  2041. >20       beshort        0407    executable
  2042. >20       beshort        0413    pure executable
  2043. >12       belong        >0    not stripped
  2044. >22       beshort        >0    - version %ld
  2045.  
  2046. #------------------------------------------------------------------------------
  2047. # netbsd:  file(1) magic for NetBSD objects
  2048. #
  2049. # All new-style magic numbers are in network byte order.
  2050. #
  2051. 0    lelong            000000413    386BSD demand paged executable
  2052. >16    lelong            >0        not stripped
  2053. 0    lelong            000000314    BSDI demand paged executable
  2054. >16    lelong            >0        not stripped
  2055. >32    byte            0x6a        (uses shared libs)
  2056.  
  2057. 0    lelong&077777777    041400314    FreeBSD/i386 demand paged
  2058. >3    byte            &0x80
  2059. >>20    lelong            <4096        shared library
  2060. >>20    lelong            =4096        dynamically linked executable
  2061. >>20    lelong            >4096        dynamically linked executable
  2062. >3    byte            ^0x80        executable
  2063. >16    lelong            >0        not stripped
  2064.  
  2065. 0    lelong            000000407    NetBSD little-endian object file
  2066. >16    lelong            >0        not stripped
  2067. 0    belong            000000407    NetBSD big-endian object file
  2068. >16    belong            >0        not stripped
  2069.  
  2070. 0    belong&0377777777    041400413    NetBSD/i386 demand paged
  2071. >0    byte            &0x80        
  2072. >>20    lelong            <4096        shared library
  2073. >>20    lelong            =4096        dynamically linked executable
  2074. >>20    lelong            >4096        dynamically linked executable
  2075. >0    byte            ^0x80        executable
  2076. >16    lelong            >0        not stripped
  2077. 0    belong&0377777777    041400410    NetBSD/i386 pure
  2078. >0    byte            &0x80        dynamically linked executable
  2079. >0    byte            ^0x80        executable
  2080. >16    lelong            >0        not stripped
  2081. 0    belong&0377777777    041400407    NetBSD/i386
  2082. >0    byte            &0x80        dynamically linked executable
  2083. >0    byte            ^0x80
  2084. >>0    byte            &0x40        position independent
  2085. >>20    lelong            !0        executable
  2086. >>20    lelong            =0        object file
  2087. >16    lelong            >0        not stripped
  2088. 0    belong&0377777777    041400507    NetBSD/i386 core
  2089. >12    string            >\0        from '%s'
  2090.  
  2091. 0    belong&0377777777    041600413    NetBSD/m68k demand paged
  2092. >0    byte            &0x80        
  2093. >>20    belong            <8192        shared library
  2094. >>20    belong            =8192        dynamically linked executable
  2095. >>20    belong            >8192        dynamically linked executable
  2096. >0    byte            ^0x80        executable
  2097. >16    belong            >0        not stripped
  2098. 0    belong&0377777777    041600410    NetBSD/m68k pure
  2099. >0    byte            &0x80        dynamically linked executable
  2100. >0    byte            ^0x80        executable
  2101. >16    belong            >0        not stripped
  2102. 0    belong&0377777777    041600407    NetBSD/m68k
  2103. >0    byte            &0x80        dynamically linked executable
  2104. >0    byte            ^0x80
  2105. >>0    byte            &0x40        position independent
  2106. >>20    belong            !0        executable
  2107. >>20    belong            =0        object file
  2108. >16    belong            >0        not stripped
  2109. 0    belong&0377777777    041600507    NetBSD/m68k core
  2110. >12    string            >\0        from '%s'
  2111.  
  2112. 0    belong&0377777777    042000413    NetBSD/m68k4k demand paged
  2113. >0    byte            &0x80        
  2114. >>20    belong            <4096        shared library
  2115. >>20    belong            =4096        dynamically linked executable
  2116. >>20    belong            >4096        dynamically linked executable
  2117. >0    byte            ^0x80        executable
  2118. >16    belong            >0        not stripped
  2119. 0    belong&0377777777    042000410    NetBSD/m68k4k pure
  2120. >0    byte            &0x80        dynamically linked executable
  2121. >0    byte            ^0x80        executable
  2122. >16    belong            >0        not stripped
  2123. 0    belong&0377777777    042000407    NetBSD/m68k4k
  2124. >0    byte            &0x80        dynamically linked executable
  2125. >0    byte            ^0x80
  2126. >>0    byte            &0x40        position independent
  2127. >>20    belong            !0        executable
  2128. >>20    belong            =0        object file
  2129. >16    belong            >0        not stripped
  2130. 0    belong&0377777777    042000507    NetBSD/m68k4k core
  2131. >12    string            >\0        from '%s'
  2132.  
  2133. 0    belong&0377777777    042200413    NetBSD/ns32532 demand paged
  2134. >0    byte            &0x80        
  2135. >>20    lelong            <4096        shared library
  2136. >>20    lelong            =4096        dynamically linked executable
  2137. >>20    lelong            >4096        dynamically linked executable
  2138. >0    byte            ^0x80        executable
  2139. >16    lelong            >0        not stripped
  2140. 0    belong&0377777777    042200410    NetBSD/ns32532 pure
  2141. >0    byte            &0x80        dynamically linked executable
  2142. >0    byte            ^0x80        executable
  2143. >16    lelong            >0        not stripped
  2144. 0    belong&0377777777    042200407    NetBSD/ns32532
  2145. >0    byte            &0x80        dynamically linked executable
  2146. >0    byte            ^0x80
  2147. >>0    byte            &0x40        position independent
  2148. >>20    lelong            !0        executable
  2149. >>20    lelong            =0        object file
  2150. >16    lelong            >0        not stripped
  2151. 0    belong&0377777777    042200507    NetBSD/ns32532 core
  2152. >12    string            >\0        from '%s'
  2153.  
  2154. 0    belong&0377777777    042400413    NetBSD/sparc demand paged
  2155. >0    byte            &0x80        
  2156. >>20    belong            <8192        shared library
  2157. >>20    belong            =8192        dynamically linked executable
  2158. >>20    belong            >8192        dynamically linked executable
  2159. >0    byte            ^0x80        executable
  2160. >16    belong            >0        not stripped
  2161. 0    belong&0377777777    042400410    NetBSD/sparc pure
  2162. >0    byte            &0x80        dynamically linked executable
  2163. >0    byte            ^0x80        executable
  2164. >16    belong            >0        not stripped
  2165. 0    belong&0377777777    042400407    NetBSD/sparc
  2166. >0    byte            &0x80        dynamically linked executable
  2167. >0    byte            ^0x80
  2168. >>0    byte            &0x40        position independent
  2169. >>20    belong            !0        executable
  2170. >>20    belong            =0        object file
  2171. >16    belong            >0        not stripped
  2172. 0    belong&0377777777    042400507    NetBSD/sparc core
  2173. >12    string            >\0        from '%s'
  2174.  
  2175. 0    belong&0377777777    042600413    NetBSD/pmax demand paged
  2176. >0    byte            &0x80        
  2177. >>20    lelong            <4096        shared library
  2178. >>20    lelong            =4096        dynamically linked executable
  2179. >>20    lelong            >4096        dynamically linked executable
  2180. >0    byte            ^0x80        executable
  2181. >16    lelong            >0        not stripped
  2182. 0    belong&0377777777    042600410    NetBSD/pmax pure
  2183. >0    byte            &0x80        dynamically linked executable
  2184. >0    byte            ^0x80        executable
  2185. >16    lelong            >0        not stripped
  2186. 0    belong&0377777777    042600407    NetBSD/pmax
  2187. >0    byte            &0x80        dynamically linked executable
  2188. >0    byte            ^0x80
  2189. >>0    byte            &0x40        position independent
  2190. >>20    lelong            !0        executable
  2191. >>20    lelong            =0        object file
  2192. >16    lelong            >0        not stripped
  2193. 0    belong&0377777777    042600507    NetBSD/pmax core
  2194. >12    string            >\0        from '%s'
  2195.  
  2196. 0    belong&0377777777    043000413    NetBSD/vax demand paged
  2197. >0    byte            &0x80        
  2198. >>20    lelong            <4096        shared library
  2199. >>20    lelong            =4096        dynamically linked executable
  2200. >>20    lelong            >4096        dynamically linked executable
  2201. >0    byte            ^0x80        executable
  2202. >16    lelong            >0        not stripped
  2203. 0    belong&0377777777    043000410    NetBSD/vax pure
  2204. >0    byte            &0x80        dynamically linked executable
  2205. >0    byte            ^0x80        executable
  2206. >16    lelong            >0        not stripped
  2207. 0    belong&0377777777    043000407    NetBSD/vax
  2208. >0    byte            &0x80        dynamically linked executable
  2209. >0    byte            ^0x80
  2210. >>0    byte            &0x40        position independent
  2211. >>20    lelong            !0        executable
  2212. >>20    lelong            =0        object file
  2213. >16    lelong            >0        not stripped
  2214. 0    belong&0377777777    043000507    NetBSD/vax core
  2215. >12    string            >\0        from '%s'
  2216.  
  2217. 0    belong&0377777777    043400413    NetBSD/mips demand paged
  2218. >0    byte            &0x80        
  2219. >>20    belong            <8192        shared library
  2220. >>20    belong            =8192        dynamically linked executable
  2221. >>20    belong            >8192        dynamically linked executable
  2222. >0    byte            ^0x80        executable
  2223. >16    belong            >0        not stripped
  2224. 0    belong&0377777777    043400410    NetBSD/mips pure
  2225. >0    byte            &0x80        dynamically linked executable
  2226. >0    byte            ^0x80        executable
  2227. >16    belong            >0        not stripped
  2228. 0    belong&0377777777    043400407    NetBSD/mips
  2229. >0    byte            &0x80        dynamically linked executable
  2230. >0    byte            ^0x80
  2231. >>0    byte            &0x40        position independent
  2232. >>20    belong            !0        executable
  2233. >>20    belong            =0        object file
  2234. >16    belong            >0        not stripped
  2235. 0    belong&0377777777    043400507    NetBSD/mips core
  2236. >12    string            >\0        from '%s'
  2237.  
  2238. #------------------------------------------------------------------------------
  2239. # news:  file(1) magic for SunOS NeWS fonts (not "news" as in "netnews")
  2240. #
  2241. 0    string        StartFontMetrics    ASCII font metrics
  2242. 0    string        StartFont    ASCII font bits
  2243. 0    belong        0x137A2944    NeWS bitmap font
  2244. 0    belong        0x137A2947    NeWS font family
  2245. 0    belong        0x137A2950    scalable OpenFont binary
  2246. 0    belong        0x137A2951    encrypted scalable OpenFont binary
  2247. 8    belong        0x137A2B45    X11/NeWS bitmap font
  2248. 8    belong        0x137A2B48    X11/NeWS font family
  2249.  
  2250. #------------------------------------------------------------------------------
  2251. # pbm:  file(1) magic for Portable Bitmap files
  2252. #
  2253. # XXX - byte order?
  2254. #
  2255. 0    short    0x2a17    "compact bitmap" format (Poskanzer)
  2256. #------------------------------------------------------------------------------
  2257. # pdf:  file(1) magic for Portable Document Format
  2258. #
  2259.  
  2260. 0    string        %PDF-        PDF document
  2261. >5    byte        x        \b, version %c
  2262. >7    byte        x        \b.%c
  2263.  
  2264. #------------------------------------------------------------------------------
  2265. # pdp:  file(1) magic for PDP-11 executable/object and APL workspace
  2266. #
  2267. 0    lelong        0101555        PDP-11 single precision APL workspace
  2268. 0    lelong        0101554        PDP-11 double precision APL workspace
  2269. #
  2270. # PDP-11 a.out
  2271. #
  2272. 0    leshort        0407        PDP-11 executable
  2273. >8    leshort        >0        not stripped
  2274. >15    byte        >0        - version %ld
  2275.  
  2276. 0    leshort        0401        PDP-11 UNIX/RT ldp
  2277. 0    leshort        0405        PDP-11 old overlay
  2278.  
  2279. 0    leshort        0410        PDP-11 pure executable
  2280. >8    leshort        >0        not stripped
  2281. >15    byte        >0        - version %ld
  2282.  
  2283. 0    leshort        0411        PDP-11 separate I&D executable
  2284. >8    leshort        >0        not stripped
  2285. >15    byte        >0        - version %ld
  2286.  
  2287. 0    leshort        0437        PDP-11 kernel overlay
  2288.  
  2289. #------------------------------------------------------------------------------
  2290. # pgp:  file(1) magic for Pretty Good Privacy
  2291. #
  2292. 0       beshort         0x9900                  PGP key public ring
  2293. 0       beshort         0x9501                  PGP key security ring
  2294. 0       beshort         0x9500                  PGP key security ring
  2295. 0    beshort        0xa600            PGP encrypted data
  2296. 0       string          -----BEGIN\040PGP       PGP armored data
  2297. >15     string          PUBLIC\040KEY\040BLOCK- public key block
  2298. >15     string          MESSAGE-                message
  2299. >15     string          SIGNED\040MESSAGE-      signed message
  2300. >15     string          PGP\040SIGNATURE-       signature
  2301.  
  2302. #------------------------------------------------------------------------------
  2303. # pkgadd:  file(1) magic for SysV R4 PKG Datastreams
  2304. #
  2305. 0       string          #\ PaCkAgE\ DaTaStReAm  pkg Datastream (SVR4)
  2306.  
  2307. #------------------------------------------------------------------------------
  2308. # plus5:  file(1) magic for Plus Five's UNIX MUMPS
  2309. #
  2310. # XXX - byte order?  Paging Hokey....
  2311. #
  2312. 0    short        0x259        mumps avl global
  2313. >2    byte        >0        (V%d)
  2314. >6    byte        >0        with %d byte name
  2315. >7    byte        >0        and %d byte data cells
  2316. 0    short        0x25a        mumps blt global
  2317. >2    byte        >0        (V%d)
  2318. >8    short        >0        - %d byte blocks
  2319. >15    byte        0x00        - P/D format
  2320. >15    byte        0x01        - P/K/D format
  2321. >15    byte        0x02        - K/D format
  2322. >15    byte        >0x02        - Bad Flags
  2323.  
  2324. #------------------------------------------------------------------------------
  2325. # printer:  file(1) magic for printer-formatted files
  2326. #
  2327.  
  2328. # PostScript, updated by Daniel Quinlan (quinlan@yggdrasil.com)
  2329. 0    string        %!        PostScript document text
  2330. >2    string        PS-Adobe-    conforming
  2331. >>11    string        >\0        at level %.3s
  2332. >>>15    string        EPS        - type %s
  2333. >>>15    string        Query        - type %s
  2334. >>>15    string        ExitServer    - type %s
  2335. # Some PCs have the annoying habit of adding a ^D as a document separator
  2336. 0    string        \004%!        PostScript document text
  2337. >3    string        PS-Adobe-    conforming
  2338. >>12    string        >\0        at level %.3s
  2339. >>>16    string        EPS        - type %s
  2340. >>>16    string        Query        - type %s
  2341. >>>16    string        ExitServer    - type %s
  2342.  
  2343. # HP Printer Job Language
  2344. 0    string        \033%-12345X@PJL    HP Printer Job Language data
  2345. >15    string        \ ENTER\ LANGUAGE\ =
  2346. >31    string        PostScript        Postscript
  2347.  
  2348. # HP Printer Control Language, Daniel Quinlan (quinlan@yggdrasil.com)
  2349. 0    string        \033E\033    HP PCL printer data
  2350. >3    string        \&l0A        - default page size
  2351. >3    string        \&l1A        - US executive page size
  2352. >3    string        \&l2A        - US letter page size
  2353. >3    string        \&l3A        - US legal page size
  2354. >3    string        \&l26A        - A4 page size
  2355. >3    string        \&l80A        - Monarch envelope size
  2356. >3    string        \&l81A        - No. 10 envelope size
  2357. >3    string        \&l90A        - Intl. DL envelope size
  2358. >3    string        \&l91A        - Intl. C5 envelope size
  2359. >3    string        \&l100A        - Intl. B5 envelope size
  2360. >3    string        \&l-81A        - No. 10 envelope size (landscape)
  2361. >3    string        \&l-90A        - Intl. DL envelope size (landscape)
  2362.  
  2363. # IMAGEN printer-ready files:
  2364. 0    string    @document(        Imagen printer
  2365. # this only works if "language xxx" is first item in Imagen header.
  2366. >10    string    language\ impress    (imPRESS data)
  2367. >10    string    language\ daisy        (daisywheel text)
  2368. >10    string    language\ diablo    (daisywheel text)
  2369. >10    string    language\ printer    (line printer emulation)
  2370. >10    string    language\ tektronix    (Tektronix 4014 emulation)
  2371. # Add any other languages that your Imagen uses - remember
  2372. # to keep the word `text' if the file is human-readable.
  2373. # [GRR 950115:  missing "postscript" or "ultrascript" (whatever it was called)]
  2374. #
  2375. # Now magic for IMAGEN font files...
  2376. 0    string        Rast        RST-format raster font data
  2377. >45    string        >0        face %
  2378.  
  2379. #------------------------------------------------------------------------------
  2380. # psdbms:  file(1) magic for psdatabase
  2381. #
  2382. 0    belong&0xff00ffff    0x56000000    ps database
  2383. >1    string    >\0    version %s
  2384. >4    string    >\0    from kernel %s
  2385.  
  2386. #------------------------------------------------------------------------------
  2387. # pyramid:  file(1) magic for Pyramids
  2388. #
  2389. # XXX - byte order?
  2390. #
  2391. 0    long        0x50900107    Pyramid 90x family executable
  2392. 0    long        0x50900108    Pyramid 90x family pure executable
  2393. >16    long        >0        not stripped
  2394. 0    long        0x5090010b    Pyramid 90x family demand paged pure executable
  2395. >16    long        >0        not stripped
  2396. #------------------------------------------------------------------------------
  2397. #
  2398. # RPM: file(1) magic for Red Hat Packages   Erik Troan (ewt@redhat.com)
  2399. #
  2400. 0    beshort        0xedab        
  2401. >2    beshort        0xeedb        RPM
  2402. >>4    byte        x        v%d
  2403. >>6    beshort        0        bin
  2404. >>6    beshort        1        src
  2405. >>8    beshort        1        i386
  2406. >>8    beshort        2        Alpha
  2407. >>8    beshort        3        Sparc
  2408. >>8    beshort        4        MIPS
  2409. >>8    beshort        5        PowerPC
  2410. >>8    beshort        6        68000
  2411. >>8     beshort         7               SGI
  2412. >>10    string        x        %s
  2413.  
  2414. #------------------------------------------------------------------------------
  2415. # rtf:    file(1) magic for Rich Text Format (RTF)
  2416. #
  2417. # Duncan P. Simpson, D.P.Simpson@dcs.warwick.ac.uk
  2418. #
  2419. 0    string        {\\rtf        Rich Text Format data,
  2420. >5    byte        x        version %c,
  2421. >6    string        \\ansi        ANSI
  2422. >6    string        \\mac        Apple Macintosh
  2423. >6    string        \\pc        IBM PC, code page 437
  2424. >6    string        \\pca        IBM PS/2, code page 850
  2425.  
  2426. #------------------------------------------------------------------------------
  2427. # sc:  file(1) magic for "sc" spreadsheet
  2428. #
  2429. 38    string        Spreadsheet    sc spreadsheet file
  2430.  
  2431. #------------------------------------------------------------------------------
  2432. # sccs:  file(1) magic for SCCS archives
  2433. #
  2434. # SCCS archive structure:
  2435. # \001h01207
  2436. # \001s 00276/00000/00000
  2437. # \001d D 1.1 87/09/23 08:09:20 ian 1 0
  2438. # \001c date and time created 87/09/23 08:09:20 by ian
  2439. # \001e
  2440. # \001u
  2441. # \001U
  2442. # ... etc.
  2443. # Now '\001h' happens to be the same as the 3B20's a.out magic number (0550).
  2444. # *Sigh*. And these both came from various parts of the USG.
  2445. # Maybe we should just switch everybody from SCCS to RCS!
  2446. # Further, you can't just say '\001h0', because the five-digit number
  2447. # is a checksum that could (presumably) have any leading digit,
  2448. # and we don't have regular expression matching yet. 
  2449. # Hence the following official kludge:
  2450. 8    string        \001s\             SCCS archive data
  2451.  
  2452. #------------------------------------------------------------------------------
  2453. # sendmail:  file(1) magic for sendmail config files
  2454. #
  2455. # XXX - byte order?
  2456. #
  2457. 0    byte    046      Sendmail frozen configuration 
  2458. >16    string    >\0      - version %s
  2459. 0    short    0x271c      Sendmail frozen configuration
  2460. >16    string    >\0      - version %s
  2461.  
  2462. #------------------------------------------------------------------------------
  2463. # sequent:  file(1) magic for Sequent machines
  2464. #
  2465. # Sequent information updated by Don Dwiggins <atsun!dwiggins>.
  2466. # For Sequent's multiprocessor systems (incomplete).
  2467. 0    lelong    0x00ea            BALANCE NS32000 .o
  2468. >16    lelong    >0        not stripped
  2469. >124    lelong    >0        version %ld
  2470. 0    lelong    0x10ea            BALANCE NS32000 executable (0 @ 0)
  2471. >16    lelong  >0                not stripped
  2472. >124    lelong    >0        version %ld
  2473. 0    lelong    0x20ea            BALANCE NS32000 executable (invalid @ 0)
  2474. >16    lelong  >0                not stripped
  2475. >124    lelong    >0        version %ld
  2476. 0    lelong    0x30ea            BALANCE NS32000 standalone executable
  2477. >16    lelong  >0              not stripped
  2478. >124    lelong    >0        version %ld
  2479. #
  2480. # Symmetry information added by Jason Merrill <jason@jarthur.claremont.edu>.
  2481. # Symmetry magic nums will not be reached if DOS COM comes before them;
  2482. # byte 0xeb is matched before these get a chance.
  2483. 0    leshort    0x12eb        SYMMETRY i386 .o
  2484. >16    lelong    >0        not stripped
  2485. >124    lelong    >0        version %ld
  2486. 0    leshort    0x22eb        SYMMETRY i386 executable (0 @ 0)
  2487. >16    lelong    >0        not stripped
  2488. >124    lelong    >0        version %ld
  2489. 0    leshort    0x32eb        SYMMETRY i386 executable (invalid @ 0)
  2490. >16    lelong    >0        not stripped
  2491. >124    lelong    >0        version %ld
  2492. 0    leshort    0x42eb        SYMMETRY i386 standalone executable
  2493. >16    lelong    >0        not stripped
  2494. >124    lelong    >0        version %ld
  2495.  
  2496. #------------------------------------------------------------------------------
  2497. # sgi:  file(1) magic for Silicon Graphics (MIPS, IRIS, IRIX, etc.)
  2498. #
  2499. # all of SGI's *current* machines and OSes run in big-endian mode on the
  2500. # MIPS machines, as far as I know.
  2501. #
  2502. # XXX - what is the blank "-" line?
  2503. #
  2504. 0    belong    0407        old SGI 68020 executable
  2505. 0    belong    0410        old SGI 68020 pure executable
  2506. 0    beshort    0x8765        disk quotas file
  2507. 0    beshort    0x0506        IRIS Showcase file
  2508. >2    byte    0x49        -
  2509. >3    byte    x        - version %ld
  2510. 0    beshort    0x0226        IRIS Showcase template
  2511. >2    byte    0x63        -
  2512. >3    byte    x        - version %ld
  2513. 0    belong    0x5343464d    IRIS Showcase file
  2514. >4    byte    x        - version %ld
  2515. 0    belong    0x5443464d    IRIS Showcase template
  2516. >4    byte    x        - version %ld
  2517. 0    belong    0xdeadbabe    IRIX Parallel Arena
  2518. >8    belong    >0        - version %ld
  2519. #
  2520. 0    beshort    0x0160        MIPSEB COFF executable
  2521. >20    beshort    0407        (impure)
  2522. >20    beshort    0410        (swapped)
  2523. >20    beshort    0413        (paged)
  2524. >8    belong    >0        not stripped
  2525. >8    belong    0        stripped
  2526. >22    byte    x        - version %ld
  2527. >23    byte    x        .%ld
  2528. #
  2529. 0    beshort    0x0162        MIPSEL COFF executable
  2530. >20    beshort    0407        (impure)
  2531. >20    beshort    0410        (swapped)
  2532. >20    beshort    0413        (paged)
  2533. >8    belong    >0        not stripped
  2534. >8    belong    0        stripped
  2535. >23    byte    x        - version %d
  2536. >22    byte    x        .%ld
  2537. #
  2538. 0    beshort    0x6001        MIPSEB-LE COFF executable
  2539. >20    beshort    03401        (impure)
  2540. >20    beshort    04001        (swapped)
  2541. >20    beshort    05401        (paged)
  2542. >8    belong    >0        not stripped
  2543. >8    belong    0        stripped
  2544. >22    byte    x        - version %d
  2545. >23    byte    x        .%ld
  2546. #
  2547. 0    beshort    0x6201        MIPSEL-LE COFF executable
  2548. >20    beshort    03401        (impure)
  2549. >20    beshort    04001        (swapped)
  2550. >20    beshort    05401        (paged)
  2551. >8    belong    >0        not stripped
  2552. >8    belong    0        stripped
  2553. >22    byte    x        - version %ld
  2554. >23    byte    x        .%ld
  2555. #
  2556. # MIPS 2 additions
  2557. #
  2558. 0    beshort    0x0163        MIPSEB MIPS-II COFF executable
  2559. >20    beshort    0407        (impure)
  2560. >20    beshort    0410        (swapped)
  2561. >20    beshort    0413        (paged)
  2562. >8    belong    >0        not stripped
  2563. >8    belong    0        stripped
  2564. >22    byte    x        - version %ld
  2565. >23    byte    x        .%ld
  2566. #
  2567. 0    beshort    0x0166        MIPSEL MIPS-II COFF executable
  2568. >20    beshort    0407        (impure)
  2569. >20    beshort    0410        (swapped)
  2570. >20    beshort    0413        (paged)
  2571. >8    belong    >0        not stripped
  2572. >8    belong    0        stripped
  2573. >22    byte    x        - version %ld
  2574. >23    byte    x        .%ld
  2575. #
  2576. 0    beshort    0x6301        MIPSEB-LE MIPS-II COFF executable
  2577. >20    beshort    03401        (impure)
  2578. >20    beshort    04001        (swapped)
  2579. >20    beshort    05401        (paged)
  2580. >8    belong    >0        not stripped
  2581. >8    belong    0        stripped
  2582. >23    byte    x        - version %ld
  2583. >23    byte    x        .%ld
  2584. #
  2585. 0    beshort    0x6601        MIPSEL-LE MIPS-II COFF executable
  2586. >20    beshort    03401        (impure)
  2587. >20    beshort    04001        (swapped)
  2588. >20    beshort    05401        (paged)
  2589. >8    belong    >0        not stripped
  2590. >8    belong    0        stripped
  2591. >23    byte    x        - version %ld
  2592. >23    byte    x        .%ld
  2593. #
  2594. # MIPS 3 additions
  2595. #
  2596. 0    beshort    0x0140        MIPSEB MIPS-III COFF executable
  2597. >20    beshort    0407        (impure)
  2598. >20    beshort    0410        (swapped)
  2599. >20    beshort    0413        (paged)
  2600. >8    belong    >0        not stripped
  2601. >8    belong    0        stripped
  2602. >22    byte    x        - version %ld
  2603. >23    byte    x        .%ld
  2604. #
  2605. 0    beshort    0x0142        MIPSEL MIPS-III COFF executable
  2606. >20    beshort    0407        (impure)
  2607. >20    beshort    0410        (swapped)
  2608. >20    beshort    0413        (paged)
  2609. >8    belong    >0        not stripped
  2610. >8    belong    0        stripped
  2611. >22    byte    x        - version %ld
  2612. >23    byte    x        .%ld
  2613. #
  2614. 0    beshort    0x4001        MIPSEB-LE MIPS-III COFF executable
  2615. >20    beshort    03401        (impure)
  2616. >20    beshort    04001        (swapped)
  2617. >20    beshort    05401        (paged)
  2618. >8    belong    >0        not stripped
  2619. >8    belong    0        stripped
  2620. >23    byte    x        - version %ld
  2621. >23    byte    x        .%ld
  2622. #
  2623. 0    beshort    0x4201        MIPSEL-LE MIPS-III COFF executable
  2624. >20    beshort    03401        (impure)
  2625. >20    beshort    04001        (swapped)
  2626. >20    beshort    05401        (paged)
  2627. >8    belong    >0        not stripped
  2628. >8    belong    0        stripped
  2629. >23    byte    x        - version %ld
  2630. >23    byte    x        .%ld
  2631. #
  2632. 0    beshort    0x180        MIPSEB Ucode
  2633. 0    beshort    0x182        MIPSEL Ucode
  2634. # 32bit core file
  2635. 0    belong    0xdeadadb0    IRIX core dump
  2636. >4    belong    1        of
  2637. >16    string    >\0        '%s'
  2638. # 64bit core file
  2639. 0    belong    0xdeadad40    IRIX 64-bit core dump
  2640. >4    belong    1        of
  2641. >16    string    >\0        '%s'
  2642. # New style crash dump file
  2643. 0    string    \x43\x72\x73\x68\x44\x75\x6d\x70    IRIX vmcore dump of
  2644. >36    string    >\0                    '%s'
  2645. # Trusted IRIX info
  2646. 0    string    SGIAUDIT    SGI Audit file
  2647. >8    byte    x        - version %d
  2648. >9    byte    x        .%ld
  2649. # Are these three SGI-based file types or general ones?
  2650. 0    string    WNGZWZSC    Wingz compiled script
  2651. 0    string    WNGZWZSS    Wingz spreadsheet
  2652. 0    string    WNGZWZHP    Wingz help file
  2653. #
  2654. 0    string    \#Inventor V    IRIS Inventor file
  2655. # XXX - I don't know what next thing is!  It is likely to be an image
  2656. # (or movie) format
  2657. 0    string    glfHeadMagic();        GLF_TEXT
  2658. 4    belong    0x41010000        GLF_BINARY_LSB_FIRST
  2659. 4    belong    0x00000141        GLF_BINARY_MSB_FIRST
  2660.  
  2661. #------------------------------------------------------------------------------
  2662. # sgml:  file(1) magic for Standard Generalized Markup Language
  2663.  
  2664. # HyperText Markup Language (HTML) is an SGML document type,
  2665. # from Daniel Quinlan (quinlan@yggdrasil.com)
  2666. 0    string        \<!DOCTYPE\ HTML    HTML document text
  2667. 0    string        \<!doctype\ html    HTML document text
  2668. 0    string        \<HEAD        HTML document text
  2669. 0    string        \<head        HTML document text
  2670. 0    string        \<TITLE        HTML document text
  2671. 0    string        \<title        HTML document text
  2672. 0    string        \<html        HTML document text
  2673. 0    string        \<HTML        HTML document text
  2674.  
  2675. # SGML, mostly from rph@sq
  2676. 0    string        \<!DOCTYPE    exported SGML document text
  2677. 0    string        \<!doctype    exported SGML document text
  2678. 0    string        \<!SUBDOC    exported SGML subdocument text
  2679. 0    string        \<!subdoc    exported SGML subdocument text
  2680. 0    string        \<!--        exported SGML document text
  2681.  
  2682. #------------------------------------------------------------------------------
  2683. # softquad:  file(1) magic for SoftQuad Publishing Software
  2684. #
  2685. # $Id: softquad,v 1.9 1995/01/21 21:09:00 christos Exp $
  2686. # Author/Editor and RulesBuilder
  2687. #
  2688. # XXX - byte order?
  2689. #
  2690. 0    string        \<!SQ\ DTD>    Compiled SGML rules file
  2691. >9    string        >\0         Type %s
  2692. 0    string        \<!SQ\ A/E>    A/E SGML Document binary
  2693. >9    string        >\0         Type %s
  2694. 0    string        \<!SQ\ STS>    A/E SGML binary styles file
  2695. >9    string        >\0         Type %s
  2696. 0    short        0xc0de        Compiled PSI (v1) data
  2697. 0    short        0xc0da        Compiled PSI (v2) data
  2698. >3    string        >\0        (%s)
  2699. # Binary sqtroff font/desc files...
  2700. 0    short        0125252        SoftQuad DESC or font file binary
  2701. >2    short        >0        - version %d
  2702. # Bitmaps...
  2703. 0    string        SQ\ BITMAP1    SoftQuad Raster Format text
  2704. #0    string        SQ\ BITMAP2    SoftQuad Raster Format data
  2705. # sqtroff intermediate language (replacement for ditroff int. lang.)
  2706. 0    string        X\         SoftQuad troff Context intermediate
  2707. >2    string        495        for AT&T 495 laser printer
  2708. >2    string        hp        for Hewlett-Packard LaserJet
  2709. >2    string        impr        for IMAGEN imPRESS
  2710. >2    string        ps        for PostScript
  2711.  
  2712. #------------------------------------------------------------------------------
  2713. # sun:  file(1) magic for Sun machines
  2714. #
  2715. # Values for big-endian Sun (MC680x0, SPARC) binaries on pre-5.x
  2716. # releases.  (5.x uses ELF.)
  2717. #
  2718. 0    belong&077777777    0600413        sparc demand paged
  2719. >0    byte        &0x80
  2720. >>20    belong        <4096        shared library
  2721. >>20    belong        =4096        dynamically linked executable
  2722. >>20    belong        >4096        dynamically linked executable
  2723. >0    byte        ^0x80        executable
  2724. >16    belong        >0        not stripped
  2725. 0    belong&077777777    0600410        sparc pure
  2726. >0    byte        &0x80        dynamically linked executable
  2727. >0    byte        ^0x80        executable
  2728. >16    belong        >0        not stripped
  2729. 0    belong&077777777    0600407        sparc
  2730. >0    byte        &0x80        dynamically linked executable
  2731. >0    byte        ^0x80        executable
  2732. >16    belong        >0        not stripped
  2733.  
  2734. 0    belong&077777777    0400413        mc68020 demand paged
  2735. >0    byte        &0x80
  2736. >>20    belong        <4096        shared library
  2737. >>20    belong        =4096        dynamically linked executable
  2738. >>20    belong        >4096        dynamically linked executable
  2739. >16    belong        >0        not stripped
  2740. 0    belong&077777777    0400410        mc68020 pure
  2741. >0    byte        &0x80        dynamically linked executable
  2742. >0    byte        ^0x80        executable
  2743. >16    belong        >0        not stripped
  2744. 0    belong&077777777    0400407        mc68020
  2745. >0    byte        &0x80        dynamically linked executable
  2746. >0    byte        ^0x80        executable
  2747. >16    belong        >0        not stripped
  2748.  
  2749. 0    belong&077777777    0200413        mc68010 demand paged
  2750. >0    byte        &0x80
  2751. >>20    belong        <4096        shared library
  2752. >>20    belong        =4096        dynamically linked executable
  2753. >>20    belong        >4096        dynamically linked executable
  2754. >16    belong        >0        not stripped
  2755. 0    belong&077777777    0200410        mc68010 pure
  2756. >0    byte        &0x80        dynamically linked executable
  2757. >0    byte        ^0x80        executable
  2758. >16    belong        >0        not stripped
  2759. 0    belong&077777777    0200407        mc68010
  2760. >0    byte        &0x80        dynamically linked executable
  2761. >0    byte        ^0x80        executable
  2762. >16    belong        >0        not stripped
  2763.  
  2764. # reworked these to avoid anything beginning with zero becoming "old sun-2"
  2765. 0    belong        0407        old sun-2 executable
  2766. >16    belong        >0        not stripped
  2767. 0    belong        0410        old sun-2 pure executable
  2768. >16    belong        >0        not stripped
  2769. 0    belong        0413        old sun-2 demand paged executable
  2770. >16    belong        >0        not stripped
  2771.  
  2772. #
  2773. # Core files.  "SPARC 4.x BCP" means "core file from a SunOS 4.x SPARC
  2774. # binary executed in compatibility mode under SunOS 5.x".
  2775. #
  2776. 0    belong        0x080456    SunOS core file
  2777. >4    belong        432        (SPARC)
  2778. >>132    string        >\0        from '%s'
  2779. >>116    belong        =3        (quit)
  2780. >>116    belong        =4        (illegal instruction)
  2781. >>116    belong        =5        (trace trap)
  2782. >>116    belong        =6        (abort)
  2783. >>116    belong        =7        (emulator trap)
  2784. >>116    belong        =8        (arithmetic exception)
  2785. >>116    belong        =9        (kill)
  2786. >>116    belong        =10        (bus error)
  2787. >>116    belong        =11        (segmentation violation)
  2788. >>116    belong        =12        (bad argument to system call)
  2789. >>116    belong        =29        (resource lost)
  2790. >>120    belong        x        (T=%dK,
  2791. >>124    belong        x        D=%dK,
  2792. >>128    belong        x        S=%dK)
  2793. >4    belong        826        (68K)
  2794. >>128    string        >\0        from '%s'
  2795. >4    belong        456        (SPARC 4.x BCP)
  2796. >>152    string        >\0        from '%s'
  2797.  
  2798. #------------------------------------------------------------------------------
  2799. # terminfo:  file(1) magic for terminfo
  2800. #
  2801. # XXX - byte order for screen images?
  2802. #
  2803. 0    string        \032\001    Compiled terminfo entry
  2804. 0    short        0433        Curses screen image
  2805. 0    short        0434        Curses screen image
  2806.  
  2807. #------------------------------------------------------------------------------
  2808. # tex:  file(1) magic for TeX files
  2809. #
  2810. # From <conklin@talisman.kaleida.com>
  2811.  
  2812. # Although we may know the offset of certain text fields in TeX DVI
  2813. # and font files, we can't use them reliably because they are not
  2814. # zero terminated. [but we do anyway, christos]
  2815. 0    string        \367\002    TeX DVI file
  2816. >16    string        >\0        (%s)
  2817. 0    string        \367\203    TeX generic font data
  2818. 0    string        \367\131    TeX packed font data
  2819. >3    string        >\0        (%s)
  2820. 0    string        \367\312    TeX virtual font data
  2821. 0    string        This\ is\ TeX,    TeX transcript text
  2822. 0    string        This\ is\ METAFONT,    METAFONT transcript text
  2823.  
  2824. # There is no way to detect TeX Font Metric (*.tfm) files without
  2825. # breaking them apart and reading the data.  The following patterns
  2826. # match most *.tfm files generated by METAFONT or afm2tfm.
  2827. 2    string        \000\021    TeX font metric data
  2828. >33    string        >\0        (%s)
  2829. 2    string        \000\022    TeX font metric data
  2830. >33    string        >\0        (%s)
  2831.  
  2832. # Texinfo and GNU Info, from Daniel Quinlan (quinlan@yggdrasil.com)
  2833. 0    string        \\input\ texinfo    Texinfo source text
  2834. 0    string        This\ is\ Info\ file    GNU Info text
  2835.  
  2836. # TeX documents, from Daniel Quinlan (quinlan@yggdrasil.com)
  2837. 0    string        \\input        TeX document text
  2838. 0    string        \\section    LaTeX document text
  2839. 0    string        \\setlength    LaTeX document text
  2840. 0    string        \\documentstyle    LaTeX document text
  2841. 0    string        \\chapter    LaTeX document text
  2842.  
  2843. #------------------------------------------------------------------------------
  2844. # timezone:  file(1) magic for timezone data
  2845. #
  2846. # from Daniel Quinlan (quinlan@yggdrasil.com)
  2847. # this should work on Linux, SunOS, and maybe others
  2848. 0    string    \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1\0    timezone data
  2849. 0    string    \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\2\0    timezone data
  2850. 0    string  \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\3\0    timezone data
  2851. 0    string    \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\4\0    timezone data
  2852. 0    string    \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\5\0    timezone data
  2853. 0    string    \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\6\0    timezone data
  2854.  
  2855. #------------------------------------------------------------------------------
  2856. # troff:  file(1) magic for *roff
  2857. #
  2858. # updated by Daniel Quinlan (quinlan@yggdrasil.com)
  2859.  
  2860. # troff input
  2861. 0    string        .\\"        troff or preprocessor input text
  2862. 0    string        '\\"        troff or preprocessor input text
  2863. 0    string        '.\\"        troff or preprocessor input text
  2864. 0    string        \\"        troff or preprocessor input text
  2865.  
  2866. # ditroff intermediate output text
  2867. 0    string        x\ T        ditroff text
  2868. >4    string        cat        for the C/A/T phototypesetter
  2869. >4    string        ps        for PostScript
  2870. >4    string        dvi        for DVI
  2871. >4    string        ascii        for ASCII
  2872. >4    string        lj4        for LaserJet 4
  2873. >4    string        latin1        for ISO 8859-1 (Latin 1)
  2874. >4    string        X75        for xditview at 75dpi
  2875. >>7    string        -12        (12pt)
  2876. >4    string        X100        for xditview at 100dpi
  2877. >>8    string        -12        (12pt)
  2878.  
  2879. # output data formats
  2880. 0    string        \100\357    very old (C/A/T) troff output data
  2881.  
  2882. #------------------------------------------------------------------------------
  2883. # typeset:  file(1) magic for other typesetting
  2884. #
  2885. 0    string        Interpress/Xerox    Xerox InterPress data
  2886. >16    string        /            (version
  2887. >>17    string        >\0            %s)
  2888.  
  2889. #------------------------------------------------------------------------------
  2890. # unknown:  file(1) magic for unknown machines
  2891. #
  2892. # XXX - this probably should be pruned, as it'll match PDP-11 and
  2893. # VAX image formats.
  2894. #
  2895. # 0x107 is 0407; 0x108 is 0410; both are PDP-11 (executable and pure,
  2896. # respectively).
  2897. #
  2898. # 0x109 is 0411; that's PDP-11 split I&D, but the PDP-11 version doesn't
  2899. # have the "version %ld", which may be a bogus COFFism (I don't think
  2900. # there ever was COFF for the PDP-11).
  2901. #
  2902. # 0x10B is 0413; that's VAX demand-paged, but this is a short, not a
  2903. # long, as it would be on a VAX.
  2904. #
  2905. # 0x10C is 0414, 0x10D is 0415, and 0x10E is 416; those *are* unknown.
  2906. #
  2907. 0    short        0x107        unknown machine executable
  2908. >8    short        >0        not stripped
  2909. >15    byte        >0        - version %ld
  2910. 0    short        0x108        unknown pure executable
  2911. >8    short        >0        not stripped
  2912. >15    byte        >0        - version %ld
  2913. 0    short        0x109        PDP-11 separate I&D
  2914. >8    short        >0        not stripped
  2915. >15    byte        >0        - version %ld
  2916. 0    short        0x10b        unknown pure executable
  2917. >8    short        >0        not stripped
  2918. >15    byte        >0        - version %ld
  2919. 0    long        0x10c        unknown demand paged pure executable
  2920. >16    long        >0        not stripped
  2921. 0    long        0x10d        unknown demand paged pure executable
  2922. >16    long        >0        not stripped
  2923. 0    long        0x10e        unknown readable demand paged pure executable
  2924.  
  2925. #------------------------------------------------------------------------------
  2926. # uuencode:  file(1) magic for ASCII-encoded files
  2927. #
  2928.  
  2929. # GRR:  the first line of xxencoded files is identical to that in uuencoded
  2930. # files, but the first character in most subsequent lines is 'h' instead of
  2931. # 'M'.  (xxencoding uses lowercase letters in place of most of uuencode's
  2932. # punctuation and survives BITNET gateways better.)  If regular expressions
  2933. # were supported, this entry could possibly be split into two with
  2934. # "begin\040\.\*\012M" or "begin\040\.\*\012h" (where \. and \* are REs).
  2935. 0    string        begin\040    uuencoded or xxencoded text
  2936.  
  2937. # btoa(1) is an alternative to uuencode that requires less space.
  2938. 0    string        xbtoa\ Begin    btoa'd text
  2939.  
  2940. # ship(1) is another, much cooler alternative to uuencode.
  2941. # Greg Roelofs, newt@uchicago.edu
  2942. 0    string        $\012ship    ship'd binary text
  2943.  
  2944. # bencode(8) is used to encode compressed news batches (Bnews/Cnews only?)
  2945. # Greg Roelofs, newt@uchicago.edu
  2946. 0    string    Decode\ the\ following\ with\ bdeco    bencoded News text
  2947.  
  2948. # BinHex is the Macintosh ASCII-encoded file format (see also "apple")
  2949. # Daniel Quinlan, quinlan@yggdrasil.com
  2950. 11    string    must\ be\ converted\ with\ BinHex    BinHex binary text
  2951. >41    string    x                    \b, version %.3s
  2952.  
  2953. # GRR:  is MIME BASE64 encoding handled somewhere?
  2954.  
  2955. #------------------------------------------------------------------------------
  2956. # varied.out:  file(1) magic for various USG systems
  2957. #
  2958. #    Herewith many of the object file formats used by USG systems.
  2959. #    Most have been moved to files for a particular processor,
  2960. #    and deleted if they duplicate other entries.
  2961. #
  2962. 0    short        0610        Perkin-Elmer executable
  2963. # AMD 29K
  2964. 0    beshort        0572        amd 29k coff noprebar executable
  2965. 0    beshort        01572        amd 29k coff prebar executable
  2966. 0    beshort        0160007        amd 29k coff archive
  2967. # Cray
  2968. 6    beshort        0407        unicos (cray) executable
  2969.  
  2970. #------------------------------------------------------------------------------
  2971. # vax:  file(1) magic for VAX executable/object and APL workspace
  2972. #
  2973. 0    lelong        0101557        VAX single precision APL workspace
  2974. 0    lelong        0101556        VAX double precision APL workspace
  2975.  
  2976. #
  2977. # VAX a.out (32V, BSD)
  2978. #
  2979. 0    lelong        0407        VAX executable
  2980. >16    lelong        >0        not stripped
  2981.  
  2982. 0    lelong        0410        VAX pure executable
  2983. >16    lelong        >0        not stripped
  2984.  
  2985. 0    lelong        0413        VAX demand paged pure executable
  2986. >16    lelong        >0        not stripped
  2987.  
  2988. 0    lelong        0420        VAX demand paged (first page unmapped) pure executable
  2989. >16    lelong        >0        not stripped
  2990.  
  2991. #
  2992. # VAX COFF
  2993. #
  2994. # The `versions' should be un-commented if they work for you.
  2995. # (Was the problem just one of endianness?)
  2996. #
  2997. 0    leshort        0570        VAX COFF executable
  2998. >12    lelong        >0        not stripped
  2999. >22    leshort        >0        - version %ld
  3000. 0    leshort        0575        VAX COFF pure executable
  3001. >12    lelong        >0        not stripped
  3002. >22    leshort        >0        - version %ld
  3003.  
  3004. #------------------------------------------------------------------------------
  3005. # visx:  file(1) magic for Visx format files
  3006. #
  3007. 0    short        0x5555        VISX image file
  3008. >2    byte        0        (zero)
  3009. >2    byte        1        (unsigned char)
  3010. >2    byte        2        (short integer)
  3011. >2    byte        3        (float 32)
  3012. >2    byte        4        (float 64)
  3013. >2    byte        5        (signed char)
  3014. >2    byte        6        (bit-plane)
  3015. >2    byte        7        (classes)
  3016. >2    byte        8        (statistics)
  3017. >2    byte        10        (ascii text)
  3018. >2    byte        15        (image segments)
  3019. >2    byte        100        (image set)
  3020. >2    byte        101        (unsigned char vector)
  3021. >2    byte        102        (short integer vector)
  3022. >2    byte        103        (float 32 vector)
  3023. >2    byte        104        (float 64 vector)
  3024. >2    byte        105        (signed char vector)
  3025. >2    byte        106        (bit plane vector)
  3026. >2    byte        121        (feature vector)
  3027. >2    byte        122        (feature vector library)
  3028. >2    byte        124        (chain code)
  3029. >2    byte        126        (bit vector)
  3030. >2    byte        130        (graph)
  3031. >2    byte        131        (adjacency graph)
  3032. >2    byte        132        (adjacency graph library)
  3033. >2    string        .VISIX        (ascii text)
  3034.  
  3035. #------------------------------------------------------------------------------
  3036. # vms:  file(1) magic for VMS executables (experimental)
  3037. #
  3038. # VMS .exe formats, both VAX and AXP (Greg Roelofs, newt@uchicago.edu)
  3039.  
  3040. # GRR 950122:  I'm just guessing on these, based on inspection of the headers
  3041. # of three executables each for Alpha and VAX architectures.  The VAX files
  3042. # all had headers similar to this:
  3043. #
  3044. #   00000  b0 00 30 00 44 00 60 00  00 00 00 00 30 32 30 35  ..0.D.`.....0205
  3045. #   00010  01 01 00 00 ff ff ff ff  ff ff ff ff 00 00 00 00  ................
  3046. #
  3047. 0    string    \xb0\0\x30\0    VMS VAX executable
  3048. >44032    string    PK\003\004    \b, Info-ZIP SFX archive v5.12 w/decryption
  3049. #
  3050. # The AXP files all looked like this, except that the byte at offset 0x22
  3051. # was 06 in some of them and 07 in others:
  3052. #
  3053. #   00000  03 00 00 00 00 00 00 00  ec 02 00 00 10 01 00 00  ................
  3054. #   00010  68 00 00 00 98 00 00 00  b8 00 00 00 00 00 00 00  h...............
  3055. #   00020  00 00 07 00 00 00 00 00  00 00 00 00 00 00 00 00  ................
  3056. #   00030  00 00 00 00 01 00 00 00  00 00 00 00 00 00 00 00  ................
  3057. #   00040  00 00 00 00 ff ff ff ff  ff ff ff ff 02 00 00 00  ................
  3058. #
  3059. 0    belong    0x03000000    VMS Alpha executable
  3060. >75264    string    PK\003\004    \b, Info-ZIP SFX archive v5.12 w/decryption
  3061.  
  3062. #------------------------------------------------------------------------------
  3063. # zilog:  file(1) magic for Zilog Z8000.
  3064. #
  3065. # Was it big-endian or little-endian?  My Product Specification doesn't
  3066. # say.
  3067. #
  3068. 0    long        0xe807        object file (z8000 a.out)
  3069. 0    long        0xe808        pure object file (z8000 a.out)
  3070. 0    long        0xe809        separate object file (z8000 a.out)
  3071. 0    long        0xe805        overlay object file (z8000 a.out)
  3072.  
  3073. #------------------------------------------------------------------------------
  3074. # zyxel:  file(1) magic for ZyXEL modems
  3075. #
  3076. # From <rob@pe1chl.ampr.org>
  3077. # These are the /etc/magic entries to decode datafiles as used for the
  3078. # ZyXEL U-1496E DATA/FAX/VOICE modems.  (This header conforms to a
  3079. # ZyXEL-defined standard)
  3080.  
  3081. 0    string        ZyXEL\002    ZyXEL voice data
  3082. >10    byte        0        - CELP encoding
  3083. >10    byte&0x0B    1        - ADPCM2 encoding
  3084. >10    byte&0x0B    2        - ADPCM3 encoding
  3085. >10    byte&0x0B    3        - ADPCM4 encoding
  3086. >10    byte&0x0B    8        - New ADPCM3 encoding
  3087. >10    byte&0x04    4        with resync
  3088.