+++ /dev/null
-
-#------------------------------------------------------------------------------
-# 386bsd: file(1) magic for 386BSD objects
-#
-0 lelong 000000413 386BSD demand paged executable
->16 lelong >0 not stripped
+++ /dev/null
-
-Path: sq!geac!torsqnt!tmsoft!robohack!druid!darcy
-From: darcy@druid.uucp (D'Arcy J.M. Cain)
-Newsgroups: comp.graphics
-Subject: Re: File Formats
-Message-ID: <1990Jul12.183149.3002@druid.uucp>
-Date: 12 Jul 90 18:31:49 GMT
-References: <8437@arctic.nprdc.arpa>
-Reply-To: darcy@druid.UUCP (D'Arcy J.M. Cain)
-Organization: D'Arcy Cain Consulting, West Hill, Ontario
-Lines: 47
-
-In article <8437@arctic.nprdc.arpa> armfield@nprdc.navy.mil
-(Sylvia Armfield) writes:
-> I still haven't figured out how to identify the following file formats:
-> CGM
->
-There is more than one type of CGM file. I can help you out with the clear
-text encoding and the binary encoding. The other encoding is character. It
-is described in ISO 8632-2. In any case all CGM files start with the same
-thing, the BEGIN METAFILE statement. The only difference is in how this
-element is encoded.
-
-In clear text encoding the element is simply the ASCII string "BEGMF". In
-binary encoding you have to read in the first two bytes as a word. The
-MSB is followed in the file by the LSB. This word is bitmapped to include
-the following information:
- 15 - 12: Element class
- 11 - 5: Element ID
- 4 - 0: Parameter list length
-
-BEGIN METAFILE is a "Delimiter Element" making it class 0. The element
-ID within that class is 1. The parameter list length is variable so it
-must be ANDed out when comparing. The bit pattern is then:
-
- 0 0 0 0 0 0 0 0 0 0 1 x x x x x
-
-To check it simply AND the word with 0xffe0 and compare it with 0x0020. In
-reading the standard I get the impression that it is actually legal to add
-padding characters (nulls) to the beginning of the file. I rather doubt that
-anyone would actually do this but it may be appropriate to read in words till
-a non zero word is read and compare this word. You can read in full words
-since all elements are constrained to start on a word boundary.
-
-If you want the full description of the CGM format it is available from
-ANSI as the following ISO standards:
-
- ISO 8632-1 Functional specification
- ISO 8632-2 Character encoding
- ISO 8632-3 Binary encoding
- ISO 8632-4 Clear text encoding
-
-HTH
-
---
-D'Arcy J.M. Cain (darcy@druid) | Government:
-D'Arcy Cain Consulting | Organized crime with an attitude
-West Hill, Ontario, Canada |
-(416) 281-6094 |
+++ /dev/null
-#
-# "ar", for all kinds of archives.
-#
-# XXX - why are there multiple <ar> thingies? Note that 0x213c6172 is
-# "!<ar", so, for new-style (4.xBSD/SVR2andup) archives, we have:
-#
-# 0 string !<arch> current ar archive
-# 0 long 0x213c6172 archive file
-#
-# and for SVR3.1 archives, we have:
-#
-# 0 string \<ar> System V Release 1 ar archive
-# 0 string =<ar> archive
-# 0 string =<ar> archive
-#
-# XXX - did Aegis really store shared libraries, breakpointed modules,
-# and absolute code program modules in the same format as new-style
-# "ar" archives?
-#
-0 string !<arch> current ar archive
->8 string __.SYMDEF random library
->0 belong =65538 - pre SR9.5
->0 belong =65539 - post SR9.5
->0 beshort 2 - object archive
->0 beshort 3 - shared library module
->0 beshort 4 - debug break-pointed module
->0 beshort 5 - absolute code program module
-0 string \<ar> System V Release 1 ar archive
-0 string =<ar> archive
-#
-# XXX - from "vax", which appears to collect a bunch of byte-swapped
-# thingies, to help you recognize VAX files on big-endian machines;
-# with "leshort", "lelong", and "string", that's no longer necessary....
-#
-# 0 long 0x3c61723e VAX 5.0 archive
-#
-0 long 0x213c6172 archive file
-0 lelong 0177555 very old VAX archive
-0 leshort 0177555 very old PDP-11 archive
-#
-# XXX - "pdp" claims that 0177545 can have an __.SYMDEF member and thus
-# be a random library (it said 0xff65 rather than 0177545).
-#
-0 lelong 0177545 old VAX archive
->8 string __.SYMDEF random library
-0 leshort 0177545 old PDP-11 archive
->8 string __.SYMDEF random library
-#
-0 string =<ar> archive
-#
-# From "pdp":
-#
-0 lelong 0x39bed PDP-11 old archive
-0 lelong 0x39bee PDP-11 4.0 archive
-#
-0 string -h- Software Tools format archive text
-# "arc" archiver
-0 byte 26 'arc' archive
->1 byte 0 (empty)
->1 byte 1 (old format)
-# >>>>> ZOO <<<<<
-#
-# Rahul Dhesi's zoo archive format, from keith@cerberus.uchicago.edu.
-#20 belong 0xdca7c4fd Rahul Dhesi's "zoo" archive
-# [GRR: don't know if all of these versions exist, or if some are missing...]
-0 string ZOO Zoo archive
->4 string 1.00 (v%4s)
->4 string 1.10 (v%4s)
->4 string 1.20 (v%4s)
->4 string 1.30 (v%4s)
->4 string 1.40 (v%4s)
->4 string 1.50 (v%4s)
->4 string 1.60 (v%4s)
->4 string 1.70 (v%4s)
->4 string 1.71 (v%4s)
->4 string 2.00 (v%4s)
->4 string 2.01 (v%4s)
->4 string 2.10 (v%4s)
-# [newer, smarter "file" programs]
->32 string \001\000 (modify: v1.0+)
->32 string \001\004 (modify: v1.4+)
->32 string \002\000 (modify: v2.0+)
->70 string \001\000 (extract: v1.0+)
->70 string \002\001 (extract: v2.1+)
-
-# ZIP archiver
-0 string PK zip archive file
->4 byte x - version
->4 byte 10 1.0
->4 byte 20 2.0
-
-2 string -lh LHarc archive data
->6 byte x type %c
->20 byte x - header level %d
-
-# From: <u31b3hs@pool.informatik.rwth-aachen.de> (Michael Haardt)
-2 string -lh0- Lharc 1.x archive
-2 string -lh1- Lharc 1.x archive
-2 string -lz4- Lharc 1.x archive
-2 string -lz5- Lharc 1.x archive
-2 string -lzs- LHa 2.x? archive [lzs]
-2 string -lh - LHa 2.x? archive [lh ]
-2 string -lhd- LHa 2.x? archive [lhd]
-2 string -lh2- LHa 2.x? archive [lh2]
-2 string -lh3- LHa 2.x? archive [lh3]
-2 string -lh4- LHa 2.x? archive [lh4]
-2 string -lh5- LHa (2.x) archive
-
-# ARJ archive data from jason@jarthur.Claremont.EDU
-0 leshort 0xea60 ARJ archive data
->5 byte x - version %d,
->8 byte >0 flags:
->>8 byte &0x04 multi-volume,
->>8 byte &0x10 slash switched,
->>8 byte &0x20 backup,
->34 string x original name: %s,
->7 byte 0 os: MS/DOS
->7 byte 1 os: PRIMOS
->7 byte 2 os: UNIX
->7 byte 3 os: Amiga
->7 byte 4 os: Macintosh
->7 byte 5 os: OS/2
->7 byte 6 os: Apple ][ GS
->7 byte 7 os: Atari ST
->7 byte 8 os: NeXT
->7 byte 9 os: VAX/VMS
->3 byte >0 %d]
-# >>>>> SQUISH <<<<<
-#
-0 string SQSH squished archive (Acorn RISCOS)
-
-0 byte 0x1a RISC OS archive
-
+++ /dev/null
-0 byte 26 'arc' archive
->1 byte 0 (empty)
->1 byte 1 (old format)
+++ /dev/null
-0 string BM bitmap
->14 byte 12 (OS/2 1.x format)
->14 byte 64 (OS/2 2.x format)
->14 byte 40 (Windows 3.x format)
-0 string IC icon
-0 string PI pointer
-0 string CI color icon
-0 string CP color pointer
-0 string BA bitmap array
+++ /dev/null
-
-#------------------------------------------------------------------------------
-# bsdi: file(1) magic for BSDI BSD/386
-#
-0 long 0314 BSD/386 demand paged (first page unmapped) pure executable
+++ /dev/null
-#
-# Yes, the two "cpio archive" formats *are* supposed to just be "short".
-# The idea is to indicate archives produced on machines with the same
-# byte order as the machine running "file" with "cpio archive", and
-# to indicate archives produced on machines with the opposite byte order
-# from the machine running "file" with "byte-swapped cpio archive".
-#
-# The SVR4 "cpio(4)" hints that there are additional formats, but they
-# are defined as "short"s; I think all the new formats are
-# character-header formats, and thus are strings not numbers.
-#
-0 short 070707 cpio archive
-0 short 0143561 byte-swapped cpio archive
-0 string 070707 ASCII cpio archive (pre-SVR4 or odc)
-0 string 070701 ASCII cpio archive (SVR4 with no CRC)
-0 string 070702 ASCII cpio archive (SVR4 with CRC)
+++ /dev/null
-# Magic numbers for ditroff intermediate language
-0 string x\ T\ cat titroff output for the C/A/T text
-0 string x\ T\ ps titroff output for PostScript
-0 string x\ T titroff output text
+++ /dev/null
-
-#------------------------------------------------------------------------------
-# floppy.raw: file(1) magic for raw floppies (whose format?)
-#
-0 string \366\366\366\366 Formatted floppy w/ no filesystem data
+++ /dev/null
-0 string \037\213 gzip compressed data
->2 byte <8 - reserved method
->2 byte 8 - deflate method
->3 byte &0x01 , ascii
->3 byte &0x02 , continuation
->3 byte &0x04 , extra field
->3 byte &0x08 , original file name
->3 byte &0x10 , comment
->3 byte &0x20 , encrypted
->4 ledate x , last modified: %s
->8 byte 2 , max compression
->8 byte 4 , max speed
->9 byte =0x00 os: MS/DOS
->9 byte =0x01 os: Amiga
->9 byte =0x02 os: VMS
->9 byte =0x03 os: Unix
->9 byte =0x05 os: Atari
->9 byte =0x06 os: OS/2
->9 byte =0x07 os: MacOS
->9 byte =0x0A os: Tops/20
->9 byte =0x0B os: Win/32
+++ /dev/null
-
-#------------------------------------------------------------------------------
-# html: file(1) magic for HTML (HyperText Markup Language) docs
-#
-# from Daniel Quinlan <quinlan@yggdrasil.com>
-#
-0 string \<HEAD HTML document text (old type)
-0 string \<head HTML document text (old type)
-0 string \<TITLE HTML document text (old type)
-0 string \<title HTML document text (old type)
-0 string \<html HTML document text
-0 string \<HTML HTML document text
-0 string \<! HTML document text
-0 string \<h1 Untitled HTML document text
-0 string \<H1 Untitled HTML document text
+++ /dev/null
-# image file format
-# From Robert Potter, potter@cs.rochester.edu
-0 string Imagefile\ version- iff image data
-# this adds the whole header (inc. version number), informative but longish
->10 string >\0 %s
+++ /dev/null
-# Tell file about magic for IMAGEN printer-ready files:
-0 string @document( Imagen printer
-# this only works if "language xxx" is first item in Imagen header.
->10 string language\ impress (imPRESS data)
->10 string language\ daisy (daisywheel text)
->10 string language\ diablo (daisywheel text)
->10 string language\ printer (line printer emulation)
->10 string language\ tektronix (Tektronix 4014 emulation)
-# Add any other languages that your Imagen uses - remember
-# to keep the word `text' if the file is human-readable.
-#
-# Now magic for IMAGEN font files...
-0 string Rast RST-format raster font data
->45 string >0 face %
+++ /dev/null
-
-#------------------------------------------------------------------------------
-# iris: file(1) magic for mips from an iris4d
-#
-# Dunno what byte-order munging is needed; all of SGI's *current*
-# machines and OSes run in big-endian mode on the MIPS machines,
-# as far as I know, but they do have the MIPSEB and MIPSEL stuff
-# here....
-#
-0 short 0x0160 mipseb
->20 short 0407 executable
->20 short 0410 pure
->20 short 0413 demand paged
->8 long >0 not stripped
->8 long 0 stripped
->22 byte >0 - version %ld.
->23 byte >0 \b%ld
-0 short 0x0162 mipsel
->20 short 0407 executable
->20 short 0410 pure
->20 short 0413 demand paged
->8 long >0 not stripped
->8 long 0 stripped
->23 byte >0 - version %ld.
->22 byte >0 \b%ld
-0 short 0x6001 swapped mipseb
->20 short 03401 executable
->20 short 04001 pure
->20 short 05401 demand paged
->8 long >0 not stripped
->8 long 0 stripped
->22 byte >0 - version %ld.
->23 byte >0 \b%ld
-0 short 0x6201 swapped mipsel
->20 short 03401 executable
->20 short 04001 pure
->20 short 05401 demand paged
->8 long >0 not stripped
->8 long 0 stripped
->22 byte >0 - version %ld.
->23 byte >0 \b%ld
-0 short 0x180 mipseb ucode
-0 short 0x182 mipsel ucode
-#
-# IRIX core format version 1 (from /usr/include/core.out.h)
-0 long 0xdeadadb0 IRIX core dump
->4 long 1 of
->16 string >\0 '%s'
-#
-# Archives - This handles archive subtypes
-#
-0 string !<arch>\n__________E MIPS archive
->20 string U with mipsucode members
->21 string L with mipsel members
->21 string B with mipseb members
->19 string L and a EL hash table
->19 string B and a EB hash table
->22 string X -- out of date
+++ /dev/null
-
-#------------------------------------------------------------------------------
-# mips: file(1) magic for RISC (MIPS) DECstation
-#
-# Should this be "leshort", given that DEC ran the DECstations in
-# little-endian mode?
-#
-# Where is the non-SGI, non-DEC MIPS stuff?
-#
-0 short 0x6201 MIPS executable
+++ /dev/null
-
-#------------------------------------------------------------------------------
-# netbsd: file(1) magic for NetBSD objects
-#
-# All new-style magic numbers are in network byte order.
-#
-0 lelong 000000413 386BSD demand paged executable
->16 lelong >0 not stripped
-0 lelong 000000314 BSDI demand paged executable
->16 lelong >0 not stripped
-
-0 lelong 000000407 NetBSD little-endian object file
->16 lelong >0 not stripped
-0 belong 000000407 NetBSD big-endian object file
->16 belong >0 not stripped
-
-0 belong&0377777777 041400413 NetBSD/i386 demand paged
->0 byte &0x80
->>20 lelong <4096 shared library
->>20 lelong =4096 dynamically linked executable
->>20 lelong >4096 dynamically linked executable
->0 byte ^0x80 executable
->16 lelong >0 not stripped
-0 belong&0377777777 041400410 NetBSD/i386 pure
->0 byte &0x80 dynamically linked executable
->0 byte ^0x80 executable
->16 lelong >0 not stripped
-0 belong&0377777777 041400407 NetBSD/i386
->0 byte &0x80 dynamically linked executable
->0 byte ^0x80
->>20 lelong !0 executable
->>20 lelong =0 object file
->16 lelong >0 not stripped
-
-0 belong&0377777777 041600413 NetBSD/m68k demand paged
->0 byte &0x80
->>20 belong <8192 shared library
->>20 belong =8192 dynamically linked executable
->>20 belong >8192 dynamically linked executable
->0 byte ^0x80 executable
->16 belong >0 not stripped
-0 belong&0377777777 041600410 NetBSD/m68k pure
->0 byte &0x80 dynamically linked executable
->0 byte ^0x80 executable
->16 belong >0 not stripped
-0 belong&0377777777 041600407 NetBSD/m68k
->0 byte &0x80 dynamically linked executable
->0 byte ^0x80
->>20 belong !0 executable
->>20 belong =0 object file
->16 belong >0 not stripped
-
-0 belong&0377777777 042000413 NetBSD/m68k4k demand paged
->0 byte &0x80
->>20 belong <4096 shared library
->>20 belong =4096 dynamically linked executable
->>20 belong >4096 dynamically linked executable
->0 byte ^0x80 executable
->16 belong >0 not stripped
-0 belong&0377777777 042000410 NetBSD/m68k4k pure
->0 byte &0x80 dynamically linked executable
->0 byte ^0x80 executable
->16 belong >0 not stripped
-0 belong&0377777777 042000407 NetBSD/m68k4k
->0 byte &0x80 dynamically linked executable
->0 byte ^0x80
->>20 belong !0 executable
->>20 belong =0 object file
->16 belong >0 not stripped
-
-0 belong&0377777777 042200413 NetBSD/ns32532 demand paged
->0 byte &0x80
->>20 lelong <4096 shared library
->>20 lelong =4096 dynamically linked executable
->>20 lelong >4096 dynamically linked executable
->0 byte ^0x80 executable
->16 lelong >0 not stripped
-0 belong&0377777777 042200410 NetBSD/ns32532 pure
->0 byte &0x80 dynamically linked executable
->0 byte ^0x80 executable
->16 lelong >0 not stripped
-0 belong&0377777777 042200407 NetBSD/ns32532
->0 byte &0x80 dynamically linked executable
->0 byte ^0x80
->>20 lelong !0 executable
->>20 lelong =0 object file
->16 lelong >0 not stripped
-
-0 belong&0377777777 042400413 NetBSD/sparc demand paged
->0 byte &0x80
->>20 belong <8192 shared library
->>20 belong =8192 dynamically linked executable
->>20 belong >8192 dynamically linked executable
->0 byte ^0x80 executable
->16 belong >0 not stripped
-0 belong&0377777777 042400410 NetBSD/sparc pure
->0 byte &0x80 dynamically linked executable
->0 byte ^0x80 executable
->16 belong >0 not stripped
-0 belong&0377777777 042400407 NetBSD/sparc
->0 byte &0x80 dynamically linked executable
->0 byte ^0x80
->>20 belong !0 executable
->>20 belong =0 object file
->16 belong >0 not stripped
-
-0 belong&0377777777 041400507 NetBSD/i386 core
->12 string >\0 from '%s'
-
-0 belong&0377777777 041600507 NetBSD/m68k core
->12 string >\0 from '%s'
-
-0 belong&0377777777 042000507 NetBSD/m68k4k core
->12 string >\0 from '%s'
-
-0 belong&0377777777 042200507 NetBSD/ns32532 core
->12 string >\0 from '%s'
-
-0 belong&0377777777 042400507 NetBSD/sparc core
->12 string >\0 from '%s'
+++ /dev/null
-#
-# magic.postscript: Magic for postscript files
-#
-# XXX - should we match only versions 1.0 and 2.0, or should we wildcard
-# it?
-#
-0 string %! PostScript document
->2 string PS-Adobe- conforming
->>11 string 1.0 at level %s
->>11 string 2.0 at level %s
->>11 string 3.0 at level %s
-# Some pc's have the annoying habit of adding a ^D
-0 string \004%! PostScript document
->3 string PS-Adobe- conforming
->>12 string 1.0 at level %s
->>12 string 2.0 at level %s
->>12 string 3.0 at level %s
+++ /dev/null
-# From <janl@ifi.uio.no>
-# I made this with the help of the man page for rle(5). Ihey missing
-# from the magic numbers I have:
-
-#
-# rle
-#
-0 beshort 0xcc52 Utah Raster Toolkit RLE
->2 beshort >0 lower left corner: %d
->4 beshort >0 lower right corner: %d
->6 beshort >0 %d x
->8 beshort >0 %d
->10 byte&0x1 =0x1 CLEARFIRST
->10 byte&0x2 =0x2 NO_BACKGROUND
->10 byte&0x4 =0x4 ALPHA
->10 byte&0x8 =0x8 COMMENT
->11 byte >0 %d colour channels
->12 byte >0 %d bits pr. pixel
->13 byte >0 %d colour map channels
+++ /dev/null
-
-#------------------------------------------------------------------------------
-# sunraster: file(1) magic for Sun rasterfiles
-#
-# XXX - byte order? What about the 386i?
-#
-0 string \x59\xa6\x6a\x95 rasterfile
->4 belong >0 %d
->8 belong >0 x %d
->12 belong >0 x %d
->20 belong 0 old format
->20 belong 2 compressed
->24 belong 1 with color map
+++ /dev/null
-
-#------------------------------------------------------------------------------
-# x11: file(1) magic for X11 fonts
-#
-# I think this is byte-order-dependent; if so, it should become:
-#
-# 0 belong 00000004 X11 big-endian snf font
-# 0 lelong 00000004 X11 little-endian snf font
-#
-0 long 00000004 X11 snf font
-
-# some X11 fonts, from Daniel Quinlan (quinlan@yggdrasil.com)
-0 string \001fcp X11 font data
-0 string D1.0\015\012\000\000 X11 Speedo font data