home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 11 Util / 11-Util.zip / file39a.zip / magic < prev    next >
Text File  |  1993-08-04  |  59KB  |  1,727 lines

  1. # Magic file created Wed Aug  4 20:28:33 GMT 1993 by root
  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. # $Id: Localstuff,v 1.2 93/01/05 13:22:25 ian Exp $
  8. # Add any locally-observed files here.  Remember:
  9. # text if readable, executable if runnable binary, data if unreadable.
  10. #
  11. # Alliant FX series a.out files:
  12. # If the FX series is the one that had a processor with a 68K-derived
  13. # instruction set, the "short" should probably become "beshort" and the
  14. # "long" should probably become "belong".
  15. # If it's the i860-based one, they should probably become either the
  16. # big-endian or little-endian versions, depending on the mode they ran
  17. # the 860 in....
  18. #
  19. 0    short        0420        0420 Alliant virtual executable
  20. >2    short        &0x0020        common library
  21. >16    long        >0        not stripped
  22. 0    short        0421        0421 Alliant compact executable
  23. >2    short        &0x0020        common library
  24. >16    long        >0        not stripped
  25. #
  26. # magic.apl:
  27. #
  28. 0    long        0100554        APL workspace (Ken's original?)
  29. #
  30. # "ar", for all kinds of archives.
  31. #
  32. # XXX - why are there multiple <ar> thingies?  Note that 0x213c6172 is
  33. # "!<ar", so, for new-style (4.xBSD/SVR2andup) archives, we have:
  34. #
  35. # 0    string        !<arch>        current ar archive
  36. # 0    long        0x213c6172    archive file
  37. #
  38. # and for SVR3.1 archives, we have:
  39. #
  40. # 0    string        \<ar>        System V Release 1 ar archive
  41. # 0    string        =<ar>        archive
  42. # 0    string        =<ar>        archive
  43. #
  44. # XXX - did Aegis really store shared libraries, breakpointed modules,
  45. # and absolute code program modules in the same format as new-style
  46. # "ar" archives?
  47. #
  48. 0    string        !<arch>        current ar archive
  49. >8    string        __.SYMDEF    random library
  50. >0    belong        =65538        - pre SR9.5
  51. >0    belong        =65539        - post SR9.5
  52. >0    beshort        2        - object archive
  53. >0    beshort        3        - shared library module
  54. >0    beshort        4        - debug break-pointed module
  55. >0    beshort        5        - absolute code program module
  56. 0    string        \<ar>        System V Release 1 ar archive
  57. 0    string        =<ar>        archive
  58. #
  59. # XXX - from "vax", which appears to collect a bunch of byte-swapped
  60. # thingies, to help you recognize VAX files on big-endian machines;
  61. # with "leshort", "lelong", and "string", that's no longer necessary....
  62. #
  63. # 0    long        0x3c61723e    VAX 5.0 archive
  64. #
  65. 0    long        0x213c6172    archive file
  66. 0    lelong        0177555        very old VAX archive
  67. 0    leshort        0177555        very old PDP-11 archive
  68. #
  69. # XXX - "pdp" claims that 0177545 can have an __.SYMDEF member and thus
  70. # be a random library (it said 0xff65 rather than 0177545).
  71. #
  72. 0    lelong        0177545        old VAX archive
  73. >8    string        __.SYMDEF    random library
  74. 0    leshort        0177545        old PDP-11 archive
  75. >8    string        __.SYMDEF    random library
  76. #
  77. 0    string        =<ar>        archive
  78. #
  79. # From "pdp":
  80. #
  81. 0    lelong        0x39bed        PDP-11 old archive
  82. 0    lelong        0x39bee        PDP-11 4.0 archive
  83. #
  84. 0    string        -h-        Software Tools format archive text
  85. # "arc" archiver
  86. #0    byte        26        'arc' archive
  87. #>1    byte        0        (empty)
  88. #>1    byte        1        (old format)
  89. #
  90. # >>>>> ARJ archiver <<<<< (source: arj 2.39a beta)
  91. #     ARJ archives contains two types of header blocks:
  92. #
  93. #    Archive main header - This is located at the head of the archive
  94. #    Local file header   - This is located before each archived file
  95. #
  96. #     Structure of main header (low order byte first):
  97. #
  98. #     Bytes Description
  99. #     ----- -------------------------------------------------------------------
  100. #       2   header id (main and local file) = 0xEA60 or 60000U
  101. #       2   basic header size (from 'first_hdr_size' thru 'comment' below)
  102. #         = first_hdr_size + strlen(filename) + 1 + strlen(comment) + 1
  103. #         = 0 if end of archive
  104. #
  105. #       1   first_hdr_size (size up to and including 'extra data')
  106. #       1   archiver version number [2.30==v4 ?  2.39==v5 ?]
  107. #       1   minimum archiver version to extract
  108. #       1   host OS   (0 = MSDOS, 1 = PRIMOS, 2 = UNIX, 3 = AMIGA, 4 = MAC-OS)
  109. #             (5 = OS/2, 6 = APPLE GS, 7 = ATARI ST, 8 = NEXT)
  110. #             (9 = VAX VMS)
  111. # [text deleted]
  112. 0    short        0xea60        arj archive
  113. #
  114. # >>>>> ARC <<<<<  (source: Greg Roelofs roe2@midway.uchicago.edu)
  115. #
  116. 0    string        \032\010        Arc archive
  117. # 0    short        0x1a08            Arc archive
  118. # 0    short        0x081a            Arc archive
  119. #
  120. # >>>>> LHARC/LHA <<<<<  (source: Greg Roelofs roe2@midway.uchicago.edu)
  121. #
  122. 2    string        -lh0-            Lharc 1.x archive
  123. 2    string        -lh1-            Lharc 1.x archive
  124. 2    string        -lz4-            Lharc 1.x archive
  125. 2    string        -lz5-            Lharc 1.x archive
  126. #    [never seen any but the last:]
  127. 2    string        -lzs-            LHa 2.x? archive [lzs]
  128. 2    string        -lh\ -        LHa 2.x? archive [lh ]
  129. 2    string        -lhd-            LHa 2.x? archive [lhd]
  130. 2    string        -lh2-            Lha 2.x? archive [lh2]
  131. 2    string        -lh3-            LHa 2.x? archive [lh3]
  132. 2    string        -lh4-            LHa 2.x? archive [lh4]
  133. 2    string        -lh5-            LHa (2.x) archive
  134. #
  135. # >>>>> ZIP <<<<<  (source: Greg Roelofs roe2@midway.uchicago.edu)
  136. # [extract ver is from 1st file only]
  137. #
  138. 0    string        PK\003\004        Zip archive
  139. >4    string        \011            (at least v0.9 to extract)
  140. >4    string        \012            (at least v1.0 to extract)
  141. >4    string        \013            (at least v1.1 to extract)
  142. >4    string        \024            (at least v2.0 to extract)
  143. #
  144. # >>>>> ZOO <<<<<  (source: Greg Roelofs roe2@midway.uchicago.edu)
  145. #
  146. # [GRR:  don't know if all of these versions exist, or if some missing...]
  147. #0        string        ZOO             Zoo archive
  148. # [DH: Use GRR's alternate identifiers]
  149. 0x2a    string   \xdc\xa7\xc4\xfd
  150. >0 string         >0          %.16s
  151. # >4    string        1.00            (v%4s)
  152. # >4    string        1.10            (v%4s)
  153. # >4    string        1.20            (v%4s)
  154. # >4    string        1.30            (v%4s)
  155. # >4    string        1.40            (v%4s)
  156. # >4    string        1.50            (v%4s)
  157. # >4    string        1.60            (v%4s)
  158. # >4    string        1.70            (v%4s)
  159. # >4    string        1.71            (v%4s)
  160. # >4    string        2.00            (v%4s)
  161. # >4    string        2.01            (v%4s)
  162. # >4    string        2.10            (v%4s)
  163. >32    string        \001\000        (modify: v1.0+)
  164. >32    string        \001\004        (modify: v1.4+)
  165. >32    string        \002\000        (modify: v2.0+)
  166. >70    string        \001\000        (extract: v1.0+)
  167. >70    string        \002\001        (extract: v2.1+)
  168. 0        string        ZOO             Zoo archive
  169. # [GRR:  the following are alternate identifiers]
  170. #0x2a    long        0xdca7c4fd        Zoo archive
  171. #0x2a    long        0xc4fddca7        Zoo archive
  172. #
  173. # >>>>> HPACK <<<<<  (source: Peter Gutmann pgut1@cs.aukuni.ac.nz)
  174. # Here's the entry from the local magic file - it's for Ultrix, the format
  175. # may not be 100% the same as everyone else's.  Basically the ID bytes are a
  176. # 4-byte string 'HPAK' at the start.  Anything after that is indeterminate,
  177. # since for example if the archive is encrypted the entire thing will be one
  178. # big block of white noise - it's only the 4-byte ID you can rely on 100%. 
  179. # Once the ISO approves ISO 8824 and 8825 I'll use that format, which will
  180. # provide a lot more information, but that will probably still take awhile....
  181. #   4       string          HPAK            1,1     HPACK archive
  182. 0    string    HPAK    HPACK archive
  183. #
  184. # AT&T 3B machines
  185. #
  186. # The `versions' should be un-commented if they work for you.
  187. # (Was the problem just one of endianness?)
  188. #
  189. # 3B20
  190. #
  191. 0    beshort        0550        3b20 COFF executable
  192. >12    belong        >0        not stripped
  193. #>22    beshort        >0        - version %ld
  194. 0    beshort        0551        3b20 COFF executable (TV)
  195. >12    belong        >0        not stripped
  196. #>22    beshort        >0        - version %ld
  197. #
  198. # WE32K
  199. #
  200. 0    beshort        0560        WE32000 COFF
  201. >18    beshort        ^00000020    object
  202. >18    beshort        &00000020    executable
  203. >12    belong        >0        not stripped
  204. >18    beshort        ^00010000    N/A on 3b2/300 w/paging
  205. >18    beshort        &00020000    32100 required
  206. >18    beshort        &00040000    and mau hardware required
  207. >20    beshort        0407        (impure)
  208. >20    beshort        0410        (pure)
  209. >20    beshort        0413        (demand paged)
  210. >20    beshort        0443        (target shared library)
  211. >22    beshort        >0        - version %ld
  212. 0    beshort        0561        WE32000 COFF executable (TV)
  213. >12    belong        >0        not stripped
  214. #>18    beshort        &00020000    - 32100 required
  215. #>18    beshort        &00040000    and mau hardware required
  216. #>22    beshort        >0        - version %ld
  217. # Sound formats, from Jan Nicolai Langfeldt <janl@ifi.uio.no>
  218. #
  219. # XXX -what the hell is the "mips" stuff doing there?  It looks like
  220. # the archive stuff from "iris"....
  221. #
  222. 0       string          .snd            audio data:
  223. >12     long            1               8-bit u-law,
  224. >12     long            2               8-bit linear PCM,
  225. >12     long            3               16-bit linear PCM,
  226. >12     long            4               24-bit linear PCM,
  227. >12     long            5               32-bit linear PCM,
  228. >12     long            6               32-bit floating point,
  229. >12     long            7               64-bit floating point,
  230. >12    long        23        compressed (G.721 ADPCM),
  231. >20     long            1               mono,
  232. >20     long            2               stereo,
  233. >20     long            4               quad,
  234. >16     long            x               %d Hz
  235. 8       long            0x41494646      AIFF sound data file
  236. 0       long            0x4e54524b      MultiTrack sound data file
  237. >4      long            x               - version %ld
  238. >20     string          U               with mipsucode members
  239. >21     string          L               with mipsel members
  240. >21     string          B               with mipseb members
  241. >19     string          L               and a EL hash tabl
  242. >19     string          B               and a EB hash tabl
  243. >22     string          X               -- out of date
  244.  
  245. # sound files from OS/2 (these are guesses)
  246. 0  string      RIFF     
  247. >8 string      WAVE     sound
  248. 0  string      MThd\0   MIDI sound
  249.  
  250. # 68K Blit stuff as seen from 680x0 machine
  251. # Note that this 0407 conflicts with several other a.out formats...
  252. #
  253. # XXX - should this be redone with "be" and "le", so that it works on
  254. # little-endian machines as well?  If so, what's the deal with
  255. # "VAX-order" and "VAX-order2"?
  256. #
  257. #0    long        0407        68K Blit (standalone) executable
  258. #0    short        0407        VAX-order2 68K Blit (standalone) executable
  259. 0    short        03401        VAX-order 68K Blit (standalone) executable
  260. 0    long        0406        68k Blit mpx/mux executable
  261. 0    short        0406        VAX-order2 68k Blit mpx/mux executable
  262. 0    short        03001        VAX-order 68k Blit mpx/mux executable
  263. # Need more values for WE32 DMD executables.
  264. # Note that 0520 is the same as COFF
  265. #0    short        0520        tty630 layers executable
  266. # BSDI BSD/386
  267. 0    long    0314    BSD/386 demand paged (first page unmapped) pure executable
  268. #    this first will upset you if you're a PL/1 shop...
  269. #    in which case rm it; ascmagic will catch real C programs
  270. 0    string        /*        c program text
  271. #
  272. # Intergraph, formerly Fairchild, Clipper.
  273. #
  274. # XXX - what byte order does the Clipper use?
  275. #
  276. # XXX - what's the "!" stuff:
  277. #
  278. # >18    short        !074000,000000    C1 R1 
  279. # >18    short        !074000,004000    C2 R1
  280. # >18    short        !074000,010000    C3 R1
  281. # >18    short        !074000,074000    TEST
  282. #
  283. # I shall assume it's ANDing the field with the first value and
  284. # comparing it with the second, and rewrite it as:
  285. #
  286. # >18    short&074000    000000        C1 R1 
  287. # >18    short&074000    004000        C2 R1
  288. # >18    short&074000    010000        C3 R1
  289. # >18    short&074000    074000        TEST
  290. #
  291. # as SVR3.1's "file" doesn't support anything of the "!074000,000000"
  292. # sort, nor does SunOS 4.x, so either it's something Intergraph added
  293. # in CLIX, or something AT&T added in SVR3.2 or later, or something
  294. # somebody else thought was a good idea; it's not documented in the
  295. # man page for this version of "magic", nor does it appear to be
  296. # implemented (at least not after I blew off the bogus code to turn
  297. # old-style "&"s into new-style "&"s, which just didn't work at all).
  298. #
  299. 0    short        0575        CLIPPER COFF executable (VAX #)
  300. >20    short        0407        (impure)
  301. >20    short        0410        (5.2 compatible)
  302. >20    short        0411        (pure)
  303. >20    short        0413        (demand paged)
  304. >20    short        0443        (target shared library)
  305. >12    long        >0        not stripped
  306. >22    short        >0        - version %ld
  307. 0    short        0577        CLIPPER COFF executable
  308. >18    short&074000    000000        C1 R1 
  309. >18    short&074000    004000        C2 R1
  310. >18    short&074000    010000        C3 R1
  311. >18    short&074000    074000        TEST
  312. >20    short        0407        (impure)
  313. >20    short        0410        (pure)
  314. >20    short        0411        (separate I&D)
  315. >20    short        0413        (paged)
  316. >20    short        0443        (target shared library)
  317. >12    long        >0        not stripped
  318. >22    short        >0        - version %ld
  319. >48    long&01        01        alignment trap enabled
  320. >52    byte        1        -Ctnc
  321. >52    byte        2        -Ctsw
  322. >52    byte        3        -Ctpw
  323. >52    byte        4        -Ctcb
  324. >53    byte        1        -Cdnc
  325. >53    byte        2        -Cdsw
  326. >53    byte        3        -Cdpw
  327. >53    byte        4        -Cdcb
  328. >54    byte        1        -Csnc
  329. >54    byte        2        -Cssw
  330. >54    byte        3        -Cspw
  331. >54    byte        4        -Cscb
  332. 4    string        pipe        CLIPPER instruction trace
  333. 4    string        prof        CLIPPER instruction profile
  334. #
  335. # "Commands": stuff for various shells and interpreters.
  336. #
  337. 0    string        :\ shell archive or commands for antique kernel text
  338. 0    string        #!/bin/sh        Bourne Shell script text
  339. 0    string        #!\ /bin/sh        Bourne Shell script text
  340. 0    string        #!/bin/csh        C Shell script text
  341. 0    string        #!\ /bin/csh        C Shell script text
  342. # korn shell magic, sent by George Wu, gwu@clyde.att.com
  343. 0    string        #!/bin/ksh        Korn Shell script text
  344. 0    string        #!\ /bin/ksh        Korn Shell script text
  345. 0    string         #!/bin/tcsh        Tenex C Shell script text
  346. 0    string         #!\ /bin/tcsh        Tenex C Shell script text
  347. 0    string        #!/usr/local/tcsh    Tenex C Shell script text
  348. 0    string         #!\ /usr/local/tcsh    Tenex C Shell script text
  349. 0    string        #!/usr/local/bin/tcsh    Tenex C Shell script text
  350. 0    string        #!\ /usr/local/bin/tcsh    Tenex C Shell script text
  351. 0    string        #!/bin/zsh        Z Shell script text
  352. 0    string        #!\ /bin/zsh     Z Shell script text
  353. 0    string        #!/bin/awk        Awk commands text
  354. 0    string        #!\ /bin/awk     Awk commands text
  355. 0  string        #!/bin/nawk        new Awk commands text
  356. 0     string        #!\ /bin/nawk    new Awk commands text
  357. 0    string        #!/bin/gawk        GNU Awk commands text        
  358. 0    string        #!\ /bin/gawk    GNU Awk commands text        
  359. 0    string        #!\ /            a
  360. >3    string        >\0            %s script
  361. 0    string        #!/            a
  362. >2    string        >\0            %s script
  363. 0    string        #!\             commands text
  364. >3    string        >\0            for %s
  365.  
  366. # For Larry Wall's perl language.  The ``eval'' line recognizes an
  367. # outrageously clever hack for USG systems.
  368. #                Keith Waclena <keith@cerberus.uchicago.edu>
  369. 0    string        #!/bin/perl    perl commands text
  370. 0    string        #!\ /bin/perl    perl commands text
  371. 0    string        eval\ "exec\ /bin/perl    perl commands text
  372.  
  373. # OS/2 EXTPROC uses specified program to process script
  374. #
  375. 0  string        EXTPROC            OS/2 ExtProc commands text
  376. >8 string      >\0                for %s
  377. 0  string        extproc            OS/2 ExtProc commands text
  378. >8 string      >\0                for %s
  379. #
  380. # Formats for various forms of compressed data
  381. # Formats for "compress" proper have been moved into "compress.c",
  382. # because it tries to uncompress it to figure out what's inside.
  383. #
  384. # XXX - the two "packed data" versions are byte-swapped versions of
  385. # one another; is that because the 2-byte magic number is written
  386. # out in native byte order, with "unpack" figuring out the byte order
  387. # from the magic number (in which case both can be left as is, or
  388. # changed to specify a byte order *and* to indicate the byte order of
  389. # the packing machine), or because the old "file" didn't have any way of
  390. # having "magic"-file entries that specified a particular byte order?
  391. #
  392. 0    short        017436        packed data
  393. 0    short        017037        packed data
  394.  
  395. #
  396. # This magic number is byte-order-independent.
  397. #
  398. 0    short        017437        old packed data
  399.  
  400. #
  401. 0    string        \377\037    compacted data
  402. 0    short        0145405        huf output
  403. #
  404. # Squeeze and Crunch, from Keith Waclena <keith@cerberus.uchicago.edu>
  405. # These numbers were gleaned from the Unix versions of the programs to
  406. # handle these formats.  Note that I can only uncrunch, not crunch, and
  407. # I didn't have a crunched file handy, so the crunch number is untested.
  408. 0    short        0x76FF        squeezed data (CP/M, DOS)
  409. 0    short        0x76FE        crunched data (CP/M, DOS)
  410. # Freeze
  411. 0    short        0x1f9f        Frozen file 2.1
  412. 0    short        0x1f9e        Frozen file 1.0
  413. #
  414. # GNU gzip compressor, from christos@deshaw.com (Christos Zoulas)
  415. #
  416. 0       string          \037\213        gzip compressed file method:
  417. >2      byte            <8              reserved,
  418. >2      byte            8               deflate,
  419. >3    byte        &0x1f        flags: 
  420. >3    byte        &0x01        ascii-text,
  421. >3    byte        &0x02        multi-part,
  422. >3    byte        &0x04        name-present,
  423. >3    byte        &0x08        comment-present,
  424. >3    byte        &0x10        encrypted,
  425. >4    date        x        last modified: %s,
  426. >8    byte        x        extra-flags: %x,
  427. >9    byte        =0x00        os: DOS
  428. >9    byte        =0x01        os: Amiga
  429. >9    byte        =0x02        os: VMS
  430. >9    byte        =0x03        os: Unix
  431. >9    byte        =0x05        os: Atari
  432. >9    byte        =0x06        os: OS/2
  433. >9    byte        =0x07        os: MacOS
  434. >9    byte        =0x0A        os: TOPS-20
  435. >9    byte        =0x0B        os: Win/32
  436. #
  437. # XXX - what byte order does a Convex use?
  438. #
  439. 0    long        0513        Convex executable
  440. #
  441. # Yes, the two "cpio archive" formats *are* supposed to just be "short".
  442. # The idea is to indicate archives produced on machines with the same
  443. # byte order as the machine running "file" with "cpio archive", and
  444. # to indicate archives produced on machines with the opposite byte order
  445. # from the machine running "file" with "byte-swapped cpio archive".
  446. #
  447. # The SVR4 "cpio(4)" hints that there are additional formats, but they
  448. # are defined as "short"s; I think all the new formats are
  449. # character-header formats, and thus are strings not numbers.
  450. #
  451. 0    short        070707        cpio archive
  452. 0    short        0143561        byte-swapped cpio archive
  453. 0    string        070707        ASCII cpio archive (pre-SVR4 or odc)
  454. 0    string        070701        ASCII cpio archive (SVR4 with no CRC)
  455. 0    string        070702        ASCII cpio archive (SVR4 with CRC)
  456. #
  457. # ... diamond is a multi-media mail and electronic conferencing system....
  458. #
  459. # XXX - I think it was either renamed Slate, or replaced by Slate....
  460. #
  461. #    The full deal is too long...
  462. #0    string    <list>\n<protocol\ bbn-multimedia-format>    Diamond Multimedia Document
  463. 0    string    =<list>\n<protocol\ bbn-m    Diamond Multimedia Document
  464. #
  465. # magic file lines for output from "diff"...
  466. 0    string        diff\     'diff' output text
  467. 0    string        ***\         'diff' output text
  468. 0    string        Only\ in\     'diff' output text
  469. 0    string        Common\ subdirectories:\     'diff' output text
  470. # Magic numbers for ditroff intermediate language
  471. 0    string        x\ T\ cat    titroff output for the C/A/T text
  472. 0    string        x\ T\ ps    titroff output for PostScript
  473. 0    string        x\ T         titroff output text
  474. #
  475. # magic.dump, dump file format. For new and old dump filesystems
  476. #
  477. # No, these shouldn't specify a specific byte order, because the byte
  478. # order is dependent on the machine that produced the dump.
  479. #
  480. 24    long    60012        new-fs dump file,
  481. >4    date    x        Previous dump %s,
  482. >8    date    x        This dump %s,
  483. >12    long    >0        Volume %ld,
  484. >692    long    0        Level zero, type:
  485. >692    long    >0        Level %d, type:
  486. >0    long    1        tape header,
  487. >0    long    2        beginning of file record,
  488. >0    long    3        map of inodes on tape,
  489. >0    long    4        continuation of file record,
  490. >0    long    5        end of volume,
  491. >0    long    6        map of inodes deleted,
  492. >0    long    7        end of medium (for floppy),
  493. >676    string    >\0        Label %s,
  494. >696    string    >\0        Filesystem %s,
  495. >760    string    >\0        Device %s,
  496. >824    string    >\0        Host %s,
  497. >888    long    >0        Flags %x
  498.  
  499. 24    long    60011        old-fs dump file,
  500. #>4    date    x        Previous dump %s,
  501. #>8    date    x        This dump %s,
  502. >12    long    >0        Volume %ld,
  503. >692    long    0        Level zero, type:
  504. >692    long    >0        Level %d, type:
  505. >0    long    1        tape header,
  506. >0    long    2        beginning of file record,
  507. >0    long    3        map of inodes on tape,
  508. >0    long    4        continuation of file record,
  509. >0    long    5        end of volume,
  510. >0    long    6        map of inodes deleted,
  511. >0    long    7        end of medium (for floppy),
  512. >676    string    >\0        Label %s,
  513. >696    string    >\0        Filesystem %s,
  514. >760    string    >\0        Device %s,
  515. >824    string    >\0        Host %s,
  516. >888    long    >0        Flags %x
  517. #
  518. # ELF
  519. # Missing MIPS image type and flags
  520. #
  521. # Question marks on processor types flag "should not happen because the
  522. # byte order is wrong".  We have to check the byte order flag to see what
  523. # byte order all the other stuff in the header is in.
  524. #
  525. 0    string        \177ELF        ELF
  526. >4    byte        0        invalid class
  527. >4    byte        1        32-bit
  528. >4    byte        2        64-bit
  529. >5    byte        0        invalid byte order
  530. >5    byte        1        LSB
  531. >>16    leshort        0        unknown type
  532. >>16    leshort        1        relocatable
  533. >>16    leshort        2        executable
  534. >>16    leshort        3        dynamic lib
  535. >>16    leshort        4        core file
  536. >>18    leshort        0        unknown machine
  537. >>18    leshort        1        WE32100 and up
  538. >>18    leshort        2        SPARC?
  539. >>18    leshort        3        i386 (386 and up)
  540. >>18    leshort        4        M68000?
  541. >>18    leshort        5        M88000?
  542. >>18    leshort        7        i860
  543. >>20    lelong        1        Version 1
  544. >>36    lelong        1        MathCoPro/FPU/MAU Required
  545. >5    byte        2        MSB
  546. >>16    beshort        0        unknown type
  547. >>16    beshort        1        relocatable
  548. >>16    beshort        2        executable
  549. >>16    beshort        3        dynamic lib
  550. >>16    beshort        4        core file
  551. >>18    beshort        0        unknown machine
  552. >>18    beshort        1        WE32100 and up
  553. >>18    beshort        2        SPARC
  554. >>18    beshort        3        i386 (386 and up)?
  555. >>18    beshort        4        M68000
  556. >>18    beshort        5        M88000
  557. >>18    beshort        7        i860
  558. >>20    belong        1        Version 1
  559. >>36    belong        1        MathCoPro/FPU/MAU Required
  560.  
  561. 0   string  ;ELC\x13\0\0\0          Emacs Lisp
  562. >13 string  >\0                     (%s)
  563. 0   string  ;;;\ compiled\ by       Emacs Lisp
  564. >16 string  >\0                     (%s)
  565. #
  566. # magic.encore: Recognize encore machines
  567. #
  568. # XXX - needs to have the byte order specified (NS32K was little-endian,
  569. # dunno whether they run the 88K in little-endian mode or not).
  570. #
  571. 0    short        0x154        Encore
  572. >20    short        0x107        executable
  573. >20    short        0x108        pure executable
  574. >20    short        0x10b        demand-paged executable
  575. >20    short        0x10f        unsupported executable
  576. >12    long        >0        not stripped
  577. >22    short        >0        - version %ld
  578. >22    short        0        -
  579. #>4    date        x        stamp %s
  580. 0    short        0x155        Encore unsupported executable
  581. >12    long        >0        not stripped
  582. >22    short        >0        - version %ld
  583. >22    short        0        -
  584. #>4    date        x        stamp %s
  585. 0    string    \366\366\366\366    Formatted floppy w/ no filesystem data
  586. 0    string    FONT    ASCII vfont text
  587. 0    short    0436    Berkeley vfont data
  588. 0    short    017001    byte-swapped Berkeley vfont data
  589. #
  590. # Magic number for FrameMaker files
  591. # This stuff came on a FrameMaker demo tape, most of which is
  592. # copyright, but this file is "published" as witness the following:
  593. #
  594. 0    string        \<MakerFile    FrameMaker document
  595. >11    string        3.0         (3.0
  596. >11    string        2.0         (2.0
  597. >11    string        1.0         (1.0
  598. >14    byte        x          %c)
  599. 0    string        \<MIFFile    FrameMaker MIF file
  600. >9    string        3.0         (3.0)
  601. >9    string        2.0         (2.0)
  602. >9    string        1.0         (1.x)
  603. 0    string        \<MakerDictionary    FraneMaker Dictionary text
  604. >17    string        3.0         (3.0)
  605. >17    string        2.0         (2.0)
  606. >17    string        1.0         (1.x)
  607. 0    string        \<MakerScreenFon    FrameMaker Font file
  608. >17    string        1.01         (%s)
  609. 0    string        \<MML        FrameMaker MML file
  610. 0    string        \<Book        FrameMaker Book file
  611. >10    string        3.0         (3.0
  612. >10    string        2.0         (2.0
  613. >10    string        1.0         (1.0
  614. >13    byte        x          %c)
  615. 0    string        \<Maker Intermediate Print File    FrameMaker IPL file
  616. 0    string        \<MakerDictionary    FraneMaker Dictionary text
  617. #
  618. # magic.hp: Hewlett Packard Magic
  619. #
  620. # XXX - somebody should figure out whether any byte order needs to be
  621. # applied to the "TML" stuff; I'm assuming the Apollo stuff is
  622. # big-endian as it was mostly 68K-based.
  623. #
  624. # HP-PA is big-endian, so it (and "800", which is *also* HP-PA-based; I
  625. # assume "HPPA-RISC1.1" really means "HP-PA Version 1.1", which first
  626. # showed up in the 700 series, although later 800 series machines are,
  627. # I think, based on the PA7100 which implements HP-PA 1.1) are flagged
  628. # as big-endian.
  629. #
  630. # I think the 500 series was the old stack-based machines, running a
  631. # UNIX environment atop the "SUN kernel"; dunno whether it was
  632. # big-endian or little-endian.
  633. #
  634. # I'm guessing that the 200 series was 68K-based; the 300 and 400 series
  635. # are.
  636. #
  637. # The "misc" stuff needs a byte order; the archives look suspiciously
  638. # like the old 177545 archives (0xff65 = 0177545).
  639. #
  640. #### Old Apollo stuff
  641. 0    beshort        0627        Apollo m68k COFF executable
  642. >18    beshort        ^040000        not stripped 
  643. >22    beshort        >0        - version %ld
  644. 0    beshort        0624        apollo a88k COFF executable
  645. >18    beshort        ^040000        not stripped 
  646. >22    beshort        >0        - version %ld
  647. 0       long            01203604016     TML 0123 byte-order format
  648. 0       long            01702407010     TML 1032 byte-order format
  649. 0       long            01003405017     TML 2301 byte-order format
  650. 0       long            01602007412     TML 3210 byte-order format
  651. #### HPPA
  652. 0    belong         0x02100106    HPPA-RISC1.1 relocatable object
  653. 0    belong         0x02100107    HPPA-RISC1.1 executable
  654. >(144)    belong        0x054ef630    dynamically linked
  655. >96    belong        >0        -not stripped
  656.  
  657. 0    belong         0x02100108    HPPA-RISC1.1 shared executable
  658. >(144)    belong        0x054ef630    dynamically linked
  659. >96    belong        >0        -not stripped
  660.  
  661. 0    belong         0x0210010b    HPPA-RISC1.1 demand-load executable
  662. >(144)    belong        0x054ef630    dynamically linked
  663. >96    belong        >0        -not stripped
  664.  
  665. 0    belong         0x0210010e    HPPA-RISC1.1 shared library
  666. >96    belong        >0        -not stripped
  667.  
  668. 0    belong         0x0210010d    HPPA-RISC1.1 dynamic load library
  669. >96    belong        >0        -not stripped
  670.  
  671. #### 800
  672. 0    belong         0x020b0106    HP s800 relocatable object
  673.  
  674. 0    belong         0x020b0107    HP s800 executable
  675. >(144)    belong        0x054ef630    dynamically linked
  676. >96    belong        >0        -not stripped
  677.  
  678. 0    belong         0x020b0108    HP s800 shared executable
  679. >(144)    belong        0x054ef630    dynamically linked
  680. >96    belong        >0        -not stripped
  681.  
  682. 0    belong         0x020b010b    HP s800 demand-load executable
  683. >(144)    belong        0x054ef630    dynamically linked
  684. >96    belong        >0        -not stripped
  685.  
  686. 0    belong         0x020b010e    HP s800 shared library
  687. >96    belong        >0        -not stripped
  688.  
  689. 0    belong         0x020b010d    HP s800 dynamic load library
  690. >96    belong        >0        -not stripped
  691.  
  692. 0    belong        0x213c6172    archive file
  693. >68    belong         0x020b0619    -HP s800 relocatable library
  694.  
  695. #### 500
  696. 0    long        0x02080106    HP s500 relocatable executable
  697. >16    long        >0        -version %ld
  698.  
  699. 0    long        0x02080107    HP s500 executable
  700. >16    long        >0        -version %ld
  701.  
  702. 0    long        0x02080108    HP s500 pure executable
  703. >16    long        >0        -version %ld
  704.  
  705. #### 200
  706. 0    belong         0x020c0108    HP s200 pure executable
  707. >4    beshort        >0        -version %ld
  708. >8    belong        &0x80000000    save fp regs
  709. >8    belong        &0x40000000    dynamically linked
  710. >8    belong        &0x20000000    debuggable
  711. >36    belong        >0        not stripped
  712.  
  713. 0    belong        0x020c0107    HP s200 executable
  714. >4    beshort        >0        -version %ld
  715. >8    belong        &0x80000000    save fp regs
  716. >8    belong        &0x40000000    dynamically linked
  717. >8    belong        &0x20000000    debuggable
  718. >36    belong        >0        not stripped
  719.  
  720. 0    belong        0x020c010b    HP s200 demand-load executable
  721. >4    beshort        >0        -version %ld
  722. >8    belong        &0x80000000    save fp regs
  723. >8    belong        &0x40000000    dynamically linked
  724. >8    belong        &0x20000000    debuggable
  725. >36    belong        >0        not stripped
  726.  
  727. 0    belong        0x020c0106    HP s200 relocatable executable
  728. >4    beshort        >0        -version %ld
  729. >6    beshort        >0        -highwater %d
  730. >8    belong        &0x80000000    save fp regs
  731. >8    belong        &0x20000000    debuggable
  732. >8    belong        &0x10000000    PIC
  733.  
  734. 0    belong         0x020a0108    HP s200 (2.x release) pure executable
  735. >4    beshort        >0        -version %ld
  736. >36    belong        >0        not stripped
  737.  
  738. 0    belong        0x020a0107    HP s200 (2.x release) executable
  739. >4    beshort        >0        -version %ld
  740. >36    belong        >0        not stripped
  741.  
  742. 0    belong        0x020c010e    HP s200 shared library
  743. >4    beshort        >0        -version %ld
  744. >6    beshort        >0        -highwater %d
  745. >36    belong        >0        not stripped
  746.  
  747. 0    belong        0x020c010d    HP s200 dynamic load library
  748. >4    beshort        >0        -version %ld
  749. >6    beshort        >0        -highwater %d
  750. >36    belong        >0        not stripped
  751.  
  752. #### MISC
  753. 0    long        0x0000ff65    HP old archive
  754. 0    long        0x020aff65    HP s200 old archive
  755. 0    long        0x020cff65    HP s200 old archive
  756. 0    long        0x0208ff65    HP s500 old archive
  757.  
  758. 0    long        0x015821a6    HP core file
  759.  
  760. 0    long        0x4da7eee8    HP-WINDOWS font
  761. >8    byte        >0        -version %ld
  762. 0    string        Bitmapfile    HP Bitmapfile
  763.  
  764. 0    string        IMGfile    CIS     compimg HP Bitmapfile
  765. 0    short        0x8000        lif file
  766. 0    long        0x020c010c    compiled Lisp
  767.  
  768. 0    string        msgcat01    HP NLS message catalog,
  769. >8    long        >0        %d messages
  770. #
  771. # IBM 370 and compatibles.
  772. #
  773. # "ibm370" said that 0x15d == 0535 was "ibm 370 pure executable".
  774. # What the heck *is* "USS/370"?
  775. #
  776. 0       beshort        0531        SVR2 executable (Amdahl-UTS)
  777. >12    belong        >0        not stripped
  778. >24     belong        >0        - version %ld
  779. 0    beshort        0534        SVR2 pure executable (Amdahl-UTS)
  780. >12    belong        >0        not stripped
  781. >24    belong        >0        - version %ld
  782. 0    beshort        0530        SVR2 pure executable (USS/370)
  783. >12    belong        >0        not stripped
  784. >24    belong        >0        - version %ld
  785. 0    beshort        0535        SVR2 executable (USS/370)
  786. >12    belong        >0        not stripped
  787. >24    belong        >0        - version %ld
  788.  
  789. #
  790. # magic.rs6000:
  791. #
  792. # RS/6000 and the RT PC.
  793. #
  794. 0    beshort        0x01df        executable (RISC System/6000 V3.1) or obj module
  795. >12    belong        >0        not stripped
  796. # Breaks sun4 statically linked execs.
  797. #0      beshort        0x0103        executable (RT Version 2) or obj module
  798. #>2    byte        0x50        pure
  799. #>28    belong        >0        not stripped
  800. #>6    beshort        >0        - version %ld
  801. 0    beshort        0x0104        shared library
  802. 0    beshort        0x0105        ctab data
  803. 0    beshort        0xfe04        structured file
  804. 0    string        0xabcdef    message catalog
  805. #0    string        <aiaff>        archive
  806. # image file format
  807. # From Robert Potter, potter@cs.rochester.edu
  808. 0    string        Imagefile\ version-    iff image data
  809. # this adds the whole header (inc. version number), informative but longish
  810. >10    string        >\0        %s
  811. # Tell file about magic for IMAGEN printer-ready files:
  812. 0    string    @document(        Imagen printer
  813. # this only works if "language xxx" is first item in Imagen header.
  814. >10    string    language\ impress    (imPRESS data)
  815. >10    string    language\ daisy        (daisywheel text)
  816. >10    string    language\ diablo        (daisywheel text)
  817. >10    string    language\ printer    (line printer emulation)
  818. >10    string    language\ tektronix    (Tektronix 4014 emulation)
  819. # Add any other languages that your Imagen uses - remember
  820. # to keep the word `text' if the file is human-readable.
  821. #
  822. # Now magic for IMAGEN font files...
  823. 0    string        Rast        RST-format raster font data
  824. >45    string        >0        face %
  825. # image formats, originally from jef@helios.ee.lbl.gov (Jef Poskanzer),
  826. # additions by janl@ifi.uio.no as well as others. Jan also suggested
  827. # merging several one- and two-line files into here.
  828. #
  829. # XXX - byte order for GIF and TIFF fields?
  830. #
  831.  
  832. 0    string        xbtoa            btoa'd file
  833.  
  834. # PBMPLUS
  835. 0    string        P1            PBM file
  836. 0    string        P2            PGM file
  837. 0    string        P3            PPM file
  838. 0    string        P4            PBM "rawbits" file
  839. 0    string        P5            PGM "rawbits" file
  840. 0    string        P6            PPM "rawbits" file
  841.  
  842. # TIFF and friends
  843. 0    string        \115\115        TIFF file, big-endian
  844. >2      short           >0                  version %d
  845. 0    string        \111\111        TIFF file, little-endian
  846. >2      short           >0                  version %d
  847. #
  848. # NIFF (Navy Interchange File Format, a modification of TIFF)
  849. 0    string        IIN1            NIFF raster data
  850.  
  851. # GIF
  852. 0    string        GIF        GIF picture
  853. >3    string        87a        - version %.3s
  854. >3    string        89a        - version %.3s
  855. >6    short        >0        %d x
  856. >8    short        >0        %d,
  857. >10    byte        &0x40        interlaced,
  858. >10    byte&0x07    =0x00        2 colors
  859. >10    byte&0x07    =0x01        4 colors
  860. >10    byte&0x07    =0x02        8 colors
  861. >10    byte&0x07    =0x03        16 colors
  862. >10    byte&0x07    =0x04        32 colors
  863. >10    byte&0x07    =0x05        64 colors
  864. >10    byte&0x07    =0x06        128 colors
  865. >10    byte&0x07    =0x07        256 colors
  866.  
  867. # Miscellany
  868. 0    long        1123028772        Artisan image file
  869. >4    long        1    rectangular 24-bit image
  870. >4    long        2    rectangular 8-bit image with colormap
  871. >4      long            3    rectangular 32-bit image (24-bit with matte)
  872. 0    string        \361\0\100\273        CMU window manager bitmap
  873. 0    string        #FIG            FIG graphics savefile text
  874. >6      string          2.1                 Version 2.1
  875. >6      string          2.0                 Version 2.0
  876. 0    string        GKSM            GKS Metafile
  877. 8    string        ILBM            IFF ILBM file
  878. 0    string        yz            MGR bitmap
  879. 0       string          ARF_BEGARF          PHIGS clear text archive
  880. 0    string        \0\0\1\263        MPEG Paris
  881. # PCX formats (source: Selke's filetype program, 1991)
  882. 0    string    \x0A\x00    PCX image (Paintbrush version 2.5)
  883. 0    string    \x0A\x02    PCX image (Paintbrush version 2.8, with palette)
  884. 0    string    \x0A\x03    PCX image (Paintbrush version 2.8, without palette)
  885. 0  string    \x0A\x05    PCX image (Paintbrush version 3.0)
  886. # JPEG (source: Cameron Simpson cameron@cs.unsw.oz.au,
  887. #               John Adams J.Adams@ucl.ac.uk)
  888. 0    long        0xffd8ffe0        JPEG image, big endian
  889. 0    long        0xe0ffd8ff        JPEG image, little endian
  890. 0    string        hsi1            HSI1 image (wrapper for JPEG?)
  891. 6    string        JFIF            JPEG JFIF
  892. #
  893. # >>>>> BMP, etc. <<<<< (source: Greg Roelofs roe2@midway.uchicago.edu)
  894. # [GRR: The >14 entries should really be strings of length four]
  895. #
  896. 0    string        BM            bitmap
  897. >14    byte        12            (OS/2 1.x format)
  898. >14    byte        64            (OS/2 2.x format)
  899. >14    byte        40            (Windows 3.x format)
  900. # [GRR says the following are untested]
  901. 0    string        IC            icon
  902. 0    string        PI            pointer
  903. 0    string        CI            color icon
  904. 0    string        CP            color pointer
  905. 0    string        BA            bitmap array
  906.  
  907. # movie files from OS/2 (these are guesses)
  908. 0  string      RIFF     
  909. >8 string      AVI      movie
  910. #
  911. # Various flavors of x86 UNIX executable/object (other than Xenix, which
  912. # is in "microsoft").  DOS is in "ms-dos"; the ambitious soul can do
  913. # Windows as well.
  914. #
  915. # Windows NT belongs elsewhere, as you need x86 and MIPS and Alpha and
  916. # whatever comes next (HP-PA Hummingbird?).  OS/2 may also go elsewhere
  917. # as well, if, as, and when IBM makes it portable.
  918. #
  919. # The `versions' should be un-commented if they work for you.
  920. # (Was the problem just one of endianness?)
  921. #
  922. 0    leshort        0502        basic-16 executable
  923. >12    lelong        >0        not stripped
  924. #>22    leshort        >0        - version %ld
  925. 0    leshort        0503        basic-16 executable (TV)
  926. >12    lelong        >0        not stripped
  927. #>22    leshort        >0        - version %ld
  928. 0    leshort        0510        x86 executable
  929. >12    lelong        >0        not stripped
  930. 0    leshort        0511        x86 executable (TV)
  931. >12    lelong        >0        not stripped
  932. 0    leshort        =0512        iAPX 286 executable small model (COFF)
  933. >12    lelong        >0        not stripped
  934. #>22    leshort        >0        - version %ld
  935. 0    leshort        =0522        iAPX 286 executable large model (COFF)
  936. >12    lelong        >0        not stripped
  937. #>22    leshort        >0        - version %ld
  938. 0    leshort        =0514        80386 COFF executable
  939. >12    lelong        >0        not stripped
  940. >22    leshort        >0        - version %ld
  941. #
  942. # magic for InterLeaf TPS:
  943. 0    string        =\210OPS    Interleaf saved data
  944. 0    string        =<!OPS        Interleaf document text
  945. >5    string        ,\ Version\     (version
  946. >>14    string        >\0        %s)
  947.  
  948. #
  949. # magic.iris: Magic for mips from an iris4d
  950. #
  951. # Dunno what byte-order munging is needed; all of SGI's *current*
  952. # machines and OSes run in big-endian mode on the MIPS machines,
  953. # as far as I know, but they do have the MIPSEB and MIPSEL stuff
  954. # here....
  955. #
  956. 0    short        0x0160        mipseb
  957. >20    short        0407        executable
  958. >20    short        0410        pure
  959. >20    short        0413        demand paged
  960. >8    long        >0        not stripped
  961. >8    long        0        stripped
  962. >22    byte        >0        - version %ld.
  963. >23    byte        >0        %ld
  964. 0    short        0x0162        mipsel
  965. >20    short        0407        executable
  966. >20    short        0410        pure
  967. >20    short        0413        demand paged
  968. >8    long        >0        not stripped
  969. >8    long        0        stripped
  970. >23    byte        >0        - version %ld.
  971. >22    byte        >0        %ld
  972. 0    short        0x6001        swapped mipseb
  973. >20    short        03401        executable
  974. >20    short        04001        pure
  975. >20    short        05401        demand paged
  976. >8    long        >0        not stripped
  977. >8    long        0        stripped
  978. >22    byte        >0        - version %ld.
  979. >23    byte        >0        %ld
  980. 0    short        0x6201        swapped mipsel
  981. >20    short        03401        executable
  982. >20    short        04001        pure
  983. >20    short        05401        demand paged
  984. >8    long        >0        not stripped
  985. >8    long        0        stripped
  986. >22    byte        >0        - version %ld.
  987. >23    byte        >0        %ld
  988. 0    short        0x180        mipseb ucode
  989. 0    short        0x182        mipsel ucode
  990. #
  991. # IRIX core format version 1 (from /usr/include/core.out.h)
  992. 0    long        0xdeadadb0    IRIX core dump
  993. >4    long        1        of
  994. >16    string        >\0        '%s'
  995. #
  996. # Archives - This handles archive subtypes
  997. #
  998. 0    string        !<arch>\n__________E    MIPS archive
  999. >20    string        U            with mipsucode members
  1000. >21    string        L            with mipsel members
  1001. >21    string        B            with mipseb members
  1002. >19    string        L            and a EL hash table
  1003. >19    string        B            and a EB hash table
  1004. >22    string        X            -- out of date
  1005. #
  1006. # magic.ispell
  1007. #
  1008. # XXX - byte order?
  1009. #
  1010. #0    short    0xffff9601    ispell hash file
  1011. 0    short    0x9601    ispell hash file
  1012. >2    short    0x00    - 8-bit, no capitalization, 26 flags
  1013. >2    short    0x01    - 7-bit, no capitalization, 26 flags 
  1014. >2    short    0x02    - 8-bit, capitalization, 26 flags
  1015. >2    short    0x03    - 7-bit, capitalization, 26 flags 
  1016. >2    short    0x04    - 8-bit, no capitalization, 52 flags
  1017. >2    short    0x05    - 7-bit, no capitalization, 52 flags 
  1018. >2    short    0x06    - 8-bit, capitalization, 52 flags
  1019. >2    short    0x07    - 7-bit, capitalization, 52 flags 
  1020. >2    short    0x08    - 8-bit, no capitalization, 128 flags
  1021. >2    short    0x09    - 7-bit, no capitalization, 128 flags 
  1022. >2    short    0x0A    - 8-bit, capitalization, 128 flags
  1023. >2    short    0x0B    - 7-bit, capitalization, 128 flags 
  1024. >2    short    0x0C    - 8-bit, no capitalization, 256 flags
  1025. >2    short    0x0D    - 7-bit, no capitalization, 256 flags 
  1026. >2    short    0x0E    - 8-bit, capitalization, 256 flags
  1027. >2    short    0x0F    - 7-bit, capitalization, 256 flags 
  1028. >4    short    >0    and %d string characters
  1029. #    derived empirically, your offsets may vary!
  1030. 53    string        yyprevious    c program text (from lex)
  1031. >3    string        >\0         for %s
  1032. #
  1033. # magic.lif:
  1034. #
  1035. # XXX - byte order?
  1036. #
  1037. 0    short        0x8000        lif file
  1038. # Values for Linux/i386 binaries, From: Rik Faith <faith@cs.unc.edu>
  1039. 2       short           100             Linux/i386
  1040. >0      short           0407            executable
  1041. >0      short           0410            pure executable
  1042. >0      short           0413            demand paged executable
  1043. >16     long            >0              not stripped
  1044. >0      string          Jump            jump
  1045. # core dump file
  1046. 216     long            0421            core file (Linux)
  1047. 0    string        #\ Magic    magic text file for file(1) cmd
  1048. # Unfortunately, saved netnews also has From line added in some news software.
  1049. #0    string        From         mail text
  1050. # There are tests to ascmagic.c to cope with mail and news.
  1051. 0    string        Relay-Version:     old news text
  1052. 0    string        #!\ rnews    batched news text
  1053. 0    string        N#!\ rnews    mailed, batched news text
  1054. 0    string        Forward\ to     mail forwarding text
  1055. 0    string        Pipe\ to     mail piping text
  1056. 0    string        Return-Path:    smtp mail text
  1057. 0    string        Path:        news text
  1058. 0    string        Xref:        news text
  1059. 0    string        From:        news or mail text
  1060. 0    string        Article     saved news text
  1061. #
  1062. # Microsoft (Xenix, not DOS)
  1063. #
  1064. # "Middle model" stuff, and "Xenix 8086 relocatable or 80286 small
  1065. # model" lifted from "magic.xenix", with comment "derived empirically;
  1066. # treat as folklore until proven"
  1067. #
  1068. # "small model", "large model", "huge model" stuff lifted from XXX
  1069. #
  1070. # XXX - "x.out" collides with PDP-11 archives....
  1071. #
  1072. 0    string        core        core file (Xenix)
  1073. 0    byte        0x80        8086 relocatable (Microsoft)
  1074. 0    leshort        0xff65        x.out
  1075. >2    string        __.SYMDEF     randomized
  1076. >0    byte        x        archive
  1077. 0    leshort        0x206        Microsoft a.out
  1078. >8    leshort        1        Middle model
  1079. >0x1e    leshort        &0x10        overlay
  1080. >0x1e    leshort        &0x2        separate
  1081. >0x1e    leshort        &0x4        pure
  1082. >0x1e    leshort        &0x800        segmented
  1083. >0x1e    leshort        &0x400        standalone
  1084. >0x1e    leshort        &0x8        fixed-stack
  1085. >0x1c    byte        &0x80        byte-swapped
  1086. >0x1c    byte        &0x40        word-swapped
  1087. >0x10    lelong        >0        not-stripped
  1088. >0x1e    leshort        ^0xc000        pre-SysV
  1089. >0x1c    byte        &0x4        86
  1090. >0x1c    byte        &0x9        286
  1091. >0x1c    byte        &0xa        386
  1092. >0x1f    byte        <0x040        small model
  1093. >0x1f    byte        =0x048        large model    
  1094. >0x1f    byte        =0x049        huge model 
  1095. >0x1e    leshort        &0x1        executable
  1096. >0x1e    leshort        ^0x1        object file
  1097. >0x1e    leshort        &0x40        Large Text
  1098. >0x1e    leshort        &0x20        Large Data
  1099. >0x1e    leshort        &0x120        Huge Objects Enabled
  1100. >0x10    lelong        >0        not stripped
  1101.  
  1102. 0    leshort        0x140        old Microsoft 8086 x.out
  1103. >0x3    byte        &0x4        separate
  1104. >0x3    byte        &0x2        pure
  1105. >0    byte        &0x1        executable
  1106. >0    byte        ^0x1        relocatable
  1107. >0x14    lelong        >0        not stripped
  1108.  
  1109. 0    lelong        0x206        b.out
  1110. >0x1e    leshort        &0x10        overlay
  1111. >0x1e    leshort        &0x2        separate
  1112. >0x1e    leshort        &0x4        pure
  1113. >0x1e    leshort        &0x800        segmented
  1114. >0x1e    leshort        &0x400        standalone
  1115. >0x1e    leshort        &0x1        executable
  1116. >0x1e    leshort        ^0x1        object file
  1117. >0x1e    leshort        &0x4000        V2.3
  1118. >0x1e    leshort        &0x8000        V3.0
  1119. >0x1c    byte        &0x4        86
  1120. >0x1c    byte        &0xb        186
  1121. >0x1c    byte        &0x9        286
  1122. >0x1c    byte        &0x29        286
  1123. >0x1c    byte        &0xa        386
  1124. >0x1e    leshort        &0x4        Large Text
  1125. >0x1e    leshort        &0x2        Large Data
  1126. >0x1e    leshort        &0x102        Huge Objects Enabled
  1127.  
  1128. 0    leshort        0x580        XENIX 8086 relocatable or 80286 small model
  1129. #
  1130. # RISC MIPS decstation
  1131. # Should this be "leshort", given that DEC ran the DECstations in
  1132. # little-endian mode?
  1133. #
  1134. # Where is the non-SGI, non-DEC MIPS stuff?
  1135. #
  1136. 0    short        0x6201        MIPS executable
  1137. #
  1138. # XXX - byte order?
  1139. #
  1140. 0    long    31415        Mirage Assembler m.out executable
  1141. #
  1142. # ID is the binary tags database produced by mkid(1).
  1143. #
  1144. # XXX - byte order?
  1145. #
  1146. 0    string        \311\304    ID tags data
  1147. >2    short        >0        version %d
  1148. 0    long        0x1010101    MMDF mailbox
  1149. #
  1150. # Motorola
  1151. #
  1152. # 68K
  1153. #
  1154. 0    beshort        0520        mc68k COFF
  1155. >18    beshort        ^00000020    object
  1156. >18    beshort        &00000020    executable
  1157. >12    belong        >0        not stripped
  1158. >168    string        .lowmem        Apple toolbox
  1159. >20    beshort        0407        (impure)
  1160. >20    beshort        0410        (pure)
  1161. >20    beshort        0413        (demand paged)
  1162. >20    beshort        0421        (standalone)
  1163. 0    beshort        0521        mc68k executable (shared)
  1164. >12    belong        >0        not stripped
  1165. 0    beshort        0522        mc68k executable (shared demand paged)
  1166. >12    belong        >0        not stripped
  1167. #
  1168. # Motorola/UniSoft 68K Binary Compatibility Standard (BCS)
  1169. #
  1170. 0    beshort        0554        68K BCS executable
  1171. #
  1172. # 88K
  1173. #
  1174. # Motorola/88Open BCS
  1175. #
  1176. 0    beshort        0555        88K BCS executable
  1177. #
  1178. # Various MS-DOS (and OS/2) magic numbers
  1179. #
  1180. # Contributions: Jouni Miettunen jon@stekt.oulu.fi
  1181. #                Greg Roelofs roe2@midway.uchicago.edu 
  1182. #                Darrel Hankerson hankedr@mail.auburn.edu
  1183. #
  1184. 0  string      MZ             DOS executable
  1185. >24   string   @              (OS/2 or Windows format)
  1186. # DH: OS/2 lh 2.22
  1187. >>0xe7 string  LH/2\ Self-Extract  (%s)
  1188. # DH: OS/2 PKZip 1.01
  1189. >>0xe9 string  PKSFX2         (%s)
  1190. >0x19 string   \x0\x0\x0LZ91  (lzexe compressed)
  1191. >0x1c string   RJSX\xff\xff   (ARJ SFX)
  1192. >0x1c string   diet\xf9\x9c   (diet compressed)
  1193. >0x1e string   Copyright\ 1989-1990\ PKWARE\ Inc.  (PKSFX)
  1194. # JM: 0x1e "PKLITE Copr. 1990-92 PKWARE Inc. All Rights Reserved\7\0\0\0"
  1195. >0x1e string   PKLITE\ Copr.  (%.6s compressed)
  1196. >0x24 string   LHa's\ SFX     (%.15s) 
  1197. >0x24 string   LHA's\ SFX     (%.15s)
  1198. 0  string      LZ             DOS executable (built-in)
  1199. 0  byte     0xe9              DOS executable (COM)
  1200. >6 string   SFX\ of\ LHarc    (%s)
  1201. 0  byte     0xeb              DOS executable (COM)
  1202. 0  byte     0xf0              MS-DOS program library
  1203.  
  1204. 0  string   ?_\3\0            Windows HLP
  1205.  
  1206. #
  1207. # magic.tower:
  1208. #
  1209. # NCR Tower objects, contributed by
  1210. # Michael R. Wayne  ***  TMC & Associates  ***  INTERNET: wayne@ford-vax.arpa
  1211. # uucp: {philabs | pyramid} !fmsrl7!wayne   OR   wayne@fmsrl7.UUCP
  1212. #
  1213. 0    beshort        000610    Tower/XP rel 2 object
  1214. >12       belong        >0    not stripped
  1215. >20       beshort        0407    executable
  1216. >20       beshort        0410    pure executable
  1217. >22       beshort        >0    - version %ld
  1218. 0    beshort        000615    Tower/XP rel 2 object
  1219. >12       belong        >0    not stripped
  1220. >20       beshort        0407    executable
  1221. >20       beshort        0410    pure executable
  1222. >22       beshort        >0    - version %ld
  1223. 0    beshort        000620    Tower/XP rel 3 object
  1224. >12       belong        >0    not stripped
  1225. >20       beshort        0407    executable
  1226. >20       beshort        0410    pure executable
  1227. >22       beshort        >0    - version %ld
  1228. 0    beshort        000625    Tower/XP rel 3 object
  1229. >12       belong        >0    not stripped
  1230. >20       beshort        0407    executable
  1231. >20       beshort        0410    pure executable
  1232. >22       beshort        >0    - version %ld
  1233. 0    beshort        000630    Tower32/600/400 68020 object
  1234. >12       belong        >0    not stripped
  1235. >20       beshort        0407    executable
  1236. >20       beshort        0410    pure executable
  1237. >22       beshort        >0    - version %ld
  1238. 0    beshort        000640    Tower32/800 68020
  1239. >18       beshort        &020000    w/68881 object
  1240. >18       beshort        &040000    compatible object
  1241. >18       beshort        &~060000    object
  1242. >20       beshort        0407    executable
  1243. >20       beshort        0413    pure executable
  1244. >12       belong        >0    not stripped
  1245. >22       beshort        >0    - version %ld
  1246. 0    beshort        000645    Tower32/800 68010
  1247. >18       beshort        &040000    compatible object
  1248. >18       beshort        &~060000 object
  1249. >20       beshort        0407    executable
  1250. >20       beshort        0413    pure executable
  1251. >12       belong        >0    not stripped
  1252. >22       beshort        >0    - version %ld
  1253. # NeWS, not "news" as in "netnews"
  1254. 0    string        StartFontMetrics    ASCII font metrics
  1255. 0    string        StartFont    ASCII font bits
  1256. 0    long        0x137A2944    NeWS bitmap font
  1257. 0    long        0x137A2947    NeWS font family
  1258. # >>>>> OS/2 INF/HLP <<<<<  (source: Daniel Dissett ddissett@netcom.com)
  1259. # Carl Hauser (chauser.parc@xerox.com) and 
  1260. # Marcus Groeber (marcusg@ph-cip.uni-koeln.de)
  1261. # list the following header format in inf02a.doc:
  1262. #
  1263. #   int16 ID;           // ID magic word (5348h = "HS")
  1264. #  int8  unknown1;     // unknown purpose, could be third letter of ID
  1265. #  int8  flags;        // probably a flag word...
  1266. #                      //  bit 0: set if INF style file
  1267. #                      //  bit 4: set if HLP style file
  1268. #                      // patching this byte allows reading HLP files
  1269. #                      // using the VIEW command, while help files 
  1270. #                      // seem to work with INF settings here as well.
  1271. #  int16 hdrsize;      // total size of header
  1272. #  int16 unknown2;     // unknown purpose
  1273. 0   string  HSP\x01\x9b\x00 OS/2 INF
  1274. >107 string >0                      (%s)
  1275. 0   string  HSP\x10\x9b\x00     OS/2 HLP
  1276. >107 string >0                      (%s)
  1277.  
  1278. # OS/2 INI (this is a guess)
  1279. 0  string   \xff\xff\xff\xff\x14\0\0\0  OS/2 INI
  1280.  
  1281. #
  1282. # XXX - byte order?
  1283. #
  1284. 0    short    0x2a17    "compact bitmap" format (Poskanzer)
  1285. #
  1286. # magic.pdp: PDP-11 executable/object and APL workspace
  1287. #
  1288. 0    lelong        0101555        PDP-11 single precision APL workspace
  1289. 0    lelong        0101554        PDP-11 double precision APL workspace
  1290.  
  1291. #
  1292. # PDP-11 a.out
  1293. #
  1294. 0    leshort        0407        PDP-11 executable
  1295. >8    leshort        >0        not stripped
  1296.  
  1297. 0    leshort        0401        PDP-11 UNIX/RT ldp
  1298. 0    leshort        0405        PDP-11 old overlay
  1299.  
  1300. 0    leshort        0410        PDP-11 pure executable
  1301. >8    leshort        >0        not stripped
  1302.  
  1303. 0    leshort        0411        PDP-11 separate I&D executable
  1304. >8    leshort        >0        not stripped
  1305.  
  1306. 0    leshort        0437        PDP-11 kernel overlay
  1307. #
  1308. # pgp (pretty good protection)
  1309. 0       short           0x9900                  pgp key public ring
  1310. 0       short           0x9501                  pgp key security ring
  1311. 0       string          -----BEGIN\040PGP       pgp armored data
  1312. >15     string          PUBLIC\040KEY\040BLOCK- public key blocK
  1313. >15     string          MESSAGE-                message
  1314. >15     string          SIGNED\040MESSAGE-      signed message
  1315. >15     string          PGP\040SIGNATURE-       signature
  1316. #
  1317. # SysV R4 PKG Datastreams:
  1318. #
  1319. 0       string          #\ PaCkAgE\ DaTaStReAm  pkg Datastream (SVR4)
  1320. #
  1321. #/etc/magic entries for Plus Five's UNIX MUMPS
  1322. #
  1323. # XXX - byte order?  Paging Hokey....
  1324. #
  1325. 0    short        0x259        mumps avl global
  1326. >2    byte        >0        (V%d)
  1327. >6    byte        >0        with %d byte name
  1328. >7    byte        >0        and %d byte data cells
  1329. 0    short        0x25a        mumps blt global
  1330. >2    byte        >0        (V%d)
  1331. >8    short        >0        - %d byte blocks
  1332. >15    byte        0x00        - P/D format
  1333. >15    byte        0x01        - P/K/D format
  1334. >15    byte        0x02        - K/D format
  1335. >15    byte        >0x02        - Bad Flags
  1336. #
  1337. # magic.postscript: Magic for postscript files
  1338. #
  1339. # XXX - should we match only versions 1.0 and 2.0, or should we wildcard
  1340. # it?
  1341. #
  1342. 0    string        %!        PostScript text
  1343. >2    string    PS-Adobe-        conforming
  1344. >>11    string    1.0            at level %s
  1345. >>11    string    2.0            at level %s
  1346. #
  1347. # magic.ps: psdatabase magic
  1348. #
  1349. #0    byte    0126    ps database
  1350. #>1    string    >\0    - version %s
  1351. #>4    string    >\0    from kernel %s
  1352. #
  1353. # magic.pyramid: Magic for pyramids
  1354. #
  1355. # XXX - byte order?
  1356. #
  1357. 0    long        0x50900107    Pyramid 90x family executable
  1358. 0    long        0x50900108    Pyramid 90x family pure executable
  1359. >16    long        >0        not stripped
  1360. 0    long        0x5090010b    Pyramid 90x family demand paged pure executable
  1361. >16    long        >0        not stripped
  1362. # for SC
  1363. 38    string        Spreadsheet    sc file
  1364. # SCCS archive structure:
  1365. # \001h01207
  1366. # \001s 00276/00000/00000
  1367. # \001d D 1.1 87/09/23 08:09:20 ian 1 0
  1368. # \001c date and time created 87/09/23 08:09:20 by ian
  1369. # \001e
  1370. # \001u
  1371. # \001U
  1372. # ... etc.
  1373. # Now '\001h' happens to be the same as the 3B20's a.out magic number (0550).
  1374. # *Sigh*. And these both came from various parts of the USG.
  1375. # Maybe we should just switch everybody from SCCS to RCS!
  1376. # Further, you can't just say '\001h0', because the five-digit number
  1377. # is a checksum that could (presumably) have any leading digit,
  1378. # and we don't have regular expression matching yet. 
  1379. # Hence the following official kludge:
  1380. 8    string        \001s\             SCCS archive.
  1381. #
  1382. # magic.sendmail:
  1383. #
  1384. # XXX - byte order?
  1385. #
  1386. 0    byte    046      Sendmail frozen configuration 
  1387. >16    string    >\0      - version %s
  1388. 0    short    0x271c      Sendmail frozen configuration
  1389. >16    string    >\0      - version %s
  1390. # Sequent information updated by Don Dwiggins <atsun!dwiggins>.
  1391. # For Sequent's multiprocessor systems (incomplete).
  1392. 0       leshort   0x00ea        BALANCE NS32000 .o
  1393. 0       leshort   0x10ea        BALANCE NS32000 executable (0 @ 0)
  1394. >16     lelong    >0            not stripped
  1395. 0       leshort   0x20ea        BALANCE NS32000 executable (invalid @ 0)
  1396. >16     lelong    >0            not stripped
  1397. 0       leshort   0x30ea        BALANCE NS32000 standalone executable
  1398. >16     lelong    >0            not stripped
  1399. # Also need info on Sequent "Symmetry" series...
  1400. # $Id: sgml,v 1.3 93/01/05 12:52:44 ian Exp $
  1401. # SGML goop, mostly from rph@sq.
  1402. 0    string        \<!DOCTYPE    Exported SGML document
  1403. 0    string        \<!doctype    Exported SGML document
  1404. 0    string        \<!SUBDOC    Exported SGML subdocument
  1405. 0    string        \<!subdoc    Exported SGML subdocument
  1406. # SoftQuad Publishing Software magic numbers
  1407. # $Id: softquad,v 1.8 93/02/19 14:36:43 ian Exp $
  1408. # Author/Editor and RulesBuilder
  1409. #
  1410. # XXX - byte order?
  1411. #
  1412. 0    string        \<!SQ\ DTD>    Compiled SGML rules file
  1413. >9    string        >\0         Type %s
  1414. 0    string        \<!SQ\ A/E>    A/E SGML Document binary
  1415. >9    string        >\0         Type %s
  1416. 0    string        \<!SQ\ STS>    A/E SGML binary styles file
  1417. >9    string        >\0         Type %s
  1418. 0    short        0xc0de        Compiled PSI (v1) data
  1419. 0    short        0xc0da        Compiled PSI (v2) data
  1420. >3    string        >\0        (%s)
  1421. # Binary sqtroff font/desc files...
  1422. 0    short        0125252        SoftQuad DESC or font file binary
  1423. >2    short        >0        - version %d
  1424. # Bitmaps...
  1425. 0    string        SQ\ BITMAP1    SoftQuad Raster Format text
  1426. #0    string        SQ\ BITMAP2    SoftQuad Raster Format data
  1427. # sqtroff intermediate language (replacement for ditroff int. lang.)
  1428. 0    string        X\         SoftQuad troff Context intermediate
  1429. >2    string        495        for AT&T 495 laser printer
  1430. >2    string        hp        for Hewlett-Packard LaserJet
  1431. >2    string        impr        for IMAGEN imPRESS
  1432. >2    string        ps        for PostScript
  1433. #
  1434. # Values for big-endian Sun (MC680x0, SPARC) binaries on pre-5.x
  1435. # releases.
  1436. # (5.x uses ELF.)
  1437. #
  1438. 0    belong&0777777    0600413        sparc demand paged
  1439. >0    byte        &0x80
  1440. >>20    belong        <4096        shared library
  1441. >>20    belong        =4096        dynamically linked executable
  1442. >>20    belong        >4096        dynamically linked executable
  1443. >0    byte        ^0x80        executable
  1444. >16    belong        >0        not stripped
  1445. 0    belong&0777777    0600410        sparc pure
  1446. >0    byte        &0x80        dynamically linked executable
  1447. >0    byte        ^0x80        executable
  1448. >16    belong        >0        not stripped
  1449. 0    belong&0777777    0600407        sparc
  1450. >0    byte        &0x80        dynamically linked executable
  1451. >0    byte        ^0x80        executable
  1452. >16    belong        >0        not stripped
  1453.  
  1454. 0    belong&0777777    0400413        mc68020 demand paged
  1455. >0    byte        &0x80
  1456. >>20    belong        <4096        shared library
  1457. >>20    belong        =4096        dynamically linked executable
  1458. >>20    belong        >4096        dynamically linked executable
  1459. >16    belong        >0        not stripped
  1460. 0    belong&0777777    0400410        mc68020 pure
  1461. >0    byte        &0x80        dynamically linked executable
  1462. >0    byte        ^0x80        executable
  1463. >16    belong        >0        not stripped
  1464. 0    belong&0777777    0400407        mc68020
  1465. >0    byte        &0x80        dynamically linked executable
  1466. >0    byte        ^0x80        executable
  1467. >16    belong        >0        not stripped
  1468.  
  1469. 0    belong&0777777    0200413        mc68010 demand paged
  1470. >0    byte        &0x80
  1471. >>20    belong        <4096        shared library
  1472. >>20    belong        =4096        dynamically linked executable
  1473. >>20    belong        >4096        dynamically linked executable
  1474. >16    belong        >0        not stripped
  1475. 0    belong&0777777    0200410        mc68010 pure
  1476. >0    byte        &0x80        dynamically linked executable
  1477. >0    byte        ^0x80        executable
  1478. >16    belong        >0        not stripped
  1479. 0    belong&0777777    0200407        mc68010
  1480. >0    byte        &0x80        dynamically linked executable
  1481. >0    byte        ^0x80        executable
  1482. >16    belong        >0        not stripped
  1483.  
  1484. # reworked these to avoid anything beginning with zero becoming "old sun-2"
  1485. 0    belong        0407        old sun-2 executable
  1486. >16    belong        >0        not stripped
  1487. 0    belong        0410        old sun-2 pure executable
  1488. >16    belong        >0        not stripped
  1489. 0    belong        0413        old sun-2 demand paged executable
  1490. >16    belong        >0        not stripped
  1491.  
  1492. #
  1493. # Core files.  "SPARC 4.x BCP" means "core file from a SunOS 4.x SPARC
  1494. # binary executed in compatibility mode under SunOS 5.x".
  1495. #
  1496. 0    belong        0x080456    SunOS core file
  1497. >4    belong        432        (SPARC)
  1498. >>132    string        >\0        from '%s'
  1499. >4    belong        826        (68K)
  1500. >>128    string        >\0        from '%s'
  1501. >4    belong        456        (SPARC 4.x BCP)
  1502. >>152    string        >\0        from '%s'
  1503. #
  1504. # Sun rasterfiles
  1505. #
  1506. # XXX - byte order?  What about the 386i?
  1507. #
  1508. 0    string    \x59\xa6\x6a\x95    rasterfile
  1509. >4    long    >0        %d
  1510. >8    long    >0        x %d
  1511. >12    long    >0        x %d
  1512. >20    long    0        old format
  1513. >20    long    2        compressed
  1514. >24    long    1        with color map
  1515. #
  1516. # Terminfo
  1517. #
  1518. # XXX - byte order for screen images?
  1519. #
  1520. 0    string        \032\001    Compiled terminfo entry
  1521. 0    short        0433        Curses screen image
  1522. 0    short        0434        Curses screen image
  1523. #
  1524. # magic.tex: 
  1525. #
  1526. # XXX - needs byte-endian stuff (big-endian and little-endian DVI?)
  1527. #
  1528. #0  short   0173402 DVI File
  1529. 0   string  \xf7\x02\x01\x83        DVI
  1530. >16 string  >\0             (%s)
  1531. # PK files and font lib entries from dvips
  1532. 0  string   \xf7\x59             TeX PK
  1533. >3 string   >\0                  (%s)
  1534. # font lib has string length (short) preceding comment
  1535. 0  string   FLIB\2\0             emTeX font lib
  1536. >12 short   >0
  1537. >>14 string >\0                  (%s)
  1538. 0   short   0173531 Packed TeX Font
  1539. >4  string  >\0 (%s)
  1540. 2   string  \000\022    Metafont Font Metric
  1541. >33 string  >\0 (%s)
  1542. # TeX vf entries from dvips: pre,id,len. String need not be asciiz.
  1543. 0  string   \xf7\xca TeX vf
  1544. >3 string   >\0      (%s)
  1545. #
  1546. 0  string   This\ is\ Info\ file  TeX Info text
  1547. >18 string   >\0                  (%s)
  1548. 0  string   Info\ file            TeX Info text
  1549. >10 string   >\0                  (%s)
  1550. #
  1551. # magic.troff:
  1552. #
  1553. 0    string        \100\357    very old (C/A/T) troff output data
  1554. 0    string        '        [nt]roff, tbl, or eqn input text
  1555.  
  1556. # other typesetting magic
  1557. 0    string        \100\357    very old (C/A/T) troff output data
  1558. 0    string        Interpress/Xerox    Xerox InterPress data
  1559. >16    string        /            (version
  1560. >>17    string        >\0            %s)
  1561. #
  1562. # magic.unknown: Unknown machine magic
  1563. #
  1564. # XXX - this probably should be pruned, as it'll match PDP-11 and
  1565. # VAX image formats.
  1566. #
  1567. # 0x107 is 0407; 0x108 is 0410; both are PDP-11 (executable and pure,
  1568. # respectively).
  1569. #
  1570. # 0x109 is 0411; that's PDP-11 split I&D, but the PDP-11 version doesn't
  1571. # have the "version %ld", which may be a bogus COFFism (I don't think
  1572. # there ever was COFF for the PDP-11).
  1573. #
  1574. # 0x10B is 0413; that's VAX demand-paged, but this is a short, not a
  1575. # long, as it would be on a VAX.
  1576. #
  1577. # 0x10C is 0414, 0x10D is 0415, and 0x10E is 416; those *are* unknown.
  1578. #
  1579. 0    short        0x107        unknown machine executable
  1580. >8    short        >0        not stripped
  1581. >15    byte        >0        - version %ld
  1582. 0    short        0x108        unknown pure executable
  1583. >8    short        >0        not stripped
  1584. >15    byte        >0        - version %ld
  1585. 0    short        0x109        PDP-11 separate I&D
  1586. >8    short        >0        not stripped
  1587. >15    byte        >0        - version %ld
  1588. 0    short        0x10b        unknown pure executable
  1589. >8    short        >0        not stripped
  1590. >15    byte        >0        - version %ld
  1591. 0    long        0x10c        unknown demand paged pure executable
  1592. >16    long        >0        not stripped
  1593. 0    long        0x10d        unknown demand paged pure executable
  1594. >16    long        >0        not stripped
  1595. 0    long        0x10e        unknown readable demand paged pure executable
  1596. 0    string        begin         uuencoded mail text
  1597. # Btoa(1) is an alternative to uuencode that requires less space.
  1598. 0    string        xbtoa\ Begin    btoa'd text
  1599. # ship is used by INFO-Zip
  1600. 0  string   $\015\012ship     ship mail text
  1601. >8 string   >\0               (%s)
  1602. 0  string   $\012ship         ship mail text
  1603. >7 string   >\0               (%s)
  1604.  
  1605. #    Herewith many of the object file formats used by USG systems.
  1606. #    Most have been moved to files for a particular processor,
  1607. #    and deleted if they duplicate other entries.
  1608. #
  1609. 0    short        0610        Perkin-Elmer executable
  1610. #
  1611. # magic.pdp: VAX executable/object and APL workspace
  1612. #
  1613. 0    lelong        0101557        VAX single precision APL workspace
  1614. 0    lelong        0101556        VAX double precision APL workspace
  1615.  
  1616. #
  1617. # VAX a.out (32V, BSD)
  1618. #
  1619. 0    lelong        0407        VAX executable
  1620. >16    lelong        >0        not stripped
  1621.  
  1622. 0    lelong        0410        VAX pure executable
  1623. >16    lelong        >0        not stripped
  1624.  
  1625. 0    lelong        0413        VAX demand paged pure executable
  1626. >16    lelong        >0        not stripped
  1627.  
  1628. 0    lelong        0420        VAX demand paged (first page unmapped) pure executable
  1629. >16    lelong        >0        not stripped
  1630.  
  1631. #
  1632. # VAX COFF
  1633. #
  1634. # The `versions' should be un-commented if they work for you.
  1635. # (Was the problem just one of endianness?)
  1636. #
  1637. 0    leshort        0570        VAX COFF executable
  1638. >12    lelong        >0        not stripped
  1639. #>22    leshort        >0        - version %ld
  1640. 0    leshort        0575        VAX COFF pure executable
  1641. >12    lelong        >0        not stripped
  1642. #>22    leshort        >0        - version %ld
  1643. #
  1644. # magic.visx: Visx format file
  1645. #
  1646. 0    short        0x5555        VISX image file
  1647. >2    byte        0        (zero)
  1648. >2    byte        1        (unsigned char)
  1649. >2    byte        2        (short integer)
  1650. >2    byte        3        (float 32)
  1651. >2    byte        4        (float 64)
  1652. >2    byte        5        (signed char)
  1653. >2    byte        6        (bit-plane)
  1654. >2    byte        7        (classes)
  1655. >2    byte        8        (statistics)
  1656. >2    byte        10        (ascii text)
  1657. >2    byte        15        (image segments)
  1658. >2    byte        100        (image set)
  1659. >2    byte        101        (unsigned char vector)
  1660. >2    byte        102        (short integer vector)
  1661. >2    byte        103        (float 32 vector)
  1662. >2    byte        104        (float 64 vector)
  1663. >2    byte        105        (signed char vector)
  1664. >2    byte        106        (bit plane vector)
  1665. >2    byte        121        (feature vector)
  1666. >2    byte        122        (feature vector library)
  1667. >2    byte        124        (chain code)
  1668. >2    byte        126        (bit vector)
  1669. >2    byte        130        (graph)
  1670. >2    byte        131        (adjacency graph)
  1671. >2    byte        132        (adjacency graph library)
  1672. >2    string        .VISIX        (ascii text)
  1673. #
  1674. # Formats for Word and WordPerfect (source: Selke's filetype).
  1675. #
  1676. 0    string    \x31\xBE        Microsoft Word
  1677. >2    string    \x00\x00        text
  1678. >2    string    \x01\x00    Textbaustein
  1679. >2 string    \x02\x00        printer description file
  1680. #
  1681. 0    string    \xffWPC         WordPerfect
  1682. >8    string    \x01\x01        macro file
  1683. >8    string    \x01\x02        WordPerfect help file
  1684. >8    string    \x01\x03        keyboard definition file
  1685. >8    string    \x01\x0A        document file
  1686. >8    string    \x01\x0B        dictionary file
  1687. >8    string    \x01\x0C        thesaurus file
  1688. >8    string    \x01\x0D        block
  1689. >8    string    \x01\x0E        rectangular block
  1690. >8    string    \x01\x0F        column block
  1691. >8    string    \x01\x10        printer resource file (PRS)
  1692. >8    string    \x01\x11        setup file
  1693. >8    string    \x01\x12        prefix information file
  1694. >8    string    \x01\x13        printer resource file (ALL)
  1695. >8    string    \x01\x14        display resource file (DRS)
  1696. >8    string    \x01\x15        overlay file (WP.FIL)
  1697. >8    string    \x01\x16        graphics file (WPG)
  1698. >8    string    \x01\x17        hyphenation code module
  1699. >8    string    \x01\x18        hyphenation data module
  1700. >8    string    \x01\x19        macro resource file (MRS)
  1701. >8    string    \x01\x1A        graphics driver (WPD)
  1702. >8    string    \x01\x1B        hyphenation lex module
  1703. #
  1704. 0    string    {rtf            Microsoft Rich Text Format
  1705. 0    string    {\ rtf        Microsoft Rich Text Format
  1706. #
  1707. # magic.x11
  1708. #
  1709. # I think this is byte-order-dependent; if so, it should become:
  1710. #
  1711. # 0    belong    00000004    X11 big-endian snf font
  1712. # 0    lelong    00000004    X11 little-endian snf font
  1713. #
  1714. 0    long    00000004    X11 snf font
  1715. #
  1716. # Zilog Z8000.
  1717. #
  1718. # Was it big-endian or little-endian?  My Product Specification doesn't
  1719. # say.
  1720. #
  1721. 0    long        0xe807        object file (z8000 a.out)
  1722. 0    long        0xe808        pure object file (z8000 a.out)
  1723. 0    long        0xe809        separate object file (z8000 a.out)
  1724. 0    long        0xe805        overlay object file (z8000 a.out)
  1725.  
  1726.