From e600db481ebed29c6fadbbf17f02aa851a9eb810 Mon Sep 17 00:00:00 2001 From: Ian Darwin Date: Tue, 5 Jan 1993 13:22:34 +0000 Subject: [PATCH] Initial revision --- magic/Magdir/apl | 4 +++ magic/Magdir/audio | 23 +++++++++++++++ magic/Magdir/old/TODO.cgm | 59 +++++++++++++++++++++++++++++++++++++++ magic/Magdir/old/ar | 26 +++++++++++++++++ magic/Magdir/old/basic | 7 +++++ 5 files changed, 119 insertions(+) create mode 100644 magic/Magdir/apl create mode 100644 magic/Magdir/audio create mode 100644 magic/Magdir/old/TODO.cgm create mode 100644 magic/Magdir/old/ar create mode 100644 magic/Magdir/old/basic diff --git a/magic/Magdir/apl b/magic/Magdir/apl new file mode 100644 index 00000000..6ede926a --- /dev/null +++ b/magic/Magdir/apl @@ -0,0 +1,4 @@ +# +# magic.apl: +# +0 long 0100554 APL workspace (Ken's original?) diff --git a/magic/Magdir/audio b/magic/Magdir/audio new file mode 100644 index 00000000..75b8ac2a --- /dev/null +++ b/magic/Magdir/audio @@ -0,0 +1,23 @@ +# Sound formats, from Jan Nicolai Langfeldt +0 string .snd audio data: +>12 long 1 8-bit u-law, +>12 long 2 8-bit linear PCM, +>12 long 3 16-bit linear PCM, +>12 long 4 24-bit linear PCM, +>12 long 5 32-bit linear PCM, +>12 long 6 32-bit floating point, +>12 long 7 64-bit floating point, +>12 long 23 compressed (G.721 ADPCM), +>20 long 1 mono, +>20 long 2 stereo, +>20 long 4 quad, +>16 long x %d Hz +8 long 0x41494646 AIFF sound data file +0 long 0x4e54524b MultiTrack sound data file +>4 long x - version %ld +>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 tabl +>19 string B and a EB hash tabl +>22 string X -- out of date diff --git a/magic/Magdir/old/TODO.cgm b/magic/Magdir/old/TODO.cgm new file mode 100644 index 00000000..f9b9e666 --- /dev/null +++ b/magic/Magdir/old/TODO.cgm @@ -0,0 +1,59 @@ + +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 | diff --git a/magic/Magdir/old/ar b/magic/Magdir/old/ar new file mode 100644 index 00000000..1c567494 --- /dev/null +++ b/magic/Magdir/old/ar @@ -0,0 +1,26 @@ +# +# "ar", for all kinds of archives. +0 string ! current ar archive +>8 string __.SYMDEF random library +>0 long =65538 - pre SR9.5 +>0 long =65539 - post SR9.5 +>0 short 2 - object archive +>0 short 3 - shared library module +>0 short 4 - debug break-pointed module +>0 short 5 - absolute code program module +0 string \ System V Release 1 ar archive +0 string = archive +0 long 0xff6d obsolete ar archive +0 long 0x213c6172 archive file +0 long 0177555 very old archive +0 short 0177555 very old PDP-11 archive +0 long 0177545 old archive +0 short 0177545 old PDP-11 archive +0 string = 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) +# Rahul Dhesi's zoo archive format, from keith@cerberus.uchicago.edu. +20 long 0xdca7c4fd Rahul Dhesi's "zoo" archive diff --git a/magic/Magdir/old/basic b/magic/Magdir/old/basic new file mode 100644 index 00000000..0bed9c50 --- /dev/null +++ b/magic/Magdir/old/basic @@ -0,0 +1,7 @@ +# +# magic.basic +# +0 short 0x142 basic-16 executable +>12 long >0 not stripped +0 short 0x143 basic-16 executable (TV) +>12 long >0 not stripped -- 2.50.1