Vendor import of file 5.19.
This commit is contained in:
parent
b60a4870e8
commit
77409849e7
248
ChangeLog
248
ChangeLog
@ -1,3 +1,245 @@
|
||||
2014-06-12 12:28 Christos Zoulas <christos@zoulas.com>
|
||||
|
||||
* release 5.19
|
||||
|
||||
2014-06-09 9:04 Christos Zoulas <christos@zoulas.com>
|
||||
|
||||
* Misc buffer overruns and missing buffer size tests in cdf parsing
|
||||
(Francisco Alonso, Jan Kaluza)
|
||||
|
||||
2014-06-02 14:50 Christos Zoulas <christos@zoulas.com>
|
||||
|
||||
* Enforce limit of 8K on regex searches that have no limits
|
||||
* Allow the l modifier for regex to mean line count. Default
|
||||
to byte count. If line count is specified, assume a max
|
||||
of 80 characters per line to limit the byte count.
|
||||
* Don't allow conversions to be used for dates, allowing
|
||||
the mask field to be used as an offset.
|
||||
|
||||
2014-05-30 12:51 Christos Zoulas <christos@zoulas.com>
|
||||
|
||||
* Make the range operator limit the length of the
|
||||
regex search.
|
||||
|
||||
2014-05-14 19:23 Christos Zoulas <christos@zoulas.com>
|
||||
|
||||
* PR/347: Windows fixes
|
||||
* PR/352: Hangul word processor recognition
|
||||
* PR/354: Encoding irregularities in text files
|
||||
|
||||
2014-05-06 6:12 Christos Zoulas <christos@zoulas.com>
|
||||
|
||||
* Fix uninitialized title in CDF files (Jan Kaluza)
|
||||
|
||||
2014-05-04 14:55 Christos Zoulas <christos@zoulas.com>
|
||||
|
||||
* PR/351: Fix compilation of empty files
|
||||
|
||||
2014-04-30 17:39 Christos Zoulas <christos@zoulas.com>
|
||||
|
||||
* Fix integer formats: We don't specify 'l' or
|
||||
'h' and 'hh' specifiers anymore, only 'll' for
|
||||
quads and nothing for the rest. This is so that
|
||||
magic writing is simpler.
|
||||
|
||||
2014-04-01 15:25 Christos Zoulas <christos@zoulas.com>
|
||||
|
||||
* PR/341: Jan Kaluza, fix memory leak
|
||||
* PR/342: Jan Kaluza, fix out of bounds read
|
||||
|
||||
2014-03-28 15:25 Christos Zoulas <christos@zoulas.com>
|
||||
|
||||
* Fix issue with long formats not matching fmtcheck
|
||||
|
||||
2014-03-26 11:25 Christos Zoulas <christos@zoulas.com>
|
||||
|
||||
* release 5.18
|
||||
|
||||
2014-03-15 17:45 Christos Zoulas <christos@zoulas.com>
|
||||
|
||||
* add fmtcheck(3) for those who don't have it
|
||||
|
||||
2014-03-14 15:12 Christos Zoulas <christos@zoulas.com>
|
||||
|
||||
* prevent mime entries from being attached to magic
|
||||
entries with no descriptions
|
||||
|
||||
* adjust magic strength for regex type
|
||||
|
||||
* remove superfluous ascmagic with encoding test
|
||||
|
||||
2014-03-06 12:01 Christos Zoulas <christos@zoulas.com>
|
||||
|
||||
* fix regression fix echo -ne "\012\013\014" | file -i -
|
||||
which printed "binary" instead of "application/octet-stream"
|
||||
|
||||
* add size_t overflow check for magic file size
|
||||
|
||||
2014-02-27 16:01 Christos Zoulas <christos@zoulas.com>
|
||||
|
||||
* experimental support for matching with CFD CLSID
|
||||
|
||||
2014-02-18 13:04 Kimmo Suominen (kimmo@suominen.com)
|
||||
|
||||
* Cache old LC_CTYPE locale before setting it to "C", so
|
||||
we can use it to restore LC_CTYPE instead of asking
|
||||
setlocale() to scan the environment variables.
|
||||
|
||||
2014-02-12 18:21 Christos Zoulas <christos@zoulas.com>
|
||||
|
||||
* Count recursion levels through indirect magic
|
||||
|
||||
2014-02-11 10:40 Christos Zoulas <christos@zoulas.com>
|
||||
|
||||
* Prevent infinite recursion on files with indirect offsets of 0
|
||||
|
||||
2014-01-30 21:00 Christos Zoulas <christos@zoulas.com>
|
||||
|
||||
* Add -E flag that makes file print filesystem errors to stderr
|
||||
and exit.
|
||||
|
||||
2014-01-08 17:20 Christos Zoulas <christos@zoulas.com>
|
||||
|
||||
* mime printing could print results from multiple magic entries
|
||||
if there were multiple matches.
|
||||
* in some cases overflow was not detected when computing offsets
|
||||
in softmagic.
|
||||
|
||||
2013-12-05 12:00 Christos Zoulas <christos@zoulas.com>
|
||||
|
||||
* use strcasestr() to for cdf strings
|
||||
* reset to the "C" locale while doing regex operations, or case
|
||||
insensitive comparisons; this is provisional
|
||||
|
||||
2013-11-19 20:10 Christos Zoulas <christos@zoulas.com>
|
||||
|
||||
* always leave magic file loaded, don't unload for magic_check, etc.
|
||||
* fix default encoding to binary instead of unknown which broke recently
|
||||
* handle empty and one byte files, less specially so that
|
||||
--mime-encoding does not break completely.
|
||||
`
|
||||
2013-11-06 14:40 Christos Zoulas <christos@zoulas.com>
|
||||
|
||||
* fix erroneous non-zero exit code from non-existant file and message
|
||||
|
||||
2013-10-29 14:25 Christos Zoulas <christos@zoulas.com>
|
||||
|
||||
* add CDF MSI file detection (Guy Helmer)
|
||||
|
||||
2013-09-03 11:56 Christos Zoulas <christos@zoulas.com>
|
||||
|
||||
* Don't mix errors and regular output if there was an error
|
||||
* in magic_descriptor() don't close the file and try to restore
|
||||
its position
|
||||
|
||||
2013-05-30 17:25 Christos Zoulas <christos@zoulas.com>
|
||||
|
||||
* Don't treat magic as an error if offset was past EOF (Christoph Biedl)
|
||||
|
||||
2013-05-28 17:25 Christos Zoulas <christos@zoulas.com>
|
||||
|
||||
* Fix spacing issues in softmagic and elf (Jan Kaluza)
|
||||
|
||||
2013-05-02 18:00 Christos Zoulas <christos@zoulas.com>
|
||||
|
||||
* Fix segmentation fault with multiple magic_load commands.
|
||||
|
||||
2013-04-22 11:20 Christos Zoulas <christos@zoulas.com>
|
||||
|
||||
* The way "default" was implemented was not very useful
|
||||
because the "if something was printed at that level"
|
||||
was not easily controlled by the user, and the format
|
||||
was bound to a string which is too restrictive. Add
|
||||
a "clear" for that level keyword and make "default"
|
||||
void. This way one can do:
|
||||
|
||||
>>13 clear x
|
||||
>>13 lelong 1 foo
|
||||
>>13 lelong 2 bar
|
||||
>>13 default x
|
||||
>>>13 lelong x unknown %x
|
||||
|
||||
2013-03-25 13:20 Christos Zoulas <christos@zoulas.com>
|
||||
|
||||
* disallow strength setting in "name" entries
|
||||
|
||||
2013-03-06 21:24 Christos Zoulas <christos@zoulas.com>
|
||||
|
||||
* fix recursive magic separator printing
|
||||
|
||||
2013-02-26 19:28 Christos Zoulas <christos@zoulas.com>
|
||||
|
||||
* limit recursion level for mget
|
||||
* fix pread() related breakage in cdf
|
||||
* handle offsets properly in recursive "use"
|
||||
|
||||
2013-02-18 10:39 Christos Zoulas <christos@zoulas.com>
|
||||
|
||||
* add elf reading of debug info to determine if file is stripped
|
||||
(Jan Kaluza)
|
||||
* use pread()
|
||||
|
||||
2013-01-25 18:05 Christos Zoulas <christos@zoulas.com>
|
||||
|
||||
* change mime description size from 64 to 80 to accommodate OOXML.
|
||||
|
||||
2013-01-11 14:50 Christos Zoulas <christos@zoulas.com>
|
||||
|
||||
* Warn about inconsistent continuation levels.
|
||||
* Change fsmagic to add a space after it prints.
|
||||
|
||||
2013-01-10 21:00 Christos Zoulas <christos@zoulas.com>
|
||||
|
||||
* Make getline public so that file can link against it.
|
||||
Perhaps it is better to rename it, or hide it differently.
|
||||
Fixes builds on platforms that do not provide it.
|
||||
|
||||
2013-01-07 16:30 Christos Zoulas <christos@zoulas.com>
|
||||
|
||||
* Add SuS d{,1,2,4,8}, u{,1,2,4,8} and document
|
||||
what long, int, short, etc is (Guy Harris)
|
||||
|
||||
2013-01-06 11:20 Christos Zoulas <christos@zoulas.com>
|
||||
|
||||
* add magic_version function and constant
|
||||
* Redo memory allocation and de-allocation.
|
||||
(prevents double frees on non mmap platforms)
|
||||
* Fix bug with name/use having to do with passing
|
||||
found state from the parent to the child and back.
|
||||
|
||||
2012-12-19 8:47 Christos Zoulas <christos@zoulas.com>
|
||||
|
||||
* Only print elf capabilities for archs we know (Jan Kaluza)
|
||||
|
||||
2012-10-30 19:14 Christos Zoulas <christos@zoulas.com>
|
||||
|
||||
* Add "name" and "use" file types in order to look
|
||||
inside mach-o files.
|
||||
|
||||
2012-09-06 10:40 Christos Zoulas <christos@zoulas.com>
|
||||
|
||||
* make --version exit 0 (Matthew Schultz)
|
||||
* add string/T (Jan Kaluza)
|
||||
|
||||
2012-08-09 2:15 Christos Zoulas <christos@zoulas.com>
|
||||
|
||||
* add z and t modifiers for our own vasprintf
|
||||
* search for $HOME/.magic.mgc if it is there first
|
||||
* fix reads from a pipe, and preserve errno
|
||||
|
||||
2012-05-15 13:12 Christos Zoulas <christos@zoulas.com>
|
||||
|
||||
* use ctime_r, asctime_r
|
||||
|
||||
2012-04-06 17:18 Christos Zoulas <christos@zoulas.com>
|
||||
|
||||
* Fixes for indirect offsets to handle apple disk formats
|
||||
|
||||
2012-04-03 18:26 Christos Zoulas <christos@zoulas.com>
|
||||
|
||||
* Add windows date field types
|
||||
* More info for windows shortcuts (incomplete)
|
||||
|
||||
2012-02-20 17:33 Christos Zoulas <christos@zoulas.com>
|
||||
|
||||
* Fix CDF parsing issues found by CERT's fuzzing tool (Will Dormann)
|
||||
@ -851,7 +1093,7 @@
|
||||
|
||||
* Identify gnu tar vs. posix tar
|
||||
|
||||
* When keep going, don't print spurious newlines (Radek Vokál)
|
||||
* When keep going, don't print spurious newlines (Radek Vokal)
|
||||
|
||||
2006-04-01 12:02 Christos Zoulas <christos@astron.com>
|
||||
|
||||
@ -875,7 +1117,7 @@
|
||||
2005-10-31 8:54 Christos Zoulas <christos@astron.com>
|
||||
|
||||
* Fix regression where the core info was not completely processed
|
||||
(Radek Vokál)
|
||||
(Radek Vokal)
|
||||
|
||||
2005-10-20 11:15 Christos Zoulas <christos@astron.com>
|
||||
|
||||
@ -892,7 +1134,7 @@
|
||||
2005-09-20 13:33 Christos Zoulas <christos@astron.com>
|
||||
|
||||
* Don't print SVR4 Style in core files multiple times
|
||||
(Radek Vokál)
|
||||
(Radek Vokal)
|
||||
|
||||
2005-08-27 04:09 Christos Zoulas <christos@astron.com>
|
||||
|
||||
|
@ -1,14 +0,0 @@
|
||||
#------------------------------------------------------------------------------
|
||||
# $File: assembler,v 1.1 2011/12/08 12:12:46 rrt Exp $
|
||||
# make: file(1) magic for assembler source
|
||||
#
|
||||
0 regex \^\.asciiz\? assembler source text
|
||||
!:mime text/x-asm
|
||||
0 regex \^\.byte assembler source text
|
||||
!:mime text/x-asm
|
||||
0 regex \^\.even assembler source text
|
||||
!:mime text/x-asm
|
||||
0 regex \^\.globl assembler source text
|
||||
!:mime text/x-asm
|
||||
0 regex \^\.text assembler source text
|
||||
!:mime text/x-asm
|
@ -1,40 +0,0 @@
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# $File: cafebabe,v 1.8 2009/09/19 16:28:08 christos Exp $
|
||||
# Cafe Babes unite!
|
||||
#
|
||||
# Since Java bytecode and Mach-O fat-files have the same magic number, the test
|
||||
# must be performed in the same "magic" sequence to get both right. The long
|
||||
# at offset 4 in a mach-O fat file tells the number of architectures; the short at
|
||||
# offset 4 in a Java bytecode file is the JVM minor version and the
|
||||
# short at offset 6 is the JVM major version. Since there are only
|
||||
# only 18 labeled Mach-O architectures at current, and the first released
|
||||
# Java class format was version 43.0, we can safely choose any number
|
||||
# between 18 and 39 to test the number of architectures against
|
||||
# (and use as a hack). Let's not use 18, because the Mach-O people
|
||||
# might add another one or two as time goes by...
|
||||
#
|
||||
0 belong 0xcafebabe
|
||||
!:mime application/x-java-applet
|
||||
>4 belong >30 compiled Java class data,
|
||||
>>6 beshort x version %d.
|
||||
>>4 beshort x \b%d
|
||||
# Which is which?
|
||||
#>>4 belong 0x032d (Java 1.0)
|
||||
#>>4 belong 0x032d (Java 1.1)
|
||||
>>4 belong 0x002e (Java 1.2)
|
||||
>>4 belong 0x002f (Java 1.3)
|
||||
>>4 belong 0x0030 (Java 1.4)
|
||||
>>4 belong 0x0031 (Java 1.5)
|
||||
>>4 belong 0x0032 (Java 1.6)
|
||||
|
||||
|
||||
0 belong 0xcafebabe
|
||||
>4 belong 1 Mach-O fat file with 1 architecture
|
||||
>4 belong >1
|
||||
>>4 belong <20 Mach-O fat file with %ld architectures
|
||||
|
||||
0 belong 0xcafed00d JAR compressed with pack200,
|
||||
>>5 byte x version %d.
|
||||
>>4 byte x \b%d
|
||||
!:mime application/x-java-pack200
|
295
Magdir/database
295
Magdir/database
@ -1,295 +0,0 @@
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# $File: database,v 1.28 2011/09/16 19:40:40 christos Exp $
|
||||
# database: file(1) magic for various databases
|
||||
#
|
||||
# extracted from header/code files by Graeme Wilford (eep2gw@ee.surrey.ac.uk)
|
||||
#
|
||||
#
|
||||
# GDBM magic numbers
|
||||
# Will be maintained as part of the GDBM distribution in the future.
|
||||
# <downsj@teeny.org>
|
||||
0 belong 0x13579ace GNU dbm 1.x or ndbm database, big endian
|
||||
!:mime application/x-gdbm
|
||||
0 lelong 0x13579ace GNU dbm 1.x or ndbm database, little endian
|
||||
!:mime application/x-gdbm
|
||||
0 string GDBM GNU dbm 2.x database
|
||||
!:mime application/x-gdbm
|
||||
#
|
||||
# Berkeley DB
|
||||
#
|
||||
# Ian Darwin's file /etc/magic files: big/little-endian version.
|
||||
#
|
||||
# Hash 1.85/1.86 databases store metadata in network byte order.
|
||||
# Btree 1.85/1.86 databases store the metadata in host byte order.
|
||||
# Hash and Btree 2.X and later databases store the metadata in host byte order.
|
||||
|
||||
0 long 0x00061561 Berkeley DB
|
||||
!:mime application/x-dbm
|
||||
>8 belong 4321
|
||||
>>4 belong >2 1.86
|
||||
>>4 belong <3 1.85
|
||||
>>4 belong >0 (Hash, version %d, native byte-order)
|
||||
>8 belong 1234
|
||||
>>4 belong >2 1.86
|
||||
>>4 belong <3 1.85
|
||||
>>4 belong >0 (Hash, version %d, little-endian)
|
||||
|
||||
0 belong 0x00061561 Berkeley DB
|
||||
>8 belong 4321
|
||||
>>4 belong >2 1.86
|
||||
>>4 belong <3 1.85
|
||||
>>4 belong >0 (Hash, version %d, big-endian)
|
||||
>8 belong 1234
|
||||
>>4 belong >2 1.86
|
||||
>>4 belong <3 1.85
|
||||
>>4 belong >0 (Hash, version %d, native byte-order)
|
||||
|
||||
0 long 0x00053162 Berkeley DB 1.85/1.86
|
||||
>4 long >0 (Btree, version %d, native byte-order)
|
||||
0 belong 0x00053162 Berkeley DB 1.85/1.86
|
||||
>4 belong >0 (Btree, version %d, big-endian)
|
||||
0 lelong 0x00053162 Berkeley DB 1.85/1.86
|
||||
>4 lelong >0 (Btree, version %d, little-endian)
|
||||
|
||||
12 long 0x00061561 Berkeley DB
|
||||
>16 long >0 (Hash, version %d, native byte-order)
|
||||
12 belong 0x00061561 Berkeley DB
|
||||
>16 belong >0 (Hash, version %d, big-endian)
|
||||
12 lelong 0x00061561 Berkeley DB
|
||||
>16 lelong >0 (Hash, version %d, little-endian)
|
||||
|
||||
12 long 0x00053162 Berkeley DB
|
||||
>16 long >0 (Btree, version %d, native byte-order)
|
||||
12 belong 0x00053162 Berkeley DB
|
||||
>16 belong >0 (Btree, version %d, big-endian)
|
||||
12 lelong 0x00053162 Berkeley DB
|
||||
>16 lelong >0 (Btree, version %d, little-endian)
|
||||
|
||||
12 long 0x00042253 Berkeley DB
|
||||
>16 long >0 (Queue, version %d, native byte-order)
|
||||
12 belong 0x00042253 Berkeley DB
|
||||
>16 belong >0 (Queue, version %d, big-endian)
|
||||
12 lelong 0x00042253 Berkeley DB
|
||||
>16 lelong >0 (Queue, version %d, little-endian)
|
||||
|
||||
# From Max Bowsher.
|
||||
12 long 0x00040988 Berkeley DB
|
||||
>16 long >0 (Log, version %d, native byte-order)
|
||||
12 belong 0x00040988 Berkeley DB
|
||||
>16 belong >0 (Log, version %d, big-endian)
|
||||
12 lelong 0x00040988 Berkeley DB
|
||||
>16 lelong >0 (Log, version %d, little-endian)
|
||||
|
||||
#
|
||||
#
|
||||
# Round Robin Database Tool by Tobias Oetiker <oetiker@ee.ethz.ch>
|
||||
0 string RRD RRDTool DB
|
||||
>4 string x version %s
|
||||
#----------------------------------------------------------------------
|
||||
# ROOT: file(1) magic for ROOT databases
|
||||
#
|
||||
0 string root\0 ROOT file
|
||||
>4 belong x Version %d
|
||||
>33 belong x (Compression: %d)
|
||||
|
||||
# XXX: Weak magic.
|
||||
# Alex Ott <ott@jet.msk.su>
|
||||
## Paradox file formats
|
||||
#2 leshort 0x0800 Paradox
|
||||
#>0x39 byte 3 v. 3.0
|
||||
#>0x39 byte 4 v. 3.5
|
||||
#>0x39 byte 9 v. 4.x
|
||||
#>0x39 byte 10 v. 5.x
|
||||
#>0x39 byte 11 v. 5.x
|
||||
#>0x39 byte 12 v. 7.x
|
||||
#>>0x04 byte 0 indexed .DB data file
|
||||
#>>0x04 byte 1 primary index .PX file
|
||||
#>>0x04 byte 2 non-indexed .DB data file
|
||||
#>>0x04 byte 3 non-incrementing secondary index .Xnn file
|
||||
#>>0x04 byte 4 secondary index .Ynn file
|
||||
#>>0x04 byte 5 incrementing secondary index .Xnn file
|
||||
#>>0x04 byte 6 non-incrementing secondary index .XGn file
|
||||
#>>0x04 byte 7 secondary index .YGn file
|
||||
#>>>0x04 byte 8 incrementing secondary index .XGn file
|
||||
|
||||
## XBase database files
|
||||
#0 byte 0x02
|
||||
#>8 leshort >0
|
||||
#>>12 leshort 0 FoxBase
|
||||
#!:mime application/x-dbf
|
||||
#>>>0x04 lelong 0 (no records)
|
||||
#>>>0x04 lelong >0 (%ld records)
|
||||
#
|
||||
#0 byte 0x03
|
||||
#!:mime application/x-dbf
|
||||
#>8 leshort >0
|
||||
#>>12 leshort 0 FoxBase+, FoxPro, dBaseIII+, dBaseIV, no memo
|
||||
#>>>0x04 lelong 0 (no records)
|
||||
#>>>0x04 lelong >0 (%ld records)
|
||||
#
|
||||
#0 byte 0x04
|
||||
#!:mime application/x-dbf
|
||||
#>8 leshort >0
|
||||
#>>12 leshort 0 dBASE IV no memo file
|
||||
#>>>0x04 lelong 0 (no records)
|
||||
#>>>0x04 lelong >0 (%ld records)
|
||||
#
|
||||
#0 byte 0x05
|
||||
#!:mime application/x-dbf
|
||||
#>8 leshort >0
|
||||
#>>12 leshort 0 dBASE V no memo file
|
||||
#>>>0x04 lelong 0 (no records)
|
||||
#>>>0x04 lelong >0 (%ld records)
|
||||
#
|
||||
#0 byte 0x30
|
||||
#!:mime application/x-dbf
|
||||
#>8 leshort >0
|
||||
#>>12 leshort 0 Visual FoxPro
|
||||
#>>>0x04 lelong 0 (no records)
|
||||
#>>>0x04 lelong >0 (%ld records)
|
||||
#
|
||||
#0 byte 0x43
|
||||
#!:mime application/x-dbf
|
||||
#>8 leshort >0
|
||||
#>>12 leshort 0 FlagShip with memo var size
|
||||
#>>>0x04 lelong 0 (no records)
|
||||
#>>>0x04 lelong >0 (%ld records)
|
||||
#
|
||||
#0 byte 0x7b
|
||||
#!:mime application/x-dbf
|
||||
#>8 leshort >0
|
||||
#>>12 leshort 0 dBASEIV with memo
|
||||
#>>>0x04 lelong 0 (no records)
|
||||
#>>>0x04 lelong >0 (%ld records)
|
||||
#
|
||||
#0 byte 0x83
|
||||
#!:mime application/x-dbf
|
||||
#>8 leshort >0
|
||||
#>>12 leshort 0 FoxBase+, dBaseIII+ with memo
|
||||
#>>>0x04 lelong 0 (no records)
|
||||
#>>>0x04 lelong >0 (%ld records)
|
||||
#
|
||||
#0 byte 0x8b
|
||||
#!:mime application/x-dbf
|
||||
#>8 leshort >0
|
||||
#>>12 leshort 0 dBaseIV with memo
|
||||
#>>>0x04 lelong 0 (no records)
|
||||
#>>>0x04 lelong >0 (%ld records)
|
||||
#
|
||||
#0 byte 0x8e
|
||||
#!:mime application/x-dbf
|
||||
#>8 leshort >0
|
||||
#>>12 leshort 0 dBaseIV with SQL Table
|
||||
#>>>0x04 lelong 0 (no records)
|
||||
#>>>0x04 lelong >0 (%ld records)
|
||||
#
|
||||
#0 byte 0xb3
|
||||
#!:mime application/x-dbf
|
||||
#>8 leshort >0
|
||||
#>>12 leshort 0 FlagShip with .dbt memo
|
||||
#>>>0x04 lelong 0 (no records)
|
||||
#>>>0x04 lelong >0 (%ld records)
|
||||
#
|
||||
#0 byte 0xf5
|
||||
#!:mime application/x-dbf
|
||||
#>8 leshort >0
|
||||
#>>12 leshort 0 FoxPro with memo
|
||||
#>>>0x04 lelong 0 (no records)
|
||||
#>>>0x04 lelong >0 (%ld records)
|
||||
#
|
||||
#0 leshort 0x0006 DBase 3 index file
|
||||
|
||||
# MS Access database
|
||||
4 string Standard\ Jet\ DB Microsoft Access Database
|
||||
!:mime application/x-msaccess
|
||||
|
||||
# TDB database from Samba et al - Martin Pool <mbp@samba.org>
|
||||
0 string TDB\ file TDB database
|
||||
>32 lelong 0x2601196D version 6, little-endian
|
||||
>>36 lelong x hash size %d bytes
|
||||
|
||||
# SE Linux policy database
|
||||
0 lelong 0xf97cff8c SE Linux policy
|
||||
>16 lelong x v%d
|
||||
>20 lelong 1 MLS
|
||||
>24 lelong x %d symbols
|
||||
>28 lelong x %d ocons
|
||||
|
||||
# ICE authority file data (Wolfram Kleff)
|
||||
2 string ICE ICE authority data
|
||||
|
||||
# X11 Xauthority file (Wolfram Kleff)
|
||||
10 string MIT-MAGIC-COOKIE-1 X11 Xauthority data
|
||||
11 string MIT-MAGIC-COOKIE-1 X11 Xauthority data
|
||||
12 string MIT-MAGIC-COOKIE-1 X11 Xauthority data
|
||||
13 string MIT-MAGIC-COOKIE-1 X11 Xauthority data
|
||||
14 string MIT-MAGIC-COOKIE-1 X11 Xauthority data
|
||||
15 string MIT-MAGIC-COOKIE-1 X11 Xauthority data
|
||||
16 string MIT-MAGIC-COOKIE-1 X11 Xauthority data
|
||||
17 string MIT-MAGIC-COOKIE-1 X11 Xauthority data
|
||||
18 string MIT-MAGIC-COOKIE-1 X11 Xauthority data
|
||||
|
||||
# From: Maxime Henrion <mux@FreeBSD.org>
|
||||
# PostgreSQL's custom dump format, Maxime Henrion <mux@FreeBSD.org>
|
||||
0 string PGDMP PostgreSQL custom database dump
|
||||
>5 byte x - v%d
|
||||
>6 byte x \b.%d
|
||||
>5 beshort <0x101 \b-0
|
||||
>5 beshort >0x100
|
||||
>>7 byte x \b-%d
|
||||
|
||||
# Type: Advanced Data Format (ADF) database
|
||||
# URL: http://www.grc.nasa.gov/WWW/cgns/adf/
|
||||
# From: Nicolas Chauvat <nicolas.chauvat@logilab.fr>
|
||||
0 string @(#)ADF\ Database CGNS Advanced Data Format
|
||||
|
||||
# Tokyo Cabinet magic data
|
||||
# http://tokyocabinet.sourceforge.net/index.html
|
||||
0 string ToKyO\ CaBiNeT\n Tokyo Cabinet
|
||||
>14 string x \b (%s)
|
||||
>32 byte 0 \b, Hash
|
||||
!:mime application/x-tokyocabinet-hash
|
||||
>32 byte 1 \b, B+ tree
|
||||
!:mime application/x-tokyocabinet-btree
|
||||
>32 byte 2 \b, Fixed-length
|
||||
!:mime application/x-tokyocabinet-fixed
|
||||
>32 byte 3 \b, Table
|
||||
!:mime application/x-tokyocabinet-table
|
||||
>33 byte &1 \b, [open]
|
||||
>33 byte &2 \b, [fatal]
|
||||
>34 byte x \b, apow=%d
|
||||
>35 byte x \b, fpow=%d
|
||||
>36 byte &0x01 \b, [large]
|
||||
>36 byte &0x02 \b, [deflate]
|
||||
>36 byte &0x04 \b, [bzip]
|
||||
>36 byte &0x08 \b, [tcbs]
|
||||
>36 byte &0x10 \b, [excodec]
|
||||
>40 lequad x \b, bnum=%lld
|
||||
>48 lequad x \b, rnum=%lld
|
||||
>56 lequad x \b, fsiz=%lld
|
||||
|
||||
# G-IR database made by gobject-introspect toolset,
|
||||
# http://live.gnome.org/GObjectIntrospection
|
||||
0 string GOBJ\nMETADATA\r\n\032 G-IR binary database
|
||||
>16 byte x \b, v%d
|
||||
>17 byte x \b.%d
|
||||
>20 leshort x \b, %d entries
|
||||
>22 leshort x \b/%d local
|
||||
|
||||
# Type: QDBM Quick Database Manager
|
||||
# From: Benoit Sibaud <bsibaud@april.org>
|
||||
0 string \\[depot\\]\n\f Quick Database Manager, little endian
|
||||
0 string \\[DEPOT\\]\n\f Quick Database Manager, big endian
|
||||
|
||||
# Type: TokyoCabinet database
|
||||
# URL: http://tokyocabinet.sourceforge.net/
|
||||
# From: Benoit Sibaud <bsibaud@april.org>
|
||||
0 string ToKyO\ CaBiNeT\n TokyoCabinet database
|
||||
>14 string x (version %s)
|
||||
|
||||
# From: Stéphane Blondon http://www.yaal.fr
|
||||
# Database file for Zope (done by FileStorage)
|
||||
0 string FS21 Zope Object Database File Storage (data)
|
||||
# Cache file for the database of Zope (done by ClientStorage)
|
||||
0 string ZEC3 Zope Object Database Client Cache File (data)
|
60
Magdir/dolby
60
Magdir/dolby
@ -1,60 +0,0 @@
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# $File: dolby,v 1.5 2009/09/19 16:28:08 christos Exp $
|
||||
# ATSC A/53 aka AC-3 aka Dolby Digital <ashitaka@gmx.at>
|
||||
# from http://www.atsc.org/standards/a_52a.pdf
|
||||
# corrections, additions, etc. are always welcome!
|
||||
#
|
||||
# syncword
|
||||
0 beshort 0x0b77 ATSC A/52 aka AC-3 aka Dolby Digital stream,
|
||||
# fscod
|
||||
>4 byte&0xc0 0x00 48 kHz,
|
||||
>4 byte&0xc0 0x40 44.1 kHz,
|
||||
>4 byte&0xc0 0x80 32 kHz,
|
||||
# is this one used for 96 kHz?
|
||||
>4 byte&0xc0 0xc0 reserved frequency,
|
||||
#
|
||||
>5 byte&7 = 0 \b, complete main (CM)
|
||||
>5 byte&7 = 1 \b, music and effects (ME)
|
||||
>5 byte&7 = 2 \b, visually impaired (VI)
|
||||
>5 byte&7 = 3 \b, hearing impaired (HI)
|
||||
>5 byte&7 = 4 \b, dialogue (D)
|
||||
>5 byte&7 = 5 \b, commentary (C)
|
||||
>5 byte&7 = 6 \b, emergency (E)
|
||||
# acmod
|
||||
>6 byte&0xe0 0x00 1+1 front,
|
||||
>6 byte&0xe0 0x20 1 front/0 rear,
|
||||
>6 byte&0xe0 0x40 2 front/0 rear,
|
||||
>6 byte&0xe0 0x60 3 front/0 rear,
|
||||
>6 byte&0xe0 0x80 2 front/1 rear,
|
||||
>6 byte&0xe0 0xa0 3 front/1 rear,
|
||||
>6 byte&0xe0 0xc0 2 front/2 rear,
|
||||
>6 byte&0xe0 0xe0 3 front/2 rear,
|
||||
# lfeon (these may be incorrect)
|
||||
>7 byte&0x40 0x00 LFE off,
|
||||
>7 byte&0x40 0x40 LFE on,
|
||||
#
|
||||
>4 byte&0x3e = 0x00 \b, 32 kbit/s
|
||||
>4 byte&0x3e = 0x02 \b, 40 kbit/s
|
||||
>4 byte&0x3e = 0x04 \b, 48 kbit/s
|
||||
>4 byte&0x3e = 0x06 \b, 56 kbit/s
|
||||
>4 byte&0x3e = 0x08 \b, 64 kbit/s
|
||||
>4 byte&0x3e = 0x0a \b, 80 kbit/s
|
||||
>4 byte&0x3e = 0x0c \b, 96 kbit/s
|
||||
>4 byte&0x3e = 0x0e \b, 112 kbit/s
|
||||
>4 byte&0x3e = 0x10 \b, 128 kbit/s
|
||||
>4 byte&0x3e = 0x12 \b, 160 kbit/s
|
||||
>4 byte&0x3e = 0x14 \b, 192 kbit/s
|
||||
>4 byte&0x3e = 0x16 \b, 224 kbit/s
|
||||
>4 byte&0x3e = 0x18 \b, 256 kbit/s
|
||||
>4 byte&0x3e = 0x1a \b, 320 kbit/s
|
||||
>4 byte&0x3e = 0x1c \b, 384 kbit/s
|
||||
>4 byte&0x3e = 0x1e \b, 448 kbit/s
|
||||
>4 byte&0x3e = 0x20 \b, 512 kbit/s
|
||||
>4 byte&0x3e = 0x22 \b, 576 kbit/s
|
||||
>4 byte&0x3e = 0x24 \b, 640 kbit/s
|
||||
# dsurmod (these may be incorrect)
|
||||
>6 beshort&0x0180 0x0000 Dolby Surround not indicated
|
||||
>6 beshort&0x0180 0x0080 not Dolby Surround encoded
|
||||
>6 beshort&0x0180 0x0100 Dolby Surround encoded
|
||||
>6 beshort&0x0180 0x0180 reserved Dolby Surround mode
|
@ -1,46 +0,0 @@
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# $File: dyadic,v 1.5 2010/09/20 18:55:20 rrt Exp $
|
||||
# Dyadic: file(1) magic for Dyalog APL.
|
||||
#
|
||||
0 byte 0xaa
|
||||
>1 byte <4 Dyalog APL
|
||||
>>1 byte 0x00 incomplete workspace
|
||||
>>1 byte 0x01 component file
|
||||
>>1 byte 0x02 external variable
|
||||
>>1 byte 0x03 workspace
|
||||
>>2 byte x version %d
|
||||
>>3 byte x .%d
|
||||
|
||||
0 beshort 0xaa03 Dyalog APL
|
||||
>2 byte x workspace type %d
|
||||
>3 byte x subtype %d
|
||||
>7 byte&0x28 0x00 32-bit
|
||||
>7 byte&0x28 0x20 64-bit
|
||||
>7 byte&0x0c 0x00 classic
|
||||
>7 byte&0x0c 0x04 unicode
|
||||
>7 byte&0x88 0x00 big-endian
|
||||
>7 byte&0x88 0x80 little-endian
|
||||
|
||||
0 byte 0xaa Dyalog APL
|
||||
>1 byte 0x00 aplcore
|
||||
>1 byte 0x01 component file 32-bit non-journaled non-checksummed
|
||||
>1 byte 0x02 external variable exclusive
|
||||
>1 byte 0x06 external variable shared
|
||||
>1 byte 0x07 session
|
||||
>1 byte 0x08 mapped file 32-bit
|
||||
>1 byte 0x09 component file 64-bit non-journaled non-checksummed
|
||||
>1 byte 0x0a mapped file 64-bit
|
||||
>1 byte 0x0b component file 32-bit level 1 journaled non-checksummed
|
||||
>1 byte 0x0c component file 64-bit level 1 journaled non-checksummed
|
||||
>1 byte 0x0d component file 32-bit level 1 journaled checksummed
|
||||
>1 byte 0x0e component file 64-bit level 1 journaled checksummed
|
||||
>1 byte 0x0f component file 32-bit level 2 journaled checksummed
|
||||
>1 byte 0x10 component file 64-bit level 2 journaled checksummed
|
||||
>1 byte 0x11 component file 32-bit level 3 journaled checksummed
|
||||
>1 byte 0x12 component file 64-bit level 3 journaled checksummed
|
||||
>1 byte 0x13 component file 32-bit non-journaled checksummed
|
||||
>1 byte 0x14 component file 64-bit non-journaled checksummed
|
||||
>1 byte 0x80 DDB
|
||||
|
||||
0 short 0x6060 Dyalog APL transfer
|
295
Magdir/elf
295
Magdir/elf
@ -1,295 +0,0 @@
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# $File: elf,v 1.54 2011/12/17 17:16:29 christos Exp $
|
||||
# elf: file(1) magic for ELF executables
|
||||
#
|
||||
# We have to check the byte order flag to see what byte order all the
|
||||
# other stuff in the header is in.
|
||||
#
|
||||
# What're the correct byte orders for the nCUBE and the Fujitsu VPP500?
|
||||
#
|
||||
# Created by: unknown
|
||||
# Modified by (1): Daniel Quinlan <quinlan@yggdrasil.com>
|
||||
# Modified by (2): Peter Tobias <tobias@server.et-inf.fho-emden.de> (core support)
|
||||
# Modified by (3): Christian 'Dr. Disk' Hechelmann <drdisk@ds9.au.s.shuttle.de> (fix of core support)
|
||||
# Modified by (4): <gerardo.cacciari@gmail.com> (VMS Itanium)
|
||||
# Modified by (5): Matthias Urlichs <smurf@debian.org> (Listing of many architectures)
|
||||
0 string \177ELF ELF
|
||||
>4 byte 0 invalid class
|
||||
>4 byte 1 32-bit
|
||||
>4 byte 2 64-bit
|
||||
>5 byte 0 invalid byte order
|
||||
>5 byte 1 LSB
|
||||
>>16 leshort 0 no file type,
|
||||
!:strength *2
|
||||
!:mime application/octet-stream
|
||||
>>16 leshort 1 relocatable,
|
||||
!:mime application/x-object
|
||||
>>16 leshort 2 executable,
|
||||
!:mime application/x-executable
|
||||
>>16 leshort 3 shared object,
|
||||
!:mime application/x-sharedlib
|
||||
>>16 leshort 4 core file
|
||||
!:mime application/x-coredump
|
||||
# Core file detection is not reliable.
|
||||
#>>>(0x38+0xcc) string >\0 of '%s'
|
||||
#>>>(0x38+0x10) lelong >0 (signal %d),
|
||||
>>16 leshort &0xff00 processor-specific,
|
||||
>>18 leshort 0 no machine,
|
||||
>>18 leshort 1 AT&T WE32100 - invalid byte order,
|
||||
>>18 leshort 2 SPARC - invalid byte order,
|
||||
>>18 leshort 3 Intel 80386,
|
||||
>>18 leshort 4 Motorola
|
||||
>>>36 lelong &0x01000000 68000 - invalid byte order,
|
||||
>>>36 lelong &0x00810000 CPU32 - invalid byte order,
|
||||
>>>36 lelong 0 68020 - invalid byte order,
|
||||
>>18 leshort 5 Motorola 88000 - invalid byte order,
|
||||
>>18 leshort 6 Intel 80486,
|
||||
>>18 leshort 7 Intel 80860,
|
||||
# The official e_machine number for MIPS is now #8, regardless of endianness.
|
||||
# The second number (#10) will be deprecated later. For now, we still
|
||||
# say something if #10 is encountered, but only gory details for #8.
|
||||
>>18 leshort 8 MIPS,
|
||||
>>>36 lelong &0x20 N32
|
||||
>>18 leshort 10 MIPS,
|
||||
>>>36 lelong &0x20 N32
|
||||
>>18 leshort 8
|
||||
# only for 32-bit
|
||||
>>>4 byte 1
|
||||
>>>>36 lelong&0xf0000000 0x00000000 MIPS-I
|
||||
>>>>36 lelong&0xf0000000 0x10000000 MIPS-II
|
||||
>>>>36 lelong&0xf0000000 0x20000000 MIPS-III
|
||||
>>>>36 lelong&0xf0000000 0x30000000 MIPS-IV
|
||||
>>>>36 lelong&0xf0000000 0x40000000 MIPS-V
|
||||
>>>>36 lelong&0xf0000000 0x50000000 MIPS32
|
||||
>>>>36 lelong&0xf0000000 0x60000000 MIPS64
|
||||
>>>>36 lelong&0xf0000000 0x70000000 MIPS32 rel2
|
||||
>>>>36 lelong&0xf0000000 0x80000000 MIPS64 rel2
|
||||
# only for 64-bit
|
||||
>>>4 byte 2
|
||||
>>>>48 lelong&0xf0000000 0x00000000 MIPS-I
|
||||
>>>>48 lelong&0xf0000000 0x10000000 MIPS-II
|
||||
>>>>48 lelong&0xf0000000 0x20000000 MIPS-III
|
||||
>>>>48 lelong&0xf0000000 0x30000000 MIPS-IV
|
||||
>>>>48 lelong&0xf0000000 0x40000000 MIPS-V
|
||||
>>>>48 lelong&0xf0000000 0x50000000 MIPS32
|
||||
>>>>48 lelong&0xf0000000 0x60000000 MIPS64
|
||||
>>>>48 lelong&0xf0000000 0x70000000 MIPS32 rel2
|
||||
>>>>48 lelong&0xf0000000 0x80000000 MIPS64 rel2
|
||||
>>18 leshort 9 Amdahl - invalid byte order,
|
||||
>>18 leshort 10 MIPS (deprecated),
|
||||
>>18 leshort 11 RS6000 - invalid byte order,
|
||||
>>18 leshort 15 PA-RISC - invalid byte order,
|
||||
>>>50 leshort 0x0214 2.0
|
||||
>>>48 leshort &0x0008 (LP64),
|
||||
>>18 leshort 16 nCUBE,
|
||||
>>18 leshort 17 Fujitsu VPP500,
|
||||
>>18 leshort 18 SPARC32PLUS - invalid byte order,
|
||||
>>18 leshort 20 PowerPC,
|
||||
>>18 leshort 22 IBM S/390,
|
||||
>>18 leshort 36 NEC V800,
|
||||
>>18 leshort 37 Fujitsu FR20,
|
||||
>>18 leshort 38 TRW RH-32,
|
||||
>>18 leshort 39 Motorola RCE,
|
||||
>>18 leshort 40 ARM,
|
||||
>>18 leshort 41 Alpha,
|
||||
>>18 leshort 0xa390 IBM S/390 (obsolete),
|
||||
>>18 leshort 42 Renesas SH,
|
||||
>>18 leshort 43 SPARC V9 - invalid byte order,
|
||||
>>18 leshort 44 Siemens Tricore Embedded Processor,
|
||||
>>18 leshort 45 Argonaut RISC Core, Argonaut Technologies Inc.,
|
||||
>>18 leshort 46 Renesas H8/300,
|
||||
>>18 leshort 47 Renesas H8/300H,
|
||||
>>18 leshort 48 Renesas H8S,
|
||||
>>18 leshort 49 Renesas H8/500,
|
||||
>>18 leshort 50 IA-64,
|
||||
>>18 leshort 51 Stanford MIPS-X,
|
||||
>>18 leshort 52 Motorola Coldfire,
|
||||
>>18 leshort 53 Motorola M68HC12,
|
||||
>>18 leshort 54 Fujitsu MMA,
|
||||
>>18 leshort 55 Siemens PCP,
|
||||
>>18 leshort 56 Sony nCPU,
|
||||
>>18 leshort 57 Denso NDR1,
|
||||
>>18 leshort 58 Start*Core,
|
||||
>>18 leshort 59 Toyota ME16,
|
||||
>>18 leshort 60 ST100,
|
||||
>>18 leshort 61 Tinyj emb.,
|
||||
>>18 leshort 62 x86-64,
|
||||
>>18 leshort 63 Sony DSP,
|
||||
>>18 leshort 66 FX66,
|
||||
>>18 leshort 67 ST9+ 8/16 bit,
|
||||
>>18 leshort 68 ST7 8 bit,
|
||||
>>18 leshort 69 MC68HC16,
|
||||
>>18 leshort 70 MC68HC11,
|
||||
>>18 leshort 71 MC68HC08,
|
||||
>>18 leshort 72 MC68HC05,
|
||||
>>18 leshort 73 SGI SVx,
|
||||
>>18 leshort 74 ST19 8 bit,
|
||||
>>18 leshort 75 Digital VAX,
|
||||
>>18 leshort 76 Axis cris,
|
||||
>>18 leshort 77 Infineon 32-bit embedded,
|
||||
>>18 leshort 78 Element 14 64-bit DSP,
|
||||
>>18 leshort 79 LSI Logic 16-bit DSP,
|
||||
>>18 leshort 80 MMIX,
|
||||
>>18 leshort 81 Harvard machine-independent,
|
||||
>>18 leshort 82 SiTera Prism,
|
||||
>>18 leshort 83 Atmel AVR 8-bit,
|
||||
>>18 leshort 84 Fujitsu FR30,
|
||||
>>18 leshort 85 Mitsubishi D10V,
|
||||
>>18 leshort 86 Mitsubishi D30V,
|
||||
>>18 leshort 87 NEC v850,
|
||||
>>18 leshort 88 Renesas M32R,
|
||||
>>18 leshort 89 Matsushita MN10300,
|
||||
>>18 leshort 90 Matsushita MN10200,
|
||||
>>18 leshort 91 picoJava,
|
||||
>>18 leshort 92 OpenRISC,
|
||||
>>18 leshort 93 ARC Cores Tangent-A5,
|
||||
>>18 leshort 94 Tensilica Xtensa,
|
||||
>>18 leshort 97 NatSemi 32k,
|
||||
>>18 leshort 106 Analog Devices Blackfin,
|
||||
>>18 leshort 113 Altera Nios II,
|
||||
>>18 leshort 0xae META,
|
||||
>>18 leshort 187 Tilera TILE64,
|
||||
>>18 leshort 188 Tilera TILEPro,
|
||||
>>18 leshort 191 Tilera TILE-Gx,
|
||||
>>18 leshort 0x3426 OpenRISC (obsolete),
|
||||
>>18 leshort 0x8472 OpenRISC (obsolete),
|
||||
>>18 leshort 0x9026 Alpha (unofficial),
|
||||
>>20 lelong 0 invalid version
|
||||
>>20 lelong 1 version 1
|
||||
>>36 lelong 1 MathCoPro/FPU/MAU Required
|
||||
>5 byte 2 MSB
|
||||
>>16 beshort 0 no file type,
|
||||
!:mime application/octet-stream
|
||||
>>16 beshort 1 relocatable,
|
||||
!:mime application/x-object
|
||||
>>16 beshort 2 executable,
|
||||
!:mime application/x-executable
|
||||
>>16 beshort 3 shared object,
|
||||
!:mime application/x-sharedlib
|
||||
>>16 beshort 4 core file,
|
||||
!:mime application/x-coredump
|
||||
#>>>(0x38+0xcc) string >\0 of '%s'
|
||||
#>>>(0x38+0x10) belong >0 (signal %d),
|
||||
>>16 beshort &0xff00 processor-specific,
|
||||
>>18 beshort 0 no machine,
|
||||
>>18 beshort 1 AT&T WE32100,
|
||||
>>18 beshort 2 SPARC,
|
||||
>>18 beshort 3 Intel 80386 - invalid byte order,
|
||||
>>18 beshort 4 Motorola
|
||||
>>>36 belong &0x01000000 68000,
|
||||
>>>36 belong &0x00810000 CPU32,
|
||||
>>>36 belong 0 68020,
|
||||
>>18 beshort 5 Motorola 88000,
|
||||
>>18 beshort 6 Intel 80486 - invalid byte order,
|
||||
>>18 beshort 7 Intel 80860,
|
||||
# only for MIPS - see comment in little-endian section above.
|
||||
>>18 beshort 8 MIPS,
|
||||
>>>36 belong &0x20 N32
|
||||
>>18 beshort 10 MIPS,
|
||||
>>>36 belong &0x20 N32
|
||||
>>18 beshort 8
|
||||
# only for 32-bit
|
||||
>>>4 byte 1
|
||||
>>>>36 belong&0xf0000000 0x00000000 MIPS-I
|
||||
>>>>36 belong&0xf0000000 0x10000000 MIPS-II
|
||||
>>>>36 belong&0xf0000000 0x20000000 MIPS-III
|
||||
>>>>36 belong&0xf0000000 0x30000000 MIPS-IV
|
||||
>>>>36 belong&0xf0000000 0x40000000 MIPS-V
|
||||
>>>>36 belong&0xf0000000 0x50000000 MIPS32
|
||||
>>>>36 belong&0xf0000000 0x60000000 MIPS64
|
||||
>>>>36 belong&0xf0000000 0x70000000 MIPS32 rel2
|
||||
>>>>36 belong&0xf0000000 0x80000000 MIPS64 rel2
|
||||
# only for 64-bit
|
||||
>>>4 byte 2
|
||||
>>>>48 belong&0xf0000000 0x00000000 MIPS-I
|
||||
>>>>48 belong&0xf0000000 0x10000000 MIPS-II
|
||||
>>>>48 belong&0xf0000000 0x20000000 MIPS-III
|
||||
>>>>48 belong&0xf0000000 0x30000000 MIPS-IV
|
||||
>>>>48 belong&0xf0000000 0x40000000 MIPS-V
|
||||
>>>>48 belong&0xf0000000 0x50000000 MIPS32
|
||||
>>>>48 belong&0xf0000000 0x60000000 MIPS64
|
||||
>>>>48 belong&0xf0000000 0x70000000 MIPS32 rel2
|
||||
>>>>48 belong&0xf0000000 0x80000000 MIPS64 rel2
|
||||
>>18 beshort 9 Amdahl,
|
||||
>>18 beshort 10 MIPS (deprecated),
|
||||
>>18 beshort 11 RS6000,
|
||||
>>18 beshort 15 PA-RISC
|
||||
>>>50 beshort 0x0214 2.0
|
||||
>>>48 beshort &0x0008 (LP64)
|
||||
>>18 beshort 16 nCUBE,
|
||||
>>18 beshort 17 Fujitsu VPP500,
|
||||
>>18 beshort 18 SPARC32PLUS,
|
||||
>>>36 belong&0xffff00 0x000100 V8+ Required,
|
||||
>>>36 belong&0xffff00 0x000200 Sun UltraSPARC1 Extensions Required,
|
||||
>>>36 belong&0xffff00 0x000400 HaL R1 Extensions Required,
|
||||
>>>36 belong&0xffff00 0x000800 Sun UltraSPARC3 Extensions Required,
|
||||
>>18 beshort 20 PowerPC or cisco 4500,
|
||||
>>18 beshort 21 64-bit PowerPC or cisco 7500,
|
||||
>>18 beshort 22 IBM S/390,
|
||||
>>18 beshort 23 Cell SPU,
|
||||
>>18 beshort 24 cisco SVIP,
|
||||
>>18 beshort 25 cisco 7200,
|
||||
>>18 beshort 36 NEC V800 or cisco 12000,
|
||||
>>18 beshort 37 Fujitsu FR20,
|
||||
>>18 beshort 38 TRW RH-32,
|
||||
>>18 beshort 39 Motorola RCE,
|
||||
>>18 beshort 40 ARM,
|
||||
>>18 beshort 41 Alpha,
|
||||
>>18 beshort 42 Renesas SH,
|
||||
>>18 beshort 43 SPARC V9,
|
||||
>>>48 belong&0xffff00 0x000200 Sun UltraSPARC1 Extensions Required,
|
||||
>>>48 belong&0xffff00 0x000400 HaL R1 Extensions Required,
|
||||
>>>48 belong&0xffff00 0x000800 Sun UltraSPARC3 Extensions Required,
|
||||
>>>48 belong&0x3 0 total store ordering,
|
||||
>>>48 belong&0x3 1 partial store ordering,
|
||||
>>>48 belong&0x3 2 relaxed memory ordering,
|
||||
>>18 beshort 44 Siemens Tricore Embedded Processor,
|
||||
>>18 beshort 45 Argonaut RISC Core, Argonaut Technologies Inc.,
|
||||
>>18 beshort 46 Renesas H8/300,
|
||||
>>18 beshort 47 Renesas H8/300H,
|
||||
>>18 beshort 48 Renesas H8S,
|
||||
>>18 beshort 49 Renesas H8/500,
|
||||
>>18 beshort 50 IA-64,
|
||||
>>18 beshort 51 Stanford MIPS-X,
|
||||
>>18 beshort 52 Motorola Coldfire,
|
||||
>>18 beshort 53 Motorola M68HC12,
|
||||
>>18 beshort 73 Cray NV1,
|
||||
>>18 beshort 75 Digital VAX,
|
||||
>>18 beshort 88 Renesas M32R,
|
||||
>>18 leshort 92 OpenRISC,
|
||||
>>18 leshort 0x3426 OpenRISC (obsolete),
|
||||
>>18 leshort 0x8472 OpenRISC (obsolete),
|
||||
>>18 beshort 94 Tensilica Xtensa,
|
||||
>>18 beshort 97 NatSemi 32k,
|
||||
>>18 beshort 187 Tilera TILE64,
|
||||
>>18 beshort 188 Tilera TILEPro,
|
||||
>>18 beshort 191 Tilera TILE-Gx,
|
||||
>>18 beshort 0x18ad AVR32 (unofficial),
|
||||
>>18 beshort 0x9026 Alpha (unofficial),
|
||||
>>18 beshort 0xa390 IBM S/390 (obsolete),
|
||||
>>20 belong 0 invalid version
|
||||
>>20 belong 1 version 1
|
||||
>>36 belong 1 MathCoPro/FPU/MAU Required
|
||||
# Up to now only 0, 1 and 2 are defined; I've seen a file with 0x83, it seemed
|
||||
# like proper ELF, but extracting the string had bad results.
|
||||
>4 byte <0x80
|
||||
>>8 string >\0 (%s)
|
||||
>8 string \0
|
||||
>>7 byte 0 (SYSV)
|
||||
>>7 byte 1 (HP-UX)
|
||||
>>7 byte 2 (NetBSD)
|
||||
>>7 byte 3 (GNU/Linux)
|
||||
>>7 byte 4 (GNU/Hurd)
|
||||
>>7 byte 5 (86Open)
|
||||
>>7 byte 6 (Solaris)
|
||||
>>7 byte 7 (Monterey)
|
||||
>>7 byte 8 (IRIX)
|
||||
>>7 byte 9 (FreeBSD)
|
||||
>>7 byte 10 (Tru64)
|
||||
>>7 byte 11 (Novell Modesto)
|
||||
>>7 byte 12 (OpenBSD)
|
||||
>8 string \2
|
||||
>>7 byte 13 (OpenVMS)
|
||||
>>7 byte 97 (ARM)
|
||||
>>7 byte 255 (embedded)
|
25
Magdir/flash
25
Magdir/flash
@ -1,25 +0,0 @@
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# $File: flash,v 1.9 2009/11/08 01:30:01 christos Exp $
|
||||
# flash: file(1) magic for Macromedia Flash file format
|
||||
#
|
||||
# See
|
||||
#
|
||||
# http://www.macromedia.com/software/flash/open/
|
||||
#
|
||||
0 string FWS Macromedia Flash data,
|
||||
>3 byte x version %d
|
||||
!:mime application/x-shockwave-flash
|
||||
0 string CWS Macromedia Flash data (compressed),
|
||||
!:mime application/x-shockwave-flash
|
||||
>3 byte x version %d
|
||||
# From: Cal Peake <cp@absolutedigital.net>
|
||||
0 string FLV Macromedia Flash Video
|
||||
!:mime video/x-flv
|
||||
|
||||
#
|
||||
# Yosu Gomez
|
||||
0 string AGD2\xbe\xb8\xbb\xcd\x00 Macromedia Freehand 7 Document
|
||||
0 string AGD3\xbe\xb8\xbb\xcc\x00 Macromedia Freehand 8 Document
|
||||
# From Dave Wilson
|
||||
0 string AGD4\xbe\xb8\xbb\xcb\x00 Macromedia Freehand 9 Document
|
@ -1,26 +0,0 @@
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# $File: gnome-keyring,v 1.2 2009/09/19 16:28:09 christos Exp $
|
||||
# GNOME keyring
|
||||
# Contributed by Josh Triplett
|
||||
# FIXME: Could be simplified if pstring supported two-byte counts
|
||||
0 string GnomeKeyring\n\r\0\n GNOME keyring
|
||||
>&0 ubyte 0 \b, major version 0
|
||||
>>&0 ubyte 0 \b, minor version 0
|
||||
>>>&0 ubyte 0 \b, crypto type 0 (AEL)
|
||||
>>>&0 ubyte >0 \b, crypto type %hhu (unknown)
|
||||
>>>&1 ubyte 0 \b, hash type 0 (MD5)
|
||||
>>>&1 ubyte >0 \b, hash type %hhu (unknown)
|
||||
>>>&2 ubelong 0xFFFFFFFF \b, name NULL
|
||||
>>>&2 ubelong !0xFFFFFFFF
|
||||
>>>>&-4 ubelong >255 \b, name too long for file's pstring type
|
||||
>>>>&-4 ubelong <256
|
||||
>>>>>&-1 pstring x \b, name "%s"
|
||||
>>>>>>&0 ubeqdate x \b, last modified %s
|
||||
>>>>>>&8 ubeqdate x \b, created %s
|
||||
>>>>>>&16 ubelong &1
|
||||
>>>>>>>&0 ubelong x \b, locked if idle for %u seconds
|
||||
>>>>>>&16 ubelong ^1 \b, not locked if idle
|
||||
>>>>>>&24 ubelong x \b, hash iterations %u
|
||||
>>>>>>&28 ubequad x \b, salt %llu
|
||||
>>>>>>&52 ubelong x \b, %u item(s)
|
86
Magdir/mach
86
Magdir/mach
@ -1,86 +0,0 @@
|
||||
|
||||
#------------------------------------------------------------
|
||||
# $File: mach,v 1.9 2009/09/19 16:28:10 christos Exp $
|
||||
# Mach has two magic numbers, 0xcafebabe and 0xfeedface.
|
||||
# Unfortunately the first, cafebabe, is shared with
|
||||
# Java ByteCode, so they are both handled in the file "cafebabe".
|
||||
# The "feedface" ones are handled herein.
|
||||
#------------------------------------------------------------
|
||||
0 lelong&0xfffffffe 0xfeedface Mach-O
|
||||
>0 byte 0xcf 64-bit
|
||||
>12 lelong 1 object
|
||||
>12 lelong 2 executable
|
||||
>12 lelong 3 fixed virtual memory shared library
|
||||
>12 lelong 4 core
|
||||
>12 lelong 5 preload executable
|
||||
>12 lelong 6 dynamically linked shared library
|
||||
>12 lelong 7 dynamic linker
|
||||
>12 lelong 8 bundle
|
||||
>12 lelong 9 dynamically linked shared library stub
|
||||
>12 lelong >9
|
||||
>>12 lelong x filetype=%ld
|
||||
>4 lelong <0
|
||||
>>4 lelong x architecture=%ld
|
||||
>4 lelong 1 vax
|
||||
>4 lelong 2 romp
|
||||
>4 lelong 3 architecture=3
|
||||
>4 lelong 4 ns32032
|
||||
>4 lelong 5 ns32332
|
||||
>4 lelong 6 m68k
|
||||
>4 lelong 7 i386
|
||||
>4 lelong 8 mips
|
||||
>4 lelong 9 ns32532
|
||||
>4 lelong 10 architecture=10
|
||||
>4 lelong 11 hppa
|
||||
>4 lelong 12 acorn
|
||||
>4 lelong 13 m88k
|
||||
>4 lelong 14 sparc
|
||||
>4 lelong 15 i860-big
|
||||
>4 lelong 16 i860
|
||||
>4 lelong 17 rs6000
|
||||
>4 lelong 18 ppc
|
||||
>4 lelong 16777234 ppc64
|
||||
>4 lelong >16777234
|
||||
>>4 lelong x architecture=%ld
|
||||
#
|
||||
0 belong&0xfffffffe 0xfeedface Mach-O
|
||||
>3 byte 0xcf 64-bit
|
||||
>12 belong 1 object
|
||||
>12 belong 2 executable
|
||||
>12 belong 3 fixed virtual memory shared library
|
||||
>12 belong 4 core
|
||||
>12 belong 5 preload executable
|
||||
>12 belong 6 dynamically linked shared library
|
||||
>12 belong 7 dynamic linker
|
||||
>12 belong 8 bundle
|
||||
>12 belong 9 dynamically linked shared library stub
|
||||
>12 belong >9
|
||||
>>12 belong x filetype=%ld
|
||||
>4 belong <0
|
||||
>>4 belong x architecture=%ld
|
||||
>4 belong 1 vax
|
||||
>4 belong 2 romp
|
||||
>4 belong 3 architecture=3
|
||||
>4 belong 4 ns32032
|
||||
>4 belong 5 ns32332
|
||||
>4 belong 6 for m68k architecture
|
||||
# from NeXTstep 3.0 <mach/machine.h>
|
||||
# i.e. mc680x0_all, ignore
|
||||
# >>8 belong 1 (mc68030)
|
||||
>>8 belong 2 (mc68040)
|
||||
>>8 belong 3 (mc68030 only)
|
||||
>4 belong 7 i386
|
||||
>4 belong 8 mips
|
||||
>4 belong 9 ns32532
|
||||
>4 belong 10 architecture=10
|
||||
>4 belong 11 hppa
|
||||
>4 belong 12 acorn
|
||||
>4 belong 13 m88k
|
||||
>4 belong 14 sparc
|
||||
>4 belong 15 i860-big
|
||||
>4 belong 16 i860
|
||||
>4 belong 17 rs6000
|
||||
>4 belong 18 ppc
|
||||
>4 belong 16777234 ppc64
|
||||
>4 belong >16777234
|
||||
>>4 belong x architecture=%ld
|
182
Magdir/mips
182
Magdir/mips
@ -1,182 +0,0 @@
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# $File: mips,v 1.7 2011/05/03 01:44:17 christos Exp $
|
||||
# mips: file(1) magic for Silicon Graphics (MIPS, IRIS, IRIX, etc.)
|
||||
# Dec Ultrix (MIPS)
|
||||
# all of SGI's *current* machines and OSes run in big-endian mode on the
|
||||
# MIPS machines, as far as I know.
|
||||
#
|
||||
# XXX - what is the blank "-" line?
|
||||
#
|
||||
# kbd file definitions
|
||||
0 string kbd!map kbd map file
|
||||
>8 byte >0 Ver %d:
|
||||
>10 short >0 with %d table(s)
|
||||
0 belong 0407 old SGI 68020 executable
|
||||
0 belong 0410 old SGI 68020 pure executable
|
||||
0 beshort 0x8765 disk quotas file
|
||||
0 beshort 0x0506 IRIS Showcase file
|
||||
>2 byte 0x49 -
|
||||
>3 byte x - version %ld
|
||||
0 beshort 0x0226 IRIS Showcase template
|
||||
>2 byte 0x63 -
|
||||
>3 byte x - version %ld
|
||||
0 belong 0x5343464d IRIS Showcase file
|
||||
>4 byte x - version %ld
|
||||
0 belong 0x5443464d IRIS Showcase template
|
||||
>4 byte x - version %ld
|
||||
0 belong 0xdeadbabe IRIX Parallel Arena
|
||||
>8 belong >0 - version %ld
|
||||
#
|
||||
0 beshort 0x0160 MIPSEB ECOFF executable
|
||||
>20 beshort 0407 (impure)
|
||||
>20 beshort 0410 (swapped)
|
||||
>20 beshort 0413 (paged)
|
||||
>8 belong >0 not stripped
|
||||
>8 belong 0 stripped
|
||||
>22 byte x - version %ld
|
||||
>23 byte x \b.%ld
|
||||
#
|
||||
0 beshort 0x0162 MIPSEL-BE ECOFF executable
|
||||
>20 beshort 0407 (impure)
|
||||
>20 beshort 0410 (swapped)
|
||||
>20 beshort 0413 (paged)
|
||||
>8 belong >0 not stripped
|
||||
>8 belong 0 stripped
|
||||
>23 byte x - version %d
|
||||
>22 byte x \b.%ld
|
||||
#
|
||||
0 beshort 0x6001 MIPSEB-LE ECOFF executable
|
||||
>20 beshort 03401 (impure)
|
||||
>20 beshort 04001 (swapped)
|
||||
>20 beshort 05401 (paged)
|
||||
>8 belong >0 not stripped
|
||||
>8 belong 0 stripped
|
||||
>23 byte x - version %d
|
||||
>22 byte x \b.%ld
|
||||
#
|
||||
0 beshort 0x6201 MIPSEL ECOFF executable
|
||||
>20 beshort 03401 (impure)
|
||||
>20 beshort 04001 (swapped)
|
||||
>20 beshort 05401 (paged)
|
||||
>8 belong >0 not stripped
|
||||
>8 belong 0 stripped
|
||||
>23 byte x - version %ld
|
||||
>22 byte x \b.%ld
|
||||
#
|
||||
# MIPS 2 additions
|
||||
#
|
||||
0 beshort 0x0163 MIPSEB MIPS-II ECOFF executable
|
||||
>20 beshort 0407 (impure)
|
||||
>20 beshort 0410 (swapped)
|
||||
>20 beshort 0413 (paged)
|
||||
>8 belong >0 not stripped
|
||||
>8 belong 0 stripped
|
||||
>22 byte x - version %ld
|
||||
>23 byte x \b.%ld
|
||||
#
|
||||
0 beshort 0x0166 MIPSEL-BE MIPS-II ECOFF executable
|
||||
>20 beshort 0407 (impure)
|
||||
>20 beshort 0410 (swapped)
|
||||
>20 beshort 0413 (paged)
|
||||
>8 belong >0 not stripped
|
||||
>8 belong 0 stripped
|
||||
>22 byte x - version %ld
|
||||
>23 byte x \b.%ld
|
||||
#
|
||||
0 beshort 0x6301 MIPSEB-LE MIPS-II ECOFF executable
|
||||
>20 beshort 03401 (impure)
|
||||
>20 beshort 04001 (swapped)
|
||||
>20 beshort 05401 (paged)
|
||||
>8 belong >0 not stripped
|
||||
>8 belong 0 stripped
|
||||
>23 byte x - version %ld
|
||||
>22 byte x \b.%ld
|
||||
#
|
||||
0 beshort 0x6601 MIPSEL MIPS-II ECOFF executable
|
||||
>20 beshort 03401 (impure)
|
||||
>20 beshort 04001 (swapped)
|
||||
>20 beshort 05401 (paged)
|
||||
>8 belong >0 not stripped
|
||||
>8 belong 0 stripped
|
||||
>23 byte x - version %ld
|
||||
>22 byte x \b.%ld
|
||||
#
|
||||
# MIPS 3 additions
|
||||
#
|
||||
0 beshort 0x0140 MIPSEB MIPS-III ECOFF executable
|
||||
>20 beshort 0407 (impure)
|
||||
>20 beshort 0410 (swapped)
|
||||
>20 beshort 0413 (paged)
|
||||
>8 belong >0 not stripped
|
||||
>8 belong 0 stripped
|
||||
>22 byte x - version %ld
|
||||
>23 byte x \b.%ld
|
||||
#
|
||||
0 beshort 0x0142 MIPSEL-BE MIPS-III ECOFF executable
|
||||
>20 beshort 0407 (impure)
|
||||
>20 beshort 0410 (swapped)
|
||||
>20 beshort 0413 (paged)
|
||||
>8 belong >0 not stripped
|
||||
>8 belong 0 stripped
|
||||
>22 byte x - version %ld
|
||||
>23 byte x \b.%ld
|
||||
#
|
||||
0 beshort 0x4001 MIPSEB-LE MIPS-III ECOFF executable
|
||||
>20 beshort 03401 (impure)
|
||||
>20 beshort 04001 (swapped)
|
||||
>20 beshort 05401 (paged)
|
||||
>8 belong >0 not stripped
|
||||
>8 belong 0 stripped
|
||||
>23 byte x - version %ld
|
||||
>22 byte x \b.%ld
|
||||
#
|
||||
0 beshort 0x4201 MIPSEL MIPS-III ECOFF executable
|
||||
>20 beshort 03401 (impure)
|
||||
>20 beshort 04001 (swapped)
|
||||
>20 beshort 05401 (paged)
|
||||
>8 belong >0 not stripped
|
||||
>8 belong 0 stripped
|
||||
>23 byte x - version %ld
|
||||
>22 byte x \b.%ld
|
||||
#
|
||||
0 beshort 0x180 MIPSEB Ucode
|
||||
0 beshort 0x182 MIPSEL-BE Ucode
|
||||
# 32bit core file
|
||||
0 belong 0xdeadadb0 IRIX core dump
|
||||
>4 belong 1 of
|
||||
>16 string >\0 '%s'
|
||||
# 64bit core file
|
||||
0 belong 0xdeadad40 IRIX 64-bit core dump
|
||||
>4 belong 1 of
|
||||
>16 string >\0 '%s'
|
||||
# N32bit core file
|
||||
0 belong 0xbabec0bb IRIX N32 core dump
|
||||
>4 belong 1 of
|
||||
>16 string >\0 '%s'
|
||||
# New style crash dump file
|
||||
0 string \x43\x72\x73\x68\x44\x75\x6d\x70 IRIX vmcore dump of
|
||||
>36 string >\0 '%s'
|
||||
# Trusted IRIX info
|
||||
0 string SGIAUDIT SGI Audit file
|
||||
>8 byte x - version %d
|
||||
>9 byte x \b.%ld
|
||||
#
|
||||
0 string WNGZWZSC Wingz compiled script
|
||||
0 string WNGZWZSS Wingz spreadsheet
|
||||
0 string WNGZWZHP Wingz help file
|
||||
#
|
||||
0 string #Inventor V IRIS Inventor 1.0 file
|
||||
0 string #Inventor V2 Open Inventor 2.0 file
|
||||
# GLF is OpenGL stream encoding
|
||||
0 string glfHeadMagic(); GLF_TEXT
|
||||
4 belong 0x7d000000 GLF_BINARY_LSB_FIRST
|
||||
!:strength -30
|
||||
4 belong 0x0000007d GLF_BINARY_MSB_FIRST
|
||||
!:strength -30
|
||||
# GLS is OpenGL stream encoding; GLS is the successor of GLF
|
||||
0 string glsBeginGLS( GLS_TEXT
|
||||
4 belong 0x10000000 GLS_BINARY_LSB_FIRST
|
||||
!:strength -30
|
||||
4 belong 0x00000010 GLS_BINARY_MSB_FIRST
|
||||
!:strength -30
|
@ -1,33 +0,0 @@
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# $File: msooxml,v 1.1 2011/01/25 18:36:19 christos Exp $
|
||||
# msooxml: file(1) magic for Microsoft Office XML
|
||||
# From: Ralf Brown <ralf.brown@gmail.com>
|
||||
|
||||
# .docx, .pptx, and .xlsx are XML plus other files inside a ZIP
|
||||
# archive. The first member file is normally "[Content_Types].xml".
|
||||
# Since MSOOXML doesn't have anything like the uncompressed "mimetype"
|
||||
# file of ePub or OpenDocument, we'll have to scan for a filename
|
||||
# which can distinguish between the three types
|
||||
|
||||
# start by checking for ZIP local file header signature
|
||||
0 string PK\003\004
|
||||
# make sure the first file is correct
|
||||
>0x1E string [Content_Types].xml
|
||||
# skip to the second local file header
|
||||
# since some documents include a 520-byte extra field following the file
|
||||
# header, we need to scan for the next header
|
||||
>>(18.l+49) search/2000 PK\003\004
|
||||
# now skip to the *third* local file header; again, we need to scan due to a
|
||||
# 520-byte extra field following the file header
|
||||
>>>&26 search/1000 PK\003\004
|
||||
# and check the subdirectory name to determine which type of OOXML
|
||||
# file we have
|
||||
>>>>&26 string word/ Microsoft Word 2007+
|
||||
!:mime application/msword
|
||||
>>>>&26 string ppt/ Microsoft PowerPoint 2007+
|
||||
!:mime application/vnd.ms-powerpoint
|
||||
>>>>&26 string xl/ Microsoft Excel 2007+
|
||||
!:mime application/vnd.ms-excel
|
||||
>>>>&26 default x Microsoft OOXML
|
||||
!:strength +10
|
71
Magdir/sgi
71
Magdir/sgi
@ -1,71 +0,0 @@
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# $File: sgi,v 1.18 2010/11/25 15:00:12 christos Exp $
|
||||
# sgi: file(1) magic for Silicon Graphics applications
|
||||
|
||||
#
|
||||
#
|
||||
# Performance Co-Pilot file types
|
||||
0 string PmNs PCP compiled namespace (V.0)
|
||||
0 string PmN PCP compiled namespace
|
||||
>3 string >\0 (V.%1.1s)
|
||||
#3 lelong 0x84500526 PCP archive
|
||||
3 belong 0x84500526 PCP archive
|
||||
>7 byte x (V.%d)
|
||||
#>20 lelong -2 temporal index
|
||||
#>20 lelong -1 metadata
|
||||
#>20 lelong 0 log volume #0
|
||||
#>20 lelong >0 log volume #%ld
|
||||
>20 belong -2 temporal index
|
||||
>20 belong -1 metadata
|
||||
>20 belong 0 log volume #0
|
||||
>20 belong >0 log volume #%ld
|
||||
>24 string >\0 host: %s
|
||||
0 string PCPFolio PCP
|
||||
>9 string Version: Archive Folio
|
||||
>18 string >\0 (V.%s)
|
||||
0 string #pmchart PCP pmchart view
|
||||
>9 string Version
|
||||
>17 string >\0 (V%-3.3s)
|
||||
0 string #kmchart PCP kmchart view
|
||||
>9 string Version
|
||||
>17 string >\0 (V.%s)
|
||||
0 string pmview PCP pmview config
|
||||
>7 string Version
|
||||
>15 string >\0 (V%-3.3s)
|
||||
0 string #pmlogger PCP pmlogger config
|
||||
>10 string Version
|
||||
>18 string >\0 (V%1.1s)
|
||||
0 string #pmdahotproc PCP pmdahotproc config
|
||||
>13 string Version
|
||||
>21 string >\0 (V%-3.3s)
|
||||
0 string PcPh PCP Help
|
||||
>4 string 1 Index
|
||||
>4 string 2 Text
|
||||
>5 string >\0 (V.%1.1s)
|
||||
0 string #pmieconf-rules PCP pmieconf rules
|
||||
>16 string >\0 (V.%1.1s)
|
||||
3 string pmieconf-pmie PCP pmie config
|
||||
>17 string >\0 (V.%1.1s)
|
||||
|
||||
# SpeedShop data files
|
||||
0 lelong 0x13130303 SpeedShop data file
|
||||
|
||||
# mdbm files
|
||||
0 lelong 0x01023962 mdbm file, version 0 (obsolete)
|
||||
0 string mdbm mdbm file,
|
||||
>5 byte x version %d,
|
||||
>6 byte x 2^%d pages,
|
||||
>7 byte x pagesize 2^%d,
|
||||
>17 byte x hash %d,
|
||||
>11 byte x dataformat %d
|
||||
|
||||
# Alias Maya files
|
||||
0 string/t //Maya ASCII Alias Maya Ascii File,
|
||||
>13 string >\0 version %s
|
||||
8 string MAYAFOR4 Alias Maya Binary File,
|
||||
>32 string >\0 version %s scene
|
||||
8 string MayaFOR4 Alias Maya Binary File,
|
||||
>32 string >\0 version %s scene
|
||||
8 string CIMG Alias Maya Image File
|
||||
8 string DEEP Alias Maya Image File
|
46
Magdir/sql
46
Magdir/sql
@ -1,46 +0,0 @@
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# $File: sql,v 1.6 2009/09/19 16:28:12 christos Exp $
|
||||
# sql: file(1) magic for SQL files
|
||||
#
|
||||
# From: "Marty Leisner" <mleisner@eng.mc.xerox.com>
|
||||
# Recognize some MySQL files.
|
||||
#
|
||||
0 beshort 0xfe01 MySQL table definition file
|
||||
>2 byte x Version %d
|
||||
0 belong&0xffffff00 0xfefe0300 MySQL MISAM index file
|
||||
>3 byte x Version %d
|
||||
0 belong&0xffffff00 0xfefe0700 MySQL MISAM compressed data file
|
||||
>3 byte x Version %d
|
||||
0 belong&0xffffff00 0xfefe0500 MySQL ISAM index file
|
||||
>3 byte x Version %d
|
||||
0 belong&0xffffff00 0xfefe0600 MySQL ISAM compressed data file
|
||||
>3 byte x Version %d
|
||||
0 string \376bin MySQL replication log
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# iRiver H Series database file
|
||||
# From Ken Guest <ken@linux.ie>
|
||||
# As observed from iRivNavi.iDB and unencoded firmware
|
||||
#
|
||||
0 string iRivDB iRiver Database file
|
||||
>11 string >\0 Version %s
|
||||
>39 string iHP-100 [H Series]
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# SQLite database files
|
||||
# Ken Guest <ken@linux.ie>, Ty Sarna, Zack Weinberg
|
||||
#
|
||||
# Version 1 used GDBM internally; its files cannot be distinguished
|
||||
# from other GDBM files.
|
||||
#
|
||||
# Version 2 used this format:
|
||||
0 string **\ This\ file\ contains\ an\ SQLite SQLite 2.x database
|
||||
|
||||
# Version 3 of SQLite allows applications to embed their own "user version"
|
||||
# number in the database. Detect this and distinguish those files.
|
||||
|
||||
0 string SQLite\ format\ 3
|
||||
>60 string _MTN Monotone source repository
|
||||
>60 belong !0 SQLite 3.x database, user version %u
|
||||
>60 belong 0 SQLite 3.x database
|
@ -1,35 +0,0 @@
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# $File: unknown,v 1.7 2009/09/19 16:28:13 christos Exp $
|
||||
# unknown: file(1) magic for unknown machines
|
||||
#
|
||||
# XXX - this probably should be pruned, as it'll match PDP-11 and
|
||||
# VAX image formats.
|
||||
#
|
||||
# 0x107 is 0407; 0x108 is 0410; both are PDP-11 (executable and pure,
|
||||
# respectively).
|
||||
#
|
||||
# 0x109 is 0411; that's PDP-11 split I&D, but the PDP-11 version doesn't
|
||||
# have the "version %ld", which may be a bogus COFFism (I don't think
|
||||
# there ever was COFF for the PDP-11).
|
||||
#
|
||||
# 0x10B is 0413; that's VAX demand-paged, but this is a short, not a
|
||||
# long, as it would be on a VAX.
|
||||
#
|
||||
# 0x10C is 0414 and 0x10E is 416; those *are* unknown.
|
||||
#
|
||||
0 short 0x107 unknown machine executable
|
||||
>8 short >0 not stripped
|
||||
>15 byte >0 - version %ld
|
||||
0 short 0x108 unknown pure executable
|
||||
>8 short >0 not stripped
|
||||
>15 byte >0 - version %ld
|
||||
0 short 0x109 PDP-11 separate I&D
|
||||
>8 short >0 not stripped
|
||||
>15 byte >0 - version %ld
|
||||
0 short 0x10b unknown pure executable
|
||||
>8 short >0 not stripped
|
||||
>15 byte >0 - version %ld
|
||||
0 long 0x10c unknown demand paged pure executable
|
||||
>16 long >0 not stripped
|
||||
0 long 0x10e unknown readable demand paged pure executable
|
@ -1,17 +0,0 @@
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# $File: virtual,v 1.2 2011/11/22 13:30:05 christos Exp $
|
||||
# From: James Nobis <quel@quelrod.net>
|
||||
# Microsoft hard disk images for:
|
||||
# Virtual Server
|
||||
# Virtual PC
|
||||
# http://technet.microsoft.com/en-us/virtualserver/bb676673.aspx
|
||||
# .vhd
|
||||
0 string conectix Microsoft Disk Image, Virtual Server or Virtual PC
|
||||
|
||||
# Sun xVM VirtualBox Disk Image
|
||||
# From: Richard W.M. Jones <rich@annexia.org>
|
||||
# VirtualBox Disk Image
|
||||
0x40 ulelong 0xbeda107f VirtualBox Disk Image
|
||||
>0x44 uleshort >0 \b, major %u
|
||||
>0x46 uleshort >0 \b, minor %u
|
122
Magdir/windows
122
Magdir/windows
@ -1,122 +0,0 @@
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# $File: windows,v 1.4 2009/09/19 16:28:13 christos Exp $
|
||||
# windows: file(1) magic for Microsoft Windows
|
||||
#
|
||||
# This file is mainly reserved for files where programs
|
||||
# using them are run almost always on MS Windows 3.x or
|
||||
# above, or files only used exclusively in Windows OS,
|
||||
# where there is no better category to allocate for.
|
||||
# For example, even though WinZIP almost run on Windows
|
||||
# only, it is better to treat them as "archive" instead.
|
||||
# For format usable in DOS, such as generic executable
|
||||
# format, please specify under "msdos" file.
|
||||
#
|
||||
|
||||
|
||||
# Summary: Outlook Express DBX file
|
||||
# Extension: .dbx
|
||||
# Created by: Christophe Monniez
|
||||
0 string \xCF\xAD\x12\xFE MS Outlook Express DBX file
|
||||
>4 byte =0xC5 \b, message database
|
||||
>4 byte =0xC6 \b, folder database
|
||||
>4 byte =0xC7 \b, account information
|
||||
>4 byte =0x30 \b, offline database
|
||||
|
||||
|
||||
# Summary: Windows crash dump
|
||||
# Extension: .dmp
|
||||
# Created by: Andreas Schuster (http://computer.forensikblog.de/)
|
||||
# Reference (1): http://computer.forensikblog.de/en/2008/02/64bit_magic.html
|
||||
# Modified by (1): Abel Cheung (Avoid match with first 4 bytes only)
|
||||
0 string PAGE
|
||||
>4 string DUMP MS Windows 32bit crash dump
|
||||
>>0x05c byte 0 \b, no PAE
|
||||
>>0x05c byte 1 \b, PAE
|
||||
>>0xf88 lelong 1 \b, full dump
|
||||
>>0xf88 lelong 2 \b, kernel dump
|
||||
>>0xf88 lelong 3 \b, small dump
|
||||
>>0x068 lelong x \b, %ld pages
|
||||
>4 string DU64 MS Windows 64bit crash dump
|
||||
>>0xf98 lelong 1 \b, full dump
|
||||
>>0xf98 lelong 2 \b, kernel dump
|
||||
>>0xf98 lelong 3 \b, small dump
|
||||
>>0x090 lequad x \b, %lld pages
|
||||
|
||||
|
||||
# Summary: Vista Event Log
|
||||
# Extension: .evtx
|
||||
# Created by: Andreas Schuster (http://computer.forensikblog.de/)
|
||||
# Reference (1): http://computer.forensikblog.de/en/2007/05/some_magic.html
|
||||
0 string ElfFile\0 MS Windows Vista Event Log
|
||||
>0x2a leshort x \b, %d chunks
|
||||
>>0x10 lelong x \b (no. %d in use)
|
||||
>0x18 lelong >1 \b, next record no. %d
|
||||
>0x18 lelong =1 \b, empty
|
||||
>0x78 lelong &1 \b, DIRTY
|
||||
>0x78 lelong &2 \b, FULL
|
||||
|
||||
|
||||
# Summary: Windows 3.1 group files
|
||||
# Extension: .grp
|
||||
# Created by: unknown
|
||||
0 string \120\115\103\103 MS Windows 3.1 group files
|
||||
|
||||
|
||||
# Summary: Old format help files
|
||||
# Extension: .hlp
|
||||
# Created by: Dirk Jagdmann <doj@cubic.org>
|
||||
0 lelong 0x00035f3f MS Windows 3.x help file
|
||||
|
||||
|
||||
# Summary: Hyper terminal
|
||||
# Extension: .ht
|
||||
# Created by: unknown
|
||||
0 string HyperTerminal\
|
||||
>15 string 1.0\ --\ HyperTerminal\ data\ file MS Windows HyperTerminal profile
|
||||
|
||||
|
||||
# Summary: Windows shortcut
|
||||
# Extension: .lnk
|
||||
# Created by: unknown
|
||||
0 string \114\0\0\0\001\024\002\0\0\0\0\0\300\0\0\0\0\0\0\106 MS Windows shortcut
|
||||
|
||||
|
||||
# Summary: Outlook Personal Folders
|
||||
# Created by: unknown
|
||||
0 lelong 0x4E444221 Microsoft Outlook email folder
|
||||
>10 leshort 0x0e (<=2002)
|
||||
>10 leshort 0x17 (>=2003)
|
||||
|
||||
|
||||
# Summary: Windows help cache
|
||||
# Created by: unknown
|
||||
0 string \164\146\115\122\012\000\000\000\001\000\000\000 MS Windows help cache
|
||||
|
||||
|
||||
# Summary: IE cache file
|
||||
# Created by: Christophe Monniez
|
||||
0 string Client\ UrlCache\ MMF Internet Explorer cache file
|
||||
>20 string >\0 version %s
|
||||
|
||||
|
||||
# Summary: Registry files
|
||||
# Created by: unknown
|
||||
# Modified by (1): Joerg Jenderek
|
||||
0 string regf MS Windows registry file, NT/2000 or above
|
||||
0 string CREG MS Windows 95/98/ME registry file
|
||||
0 string SHCC3 MS Windows 3.1 registry file
|
||||
|
||||
|
||||
# Summary: Windows Registry text
|
||||
# Extension: .reg
|
||||
# Submitted by: Abel Cheung <abelcheung@gmail.com>
|
||||
0 string REGEDIT4\r\n\r\n Windows Registry text (Win95 or above)
|
||||
0 string Windows\ Registry\ Editor\
|
||||
>&0 string Version\ 5.00\r\n\r\n Windows Registry text (Win2K or above)
|
||||
|
||||
|
||||
# From: Pal Tamas <folti@balabit.hu>
|
||||
# Autorun File
|
||||
0 string/c [autorun]\r\n Microsoft Windows Autorun file.
|
||||
!:mime application/x-setupscript.
|
@ -1,35 +0,0 @@
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# $File: xilinx,v 1.4 2009/09/19 16:28:13 christos Exp $
|
||||
# This is Aaron's attempt at a MAGIC file for Xilinx .bit files.
|
||||
# Xilinx-Magic@RevRagnarok.com
|
||||
# Got the info from FPGA-FAQ 0026
|
||||
#
|
||||
# First there is the sync header and its length
|
||||
0 beshort 0x0009
|
||||
>2 belong =0x0ff00ff0
|
||||
>>&0 belong =0x0ff00ff0
|
||||
>>>&0 beshort =0x0000
|
||||
>>>>&0 pstring a Xilinx BIT data
|
||||
# Next is a Pascal-style string with the NCD name. We want to capture that.
|
||||
>>>>0x0F pstring x - from %s
|
||||
# It is followed by a NUL
|
||||
>>>>>&1 byte 0x00
|
||||
# And then 'b'
|
||||
>>>>>&2 string b
|
||||
# With the part number:
|
||||
#>>>>>&5 string 4v (Virtex4)
|
||||
#>>>>>&5 string 2v (Virtex II
|
||||
#>>>>>>&0 string !p \b)
|
||||
#>>>>>>&0 string p Pro)
|
||||
>>>>>&4 pstring x - for %s
|
||||
# And then NUL / 'c' / Build Data / NUL / 'd' / Date / NUL / 'e' / Data Length
|
||||
>>>>>>&1 byte 0x00
|
||||
>>>>>>&2 string c
|
||||
>>>>>>&4 pstring x - built %s
|
||||
>>>>>>>&1 byte 0x00
|
||||
>>>>>>>&2 string d
|
||||
>>>>>>>&4 pstring x \b(%s)
|
||||
>>>>>>>>&1 byte 0x00
|
||||
>>>>>>>>&2 string e
|
||||
>>>>>>>>&4 belong x - data length 0x%lx
|
281
Makefile.am
281
Makefile.am
@ -1,280 +1,5 @@
|
||||
#
|
||||
# $File: Makefile.am,v 1.78 2012/01/27 01:41:26 christos Exp $
|
||||
#
|
||||
MAGIC_FRAGMENT_BASE = Magdir
|
||||
MAGIC_DIR = $(top_srcdir)/magic
|
||||
MAGIC_FRAGMENT_DIR = $(MAGIC_DIR)/$(MAGIC_FRAGMENT_BASE)
|
||||
ACLOCAL_AMFLAGS = -I m4
|
||||
|
||||
pkgdata_DATA = magic.mgc
|
||||
EXTRA_DIST = MAINT
|
||||
|
||||
EXTRA_DIST = \
|
||||
$(MAGIC_DIR)/Header \
|
||||
$(MAGIC_DIR)/Localstuff \
|
||||
$(MAGIC_FRAGMENT_DIR)/acorn \
|
||||
$(MAGIC_FRAGMENT_DIR)/adi \
|
||||
$(MAGIC_FRAGMENT_DIR)/adventure \
|
||||
$(MAGIC_FRAGMENT_DIR)/allegro \
|
||||
$(MAGIC_FRAGMENT_DIR)/alliant \
|
||||
$(MAGIC_FRAGMENT_DIR)/amanda \
|
||||
$(MAGIC_FRAGMENT_DIR)/amigaos \
|
||||
$(MAGIC_FRAGMENT_DIR)/animation \
|
||||
$(MAGIC_FRAGMENT_DIR)/apl \
|
||||
$(MAGIC_FRAGMENT_DIR)/apple \
|
||||
$(MAGIC_FRAGMENT_DIR)/applix \
|
||||
$(MAGIC_FRAGMENT_DIR)/archive \
|
||||
$(MAGIC_FRAGMENT_DIR)/assembler \
|
||||
$(MAGIC_FRAGMENT_DIR)/asterix \
|
||||
$(MAGIC_FRAGMENT_DIR)/att3b \
|
||||
$(MAGIC_FRAGMENT_DIR)/audio \
|
||||
$(MAGIC_FRAGMENT_DIR)/basis \
|
||||
$(MAGIC_FRAGMENT_DIR)/bflt \
|
||||
$(MAGIC_FRAGMENT_DIR)/blcr \
|
||||
$(MAGIC_FRAGMENT_DIR)/blender \
|
||||
$(MAGIC_FRAGMENT_DIR)/blit \
|
||||
$(MAGIC_FRAGMENT_DIR)/bout \
|
||||
$(MAGIC_FRAGMENT_DIR)/bsdi \
|
||||
$(MAGIC_FRAGMENT_DIR)/bsi \
|
||||
$(MAGIC_FRAGMENT_DIR)/btsnoop \
|
||||
$(MAGIC_FRAGMENT_DIR)/c-lang \
|
||||
$(MAGIC_FRAGMENT_DIR)/c64 \
|
||||
$(MAGIC_FRAGMENT_DIR)/cad \
|
||||
$(MAGIC_FRAGMENT_DIR)/cafebabe \
|
||||
$(MAGIC_FRAGMENT_DIR)/cddb \
|
||||
$(MAGIC_FRAGMENT_DIR)/chord \
|
||||
$(MAGIC_FRAGMENT_DIR)/cisco \
|
||||
$(MAGIC_FRAGMENT_DIR)/citrus \
|
||||
$(MAGIC_FRAGMENT_DIR)/clarion \
|
||||
$(MAGIC_FRAGMENT_DIR)/claris \
|
||||
$(MAGIC_FRAGMENT_DIR)/clipper \
|
||||
$(MAGIC_FRAGMENT_DIR)/commands \
|
||||
$(MAGIC_FRAGMENT_DIR)/communications \
|
||||
$(MAGIC_FRAGMENT_DIR)/compress \
|
||||
$(MAGIC_FRAGMENT_DIR)/console \
|
||||
$(MAGIC_FRAGMENT_DIR)/convex \
|
||||
$(MAGIC_FRAGMENT_DIR)/cracklib \
|
||||
$(MAGIC_FRAGMENT_DIR)/ctags \
|
||||
$(MAGIC_FRAGMENT_DIR)/cups \
|
||||
$(MAGIC_FRAGMENT_DIR)/dact \
|
||||
$(MAGIC_FRAGMENT_DIR)/database \
|
||||
$(MAGIC_FRAGMENT_DIR)/diamond \
|
||||
$(MAGIC_FRAGMENT_DIR)/diff \
|
||||
$(MAGIC_FRAGMENT_DIR)/digital \
|
||||
$(MAGIC_FRAGMENT_DIR)/dolby \
|
||||
$(MAGIC_FRAGMENT_DIR)/dump \
|
||||
$(MAGIC_FRAGMENT_DIR)/dyadic \
|
||||
$(MAGIC_FRAGMENT_DIR)/ebml \
|
||||
$(MAGIC_FRAGMENT_DIR)/editors \
|
||||
$(MAGIC_FRAGMENT_DIR)/efi \
|
||||
$(MAGIC_FRAGMENT_DIR)/elf \
|
||||
$(MAGIC_FRAGMENT_DIR)/encore \
|
||||
$(MAGIC_FRAGMENT_DIR)/epoc \
|
||||
$(MAGIC_FRAGMENT_DIR)/erlang \
|
||||
$(MAGIC_FRAGMENT_DIR)/esri \
|
||||
$(MAGIC_FRAGMENT_DIR)/fcs \
|
||||
$(MAGIC_FRAGMENT_DIR)/filesystems \
|
||||
$(MAGIC_FRAGMENT_DIR)/flash \
|
||||
$(MAGIC_FRAGMENT_DIR)/fonts \
|
||||
$(MAGIC_FRAGMENT_DIR)/fortran \
|
||||
$(MAGIC_FRAGMENT_DIR)/frame \
|
||||
$(MAGIC_FRAGMENT_DIR)/freebsd \
|
||||
$(MAGIC_FRAGMENT_DIR)/fsav \
|
||||
$(MAGIC_FRAGMENT_DIR)/fusecompress \
|
||||
$(MAGIC_FRAGMENT_DIR)/games \
|
||||
$(MAGIC_FRAGMENT_DIR)/gcc \
|
||||
$(MAGIC_FRAGMENT_DIR)/geo \
|
||||
$(MAGIC_FRAGMENT_DIR)/geos \
|
||||
$(MAGIC_FRAGMENT_DIR)/gimp \
|
||||
$(MAGIC_FRAGMENT_DIR)/gnome-keyring \
|
||||
$(MAGIC_FRAGMENT_DIR)/gnu \
|
||||
$(MAGIC_FRAGMENT_DIR)/gnumeric \
|
||||
$(MAGIC_FRAGMENT_DIR)/grace \
|
||||
$(MAGIC_FRAGMENT_DIR)/graphviz \
|
||||
$(MAGIC_FRAGMENT_DIR)/gringotts \
|
||||
$(MAGIC_FRAGMENT_DIR)/guile \
|
||||
$(MAGIC_FRAGMENT_DIR)/hitachi-sh \
|
||||
$(MAGIC_FRAGMENT_DIR)/hp \
|
||||
$(MAGIC_FRAGMENT_DIR)/human68k \
|
||||
$(MAGIC_FRAGMENT_DIR)/ibm370 \
|
||||
$(MAGIC_FRAGMENT_DIR)/ibm6000 \
|
||||
$(MAGIC_FRAGMENT_DIR)/iff \
|
||||
$(MAGIC_FRAGMENT_DIR)/images \
|
||||
$(MAGIC_FRAGMENT_DIR)/inform \
|
||||
$(MAGIC_FRAGMENT_DIR)/intel \
|
||||
$(MAGIC_FRAGMENT_DIR)/interleaf \
|
||||
$(MAGIC_FRAGMENT_DIR)/island \
|
||||
$(MAGIC_FRAGMENT_DIR)/ispell \
|
||||
$(MAGIC_FRAGMENT_DIR)/isz \
|
||||
$(MAGIC_FRAGMENT_DIR)/java \
|
||||
$(MAGIC_FRAGMENT_DIR)/jpeg \
|
||||
$(MAGIC_FRAGMENT_DIR)/karma \
|
||||
$(MAGIC_FRAGMENT_DIR)/kde \
|
||||
$(MAGIC_FRAGMENT_DIR)/kml \
|
||||
$(MAGIC_FRAGMENT_DIR)/lecter \
|
||||
$(MAGIC_FRAGMENT_DIR)/lex \
|
||||
$(MAGIC_FRAGMENT_DIR)/lif \
|
||||
$(MAGIC_FRAGMENT_DIR)/linux \
|
||||
$(MAGIC_FRAGMENT_DIR)/lisp \
|
||||
$(MAGIC_FRAGMENT_DIR)/llvm \
|
||||
$(MAGIC_FRAGMENT_DIR)/lua \
|
||||
$(MAGIC_FRAGMENT_DIR)/luks \
|
||||
$(MAGIC_FRAGMENT_DIR)/m4 \
|
||||
$(MAGIC_FRAGMENT_DIR)/mach \
|
||||
$(MAGIC_FRAGMENT_DIR)/macintosh \
|
||||
$(MAGIC_FRAGMENT_DIR)/magic \
|
||||
$(MAGIC_FRAGMENT_DIR)/mail.news \
|
||||
$(MAGIC_FRAGMENT_DIR)/make \
|
||||
$(MAGIC_FRAGMENT_DIR)/maple \
|
||||
$(MAGIC_FRAGMENT_DIR)/marc21 \
|
||||
$(MAGIC_FRAGMENT_DIR)/mathcad \
|
||||
$(MAGIC_FRAGMENT_DIR)/mathematica \
|
||||
$(MAGIC_FRAGMENT_DIR)/matroska \
|
||||
$(MAGIC_FRAGMENT_DIR)/mcrypt \
|
||||
$(MAGIC_FRAGMENT_DIR)/mercurial \
|
||||
$(MAGIC_FRAGMENT_DIR)/metastore \
|
||||
$(MAGIC_FRAGMENT_DIR)/mime \
|
||||
$(MAGIC_FRAGMENT_DIR)/mips \
|
||||
$(MAGIC_FRAGMENT_DIR)/mirage \
|
||||
$(MAGIC_FRAGMENT_DIR)/misctools \
|
||||
$(MAGIC_FRAGMENT_DIR)/mkid \
|
||||
$(MAGIC_FRAGMENT_DIR)/mlssa \
|
||||
$(MAGIC_FRAGMENT_DIR)/mmdf \
|
||||
$(MAGIC_FRAGMENT_DIR)/modem \
|
||||
$(MAGIC_FRAGMENT_DIR)/motorola \
|
||||
$(MAGIC_FRAGMENT_DIR)/mozilla \
|
||||
$(MAGIC_FRAGMENT_DIR)/msdos \
|
||||
$(MAGIC_FRAGMENT_DIR)/msooxml \
|
||||
$(MAGIC_FRAGMENT_DIR)/msvc \
|
||||
$(MAGIC_FRAGMENT_DIR)/mup \
|
||||
$(MAGIC_FRAGMENT_DIR)/music \
|
||||
$(MAGIC_FRAGMENT_DIR)/natinst \
|
||||
$(MAGIC_FRAGMENT_DIR)/ncr \
|
||||
$(MAGIC_FRAGMENT_DIR)/netbsd \
|
||||
$(MAGIC_FRAGMENT_DIR)/netscape \
|
||||
$(MAGIC_FRAGMENT_DIR)/netware \
|
||||
$(MAGIC_FRAGMENT_DIR)/news \
|
||||
$(MAGIC_FRAGMENT_DIR)/nitpicker \
|
||||
$(MAGIC_FRAGMENT_DIR)/oasis \
|
||||
$(MAGIC_FRAGMENT_DIR)/ocaml \
|
||||
$(MAGIC_FRAGMENT_DIR)/octave \
|
||||
$(MAGIC_FRAGMENT_DIR)/ole2compounddocs \
|
||||
$(MAGIC_FRAGMENT_DIR)/olf \
|
||||
$(MAGIC_FRAGMENT_DIR)/os2 \
|
||||
$(MAGIC_FRAGMENT_DIR)/os400 \
|
||||
$(MAGIC_FRAGMENT_DIR)/os9 \
|
||||
$(MAGIC_FRAGMENT_DIR)/osf1 \
|
||||
$(MAGIC_FRAGMENT_DIR)/palm \
|
||||
$(MAGIC_FRAGMENT_DIR)/parix \
|
||||
$(MAGIC_FRAGMENT_DIR)/parrot \
|
||||
$(MAGIC_FRAGMENT_DIR)/pascal \
|
||||
$(MAGIC_FRAGMENT_DIR)/pbm \
|
||||
$(MAGIC_FRAGMENT_DIR)/pdf \
|
||||
$(MAGIC_FRAGMENT_DIR)/pdp \
|
||||
$(MAGIC_FRAGMENT_DIR)/perl \
|
||||
$(MAGIC_FRAGMENT_DIR)/pgp \
|
||||
$(MAGIC_FRAGMENT_DIR)/pkgadd \
|
||||
$(MAGIC_FRAGMENT_DIR)/plan9 \
|
||||
$(MAGIC_FRAGMENT_DIR)/plus5 \
|
||||
$(MAGIC_FRAGMENT_DIR)/printer \
|
||||
$(MAGIC_FRAGMENT_DIR)/project \
|
||||
$(MAGIC_FRAGMENT_DIR)/psdbms \
|
||||
$(MAGIC_FRAGMENT_DIR)/pulsar \
|
||||
$(MAGIC_FRAGMENT_DIR)/pyramid \
|
||||
$(MAGIC_FRAGMENT_DIR)/python \
|
||||
$(MAGIC_FRAGMENT_DIR)/revision \
|
||||
$(MAGIC_FRAGMENT_DIR)/riff \
|
||||
$(MAGIC_FRAGMENT_DIR)/rinex \
|
||||
$(MAGIC_FRAGMENT_DIR)/rpm \
|
||||
$(MAGIC_FRAGMENT_DIR)/rtf \
|
||||
$(MAGIC_FRAGMENT_DIR)/ruby \
|
||||
$(MAGIC_FRAGMENT_DIR)/sc \
|
||||
$(MAGIC_FRAGMENT_DIR)/sccs \
|
||||
$(MAGIC_FRAGMENT_DIR)/scientific \
|
||||
$(MAGIC_FRAGMENT_DIR)/securitycerts \
|
||||
$(MAGIC_FRAGMENT_DIR)/selinux \
|
||||
$(MAGIC_FRAGMENT_DIR)/sendmail \
|
||||
$(MAGIC_FRAGMENT_DIR)/sequent \
|
||||
$(MAGIC_FRAGMENT_DIR)/sgi \
|
||||
$(MAGIC_FRAGMENT_DIR)/sgml \
|
||||
$(MAGIC_FRAGMENT_DIR)/sharc \
|
||||
$(MAGIC_FRAGMENT_DIR)/sinclair \
|
||||
$(MAGIC_FRAGMENT_DIR)/sisu \
|
||||
$(MAGIC_FRAGMENT_DIR)/sketch \
|
||||
$(MAGIC_FRAGMENT_DIR)/smalltalk \
|
||||
$(MAGIC_FRAGMENT_DIR)/smile \
|
||||
$(MAGIC_FRAGMENT_DIR)/sniffer \
|
||||
$(MAGIC_FRAGMENT_DIR)/softquad \
|
||||
$(MAGIC_FRAGMENT_DIR)/spec \
|
||||
$(MAGIC_FRAGMENT_DIR)/spectrum \
|
||||
$(MAGIC_FRAGMENT_DIR)/sql \
|
||||
$(MAGIC_FRAGMENT_DIR)/ssh \
|
||||
$(MAGIC_FRAGMENT_DIR)/ssl \
|
||||
$(MAGIC_FRAGMENT_DIR)/sun \
|
||||
$(MAGIC_FRAGMENT_DIR)/sysex \
|
||||
$(MAGIC_FRAGMENT_DIR)/tcl \
|
||||
$(MAGIC_FRAGMENT_DIR)/teapot \
|
||||
$(MAGIC_FRAGMENT_DIR)/terminfo \
|
||||
$(MAGIC_FRAGMENT_DIR)/tex \
|
||||
$(MAGIC_FRAGMENT_DIR)/tgif \
|
||||
$(MAGIC_FRAGMENT_DIR)/ti-8x \
|
||||
$(MAGIC_FRAGMENT_DIR)/timezone \
|
||||
$(MAGIC_FRAGMENT_DIR)/troff \
|
||||
$(MAGIC_FRAGMENT_DIR)/tuxedo \
|
||||
$(MAGIC_FRAGMENT_DIR)/typeset \
|
||||
$(MAGIC_FRAGMENT_DIR)/unicode \
|
||||
$(MAGIC_FRAGMENT_DIR)/unknown \
|
||||
$(MAGIC_FRAGMENT_DIR)/uuencode \
|
||||
$(MAGIC_FRAGMENT_DIR)/varied.out \
|
||||
$(MAGIC_FRAGMENT_DIR)/varied.script \
|
||||
$(MAGIC_FRAGMENT_DIR)/vax \
|
||||
$(MAGIC_FRAGMENT_DIR)/vicar \
|
||||
$(MAGIC_FRAGMENT_DIR)/virtual \
|
||||
$(MAGIC_FRAGMENT_DIR)/virtutech \
|
||||
$(MAGIC_FRAGMENT_DIR)/visx \
|
||||
$(MAGIC_FRAGMENT_DIR)/vms \
|
||||
$(MAGIC_FRAGMENT_DIR)/vmware \
|
||||
$(MAGIC_FRAGMENT_DIR)/vorbis \
|
||||
$(MAGIC_FRAGMENT_DIR)/vxl \
|
||||
$(MAGIC_FRAGMENT_DIR)/warc \
|
||||
$(MAGIC_FRAGMENT_DIR)/weak \
|
||||
$(MAGIC_FRAGMENT_DIR)/windows \
|
||||
$(MAGIC_FRAGMENT_DIR)/wireless \
|
||||
$(MAGIC_FRAGMENT_DIR)/wordprocessors \
|
||||
$(MAGIC_FRAGMENT_DIR)/wsdl \
|
||||
$(MAGIC_FRAGMENT_DIR)/xdelta \
|
||||
$(MAGIC_FRAGMENT_DIR)/xenix \
|
||||
$(MAGIC_FRAGMENT_DIR)/xilinx \
|
||||
$(MAGIC_FRAGMENT_DIR)/xo65 \
|
||||
$(MAGIC_FRAGMENT_DIR)/xwindows \
|
||||
$(MAGIC_FRAGMENT_DIR)/zfs \
|
||||
$(MAGIC_FRAGMENT_DIR)/zilog \
|
||||
$(MAGIC_FRAGMENT_DIR)/zyxel
|
||||
|
||||
MAGIC = magic.mgc
|
||||
CLEANFILES = ${MAGIC} $(MAGIC_FRAGMENT_DIR)/Localstuff
|
||||
|
||||
# FIXME: Build file natively as well so that it can be used to compile
|
||||
# the target's magic file; for now we bail if the local version does not match
|
||||
if IS_CROSS_COMPILE
|
||||
FILE_COMPILE = file
|
||||
FILE_COMPILE_DEP =
|
||||
else
|
||||
FILE_COMPILE = $(top_builddir)/src/file
|
||||
FILE_COMPILE_DEP = $(FILE_COMPILE)
|
||||
endif
|
||||
|
||||
${MAGIC}: $(EXTRA_DIST) $(FILE_COMPILE_DEP)
|
||||
@rm -fr magic
|
||||
@mkdir magic && cp -p $(EXTRA_DIST) magic
|
||||
@(if expr "${FILE_COMPILE}" : '.*/.*' > /dev/null; then \
|
||||
echo "Using ${FILE_COMPILE} to generate ${MAGIC}" > /dev/null; \
|
||||
else \
|
||||
v=$$(file --version | sed -e s/file-// -e q); \
|
||||
if [ "$$v" != "${PACKAGE_VERSION}" ]; then \
|
||||
echo "Cannot use the installed version of file ($$v) to"; \
|
||||
echo "cross-compile file ${PACKAGE_VERSION}"; \
|
||||
echo "Please install file ${PACKAGE_VERSION} locally first"; \
|
||||
exit 1; \
|
||||
fi; \
|
||||
fi)
|
||||
$(FILE_COMPILE) -C -m magic
|
||||
@rm -fr magic
|
||||
SUBDIRS = src magic tests doc python
|
||||
|
902
Makefile.in
902
Makefile.in
File diff suppressed because it is too large
Load Diff
80
README
80
README
@ -1,10 +1,14 @@
|
||||
** README for file(1) Command **
|
||||
@(#) $File: README,v 1.44 2011/03/24 13:03:39 rrt Exp $
|
||||
## README for file(1) Command ##
|
||||
|
||||
Mailing List: file@mx.gw.com
|
||||
Bug tracker: http://bugs.gw.com/
|
||||
@(#) $File: README,v 1.48 2014/03/07 13:55:30 christos Exp $
|
||||
|
||||
Mailing List: file@mx.gw.com
|
||||
Mailing List archives: http://mx.gw.com/pipermail/file/
|
||||
Bug tracker: http://bugs.gw.com/
|
||||
E-mail: christos@astron.com
|
||||
|
||||
[![Build Status](https://travis-ci.org/file/file.png?branch=master)](https://travis-ci.org/file/file)
|
||||
|
||||
Phone: Do not even think of telephoning me about this program. Send cash first!
|
||||
|
||||
This is Release 5.x of Ian Darwin's (copyright but distributable)
|
||||
@ -13,13 +17,13 @@ It knows the 'magic number' of several thousands of file types.
|
||||
This version is the standard "file" command for Linux,
|
||||
*BSD, and other systems. (See "patchlevel.h" for the exact release number).
|
||||
|
||||
You can download the latest version of file from:
|
||||
You can download the latest version of the original sources for file from:
|
||||
|
||||
ftp://ftp.astron.com/pub/file/
|
||||
|
||||
A public read-only git repository is available at:
|
||||
A public read-only git repository of the same sources is available at:
|
||||
|
||||
https://github.com/glensc/file
|
||||
https://github.com/file/file
|
||||
|
||||
The major changes for 5.x are CDF file parsing, indirect magic, and
|
||||
overhaul in mime and ascii encoding handling.
|
||||
@ -28,7 +32,7 @@ The major feature of 4.x is the refactoring of the code into a library,
|
||||
and the re-write of the file command in terms of that library. The library
|
||||
itself, libmagic can be used by 3rd party programs that wish to identify
|
||||
file types without having to fork() and exec() file. The prime contributor
|
||||
for 4.0 was M\xe5ns Rullg\xe5rd.
|
||||
for 4.0 was Mans Rullgard.
|
||||
|
||||
UNIX is a trademark of UNIX System Laboratories.
|
||||
|
||||
@ -60,38 +64,42 @@ magic numbers assigned to all sorts of data files that
|
||||
are in reasonable circulation. Send your magic numbers,
|
||||
in magic(5) format please, to the maintainer, Christos Zoulas.
|
||||
|
||||
COPYING - read this first.
|
||||
README - read this second (you are currently reading this file).
|
||||
COPYING - read this first.
|
||||
README - read this second (you are currently reading this file).
|
||||
INSTALL - read on how to install
|
||||
|
||||
src/apprentice.c - parses /etc/magic to learn magic
|
||||
src/apptype.c - used for OS/2 specific application type magic
|
||||
src/asprintf.c - replacement for OS's that don't have it.
|
||||
src/ascmagic.c - third & last set of tests, based on hardwired assumptions.
|
||||
src/cdf.c - parser for Microsoft Compound Document Files
|
||||
src/cdf_time.c - time converter for CDF.
|
||||
src/compress.c - handles decompressing files to look inside.
|
||||
src/encoding.c - handles unicode encodings
|
||||
src/file.c - the main program
|
||||
src/file.h - header file
|
||||
src/fsmagic.c - first set of tests the program runs, based on filesystem info
|
||||
src/funcs.c - utilility functions
|
||||
src/getopt_long.c - used for OS/2 specific application type magic
|
||||
src/is_tar.c, tar.h - knows about tarchives (courtesy John Gilmore).
|
||||
src/names.h - header file for ascmagic.c
|
||||
src/magic.c - the libmagic api
|
||||
src/print.c - print results, errors, warnings.
|
||||
src/readcdf.c - CDF wrapper.
|
||||
src/readelf.[ch] - Stand-alone elf parsing code.
|
||||
src/softmagic.c - 2nd set of tests, based on /etc/magic
|
||||
src/strlcat.c - used for OS/2 specific application type magic
|
||||
src/strlcpy.c - used for OS/2 specific application type magic
|
||||
src/vasprintf.c - used for OS/2 specific application type magic
|
||||
doc/file.1 - man page for the command
|
||||
doc/magic.4 - man page for the magic file, courtesy Guy Harris.
|
||||
src/apprentice.c - parses /etc/magic to learn magic
|
||||
src/apptype.c - used for OS/2 specific application type magic
|
||||
src/asprintf.c - replacement for OS's that don't have it.
|
||||
src/ascmagic.c - third & last set of tests, based on hardwired assumptions.
|
||||
src/asctime_r.c - for systems that don't have it.
|
||||
src/asprintf.c - for systems that don't have it.
|
||||
src/cdf.c - parser for Microsoft Compound Document Files
|
||||
src/cdf_time.c - time converter for CDF.
|
||||
src/compress.c - handles decompressing files to look inside.
|
||||
src/ctime_r.c - for systems that don't have it.
|
||||
src/encoding.c - handles unicode encodings
|
||||
src/file.c - the main program
|
||||
src/file.h - header file
|
||||
src/fsmagic.c - first set of tests the program runs, based on filesystem info
|
||||
src/funcs.c - utilility functions
|
||||
src/getopt_long.c - for systems that don't have it.
|
||||
src/getline.c - for systems that don't have it.
|
||||
src/is_tar.c, tar.h - knows about tarchives (courtesy John Gilmore).
|
||||
src/names.h - header file for ascmagic.c
|
||||
src/magic.c - the libmagic api
|
||||
src/print.c - print results, errors, warnings.
|
||||
src/readcdf.c - CDF wrapper.
|
||||
src/readelf.[ch] - Stand-alone elf parsing code.
|
||||
src/softmagic.c - 2nd set of tests, based on /etc/magic
|
||||
src/strlcat.c - for systems that don't have it.
|
||||
src/strlcpy.c - for systems that don't have it.
|
||||
src/vasprintf.c - for systems that don't have it.
|
||||
doc/file.man - man page for the command
|
||||
doc/magic.man - man page for the magic file, courtesy Guy Harris.
|
||||
Install as magic.4 on USG and magic.5 on V7 or Berkeley; cf Makefile.
|
||||
Magdir - directory of /etc/magic pieces
|
||||
|
||||
Magdir - directory of /etc/magic pieces
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
If you submit a new magic entry please make sure you read the following
|
||||
|
17
TODO
17
TODO
@ -1,6 +1,17 @@
|
||||
TODOs live in the TODO section of doc/file.man (i.e. file(1)). They
|
||||
are more visible there, so please add any further TODOs to that file,
|
||||
not here.
|
||||
Most TODOs live in the TODO section of doc/file.man (i.e. file(1)).
|
||||
They are more visible there, so please add any further TODOs to that
|
||||
file, not here. More speculative material can live here.
|
||||
|
||||
(This change was made when Reuben Thomas noticed that all the bugs
|
||||
listed in the BUGS section of the man page had been fixed!)
|
||||
|
||||
---
|
||||
|
||||
It would be nice to simplify file considerably. For example,
|
||||
reimplement the apprentice and non-pattern magic methods in Python,
|
||||
and compile the magic patterns to a giant regex (or something similar;
|
||||
maybe using Ragel (http://www.complang.org/ragel/)) so that only a
|
||||
small amount of C is needed (because fast execution is typically only
|
||||
required for soft magic, not the more detailed information given by
|
||||
hard-wired routines). In this regard, note that hplip, which is
|
||||
BSD-licensed, has a magic reimplementation in Python.
|
||||
|
810
aclocal.m4
vendored
810
aclocal.m4
vendored
File diff suppressed because it is too large
Load Diff
232
compile
232
compile
@ -1,10 +1,9 @@
|
||||
#! /bin/sh
|
||||
# Wrapper for compilers which do not understand `-c -o'.
|
||||
# Wrapper for compilers which do not understand '-c -o'.
|
||||
|
||||
scriptversion=2009-10-06.20; # UTC
|
||||
scriptversion=2012-10-14.11; # UTC
|
||||
|
||||
# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2009 Free Software
|
||||
# Foundation, Inc.
|
||||
# Copyright (C) 1999-2013 Free Software Foundation, Inc.
|
||||
# Written by Tom Tromey <tromey@cygnus.com>.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
@ -29,21 +28,224 @@ scriptversion=2009-10-06.20; # UTC
|
||||
# bugs to <bug-automake@gnu.org> or send patches to
|
||||
# <automake-patches@gnu.org>.
|
||||
|
||||
nl='
|
||||
'
|
||||
|
||||
# We need space, tab and new line, in precisely that order. Quoting is
|
||||
# there to prevent tools from complaining about whitespace usage.
|
||||
IFS=" "" $nl"
|
||||
|
||||
file_conv=
|
||||
|
||||
# func_file_conv build_file lazy
|
||||
# Convert a $build file to $host form and store it in $file
|
||||
# Currently only supports Windows hosts. If the determined conversion
|
||||
# type is listed in (the comma separated) LAZY, no conversion will
|
||||
# take place.
|
||||
func_file_conv ()
|
||||
{
|
||||
file=$1
|
||||
case $file in
|
||||
/ | /[!/]*) # absolute file, and not a UNC file
|
||||
if test -z "$file_conv"; then
|
||||
# lazily determine how to convert abs files
|
||||
case `uname -s` in
|
||||
MINGW*)
|
||||
file_conv=mingw
|
||||
;;
|
||||
CYGWIN*)
|
||||
file_conv=cygwin
|
||||
;;
|
||||
*)
|
||||
file_conv=wine
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
case $file_conv/,$2, in
|
||||
*,$file_conv,*)
|
||||
;;
|
||||
mingw/*)
|
||||
file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
|
||||
;;
|
||||
cygwin/*)
|
||||
file=`cygpath -m "$file" || echo "$file"`
|
||||
;;
|
||||
wine/*)
|
||||
file=`winepath -w "$file" || echo "$file"`
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
# func_cl_dashL linkdir
|
||||
# Make cl look for libraries in LINKDIR
|
||||
func_cl_dashL ()
|
||||
{
|
||||
func_file_conv "$1"
|
||||
if test -z "$lib_path"; then
|
||||
lib_path=$file
|
||||
else
|
||||
lib_path="$lib_path;$file"
|
||||
fi
|
||||
linker_opts="$linker_opts -LIBPATH:$file"
|
||||
}
|
||||
|
||||
# func_cl_dashl library
|
||||
# Do a library search-path lookup for cl
|
||||
func_cl_dashl ()
|
||||
{
|
||||
lib=$1
|
||||
found=no
|
||||
save_IFS=$IFS
|
||||
IFS=';'
|
||||
for dir in $lib_path $LIB
|
||||
do
|
||||
IFS=$save_IFS
|
||||
if $shared && test -f "$dir/$lib.dll.lib"; then
|
||||
found=yes
|
||||
lib=$dir/$lib.dll.lib
|
||||
break
|
||||
fi
|
||||
if test -f "$dir/$lib.lib"; then
|
||||
found=yes
|
||||
lib=$dir/$lib.lib
|
||||
break
|
||||
fi
|
||||
if test -f "$dir/lib$lib.a"; then
|
||||
found=yes
|
||||
lib=$dir/lib$lib.a
|
||||
break
|
||||
fi
|
||||
done
|
||||
IFS=$save_IFS
|
||||
|
||||
if test "$found" != yes; then
|
||||
lib=$lib.lib
|
||||
fi
|
||||
}
|
||||
|
||||
# func_cl_wrapper cl arg...
|
||||
# Adjust compile command to suit cl
|
||||
func_cl_wrapper ()
|
||||
{
|
||||
# Assume a capable shell
|
||||
lib_path=
|
||||
shared=:
|
||||
linker_opts=
|
||||
for arg
|
||||
do
|
||||
if test -n "$eat"; then
|
||||
eat=
|
||||
else
|
||||
case $1 in
|
||||
-o)
|
||||
# configure might choose to run compile as 'compile cc -o foo foo.c'.
|
||||
eat=1
|
||||
case $2 in
|
||||
*.o | *.[oO][bB][jJ])
|
||||
func_file_conv "$2"
|
||||
set x "$@" -Fo"$file"
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
func_file_conv "$2"
|
||||
set x "$@" -Fe"$file"
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
-I)
|
||||
eat=1
|
||||
func_file_conv "$2" mingw
|
||||
set x "$@" -I"$file"
|
||||
shift
|
||||
;;
|
||||
-I*)
|
||||
func_file_conv "${1#-I}" mingw
|
||||
set x "$@" -I"$file"
|
||||
shift
|
||||
;;
|
||||
-l)
|
||||
eat=1
|
||||
func_cl_dashl "$2"
|
||||
set x "$@" "$lib"
|
||||
shift
|
||||
;;
|
||||
-l*)
|
||||
func_cl_dashl "${1#-l}"
|
||||
set x "$@" "$lib"
|
||||
shift
|
||||
;;
|
||||
-L)
|
||||
eat=1
|
||||
func_cl_dashL "$2"
|
||||
;;
|
||||
-L*)
|
||||
func_cl_dashL "${1#-L}"
|
||||
;;
|
||||
-static)
|
||||
shared=false
|
||||
;;
|
||||
-Wl,*)
|
||||
arg=${1#-Wl,}
|
||||
save_ifs="$IFS"; IFS=','
|
||||
for flag in $arg; do
|
||||
IFS="$save_ifs"
|
||||
linker_opts="$linker_opts $flag"
|
||||
done
|
||||
IFS="$save_ifs"
|
||||
;;
|
||||
-Xlinker)
|
||||
eat=1
|
||||
linker_opts="$linker_opts $2"
|
||||
;;
|
||||
-*)
|
||||
set x "$@" "$1"
|
||||
shift
|
||||
;;
|
||||
*.cc | *.CC | *.cxx | *.CXX | *.[cC]++)
|
||||
func_file_conv "$1"
|
||||
set x "$@" -Tp"$file"
|
||||
shift
|
||||
;;
|
||||
*.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO])
|
||||
func_file_conv "$1" mingw
|
||||
set x "$@" "$file"
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set x "$@" "$1"
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
shift
|
||||
done
|
||||
if test -n "$linker_opts"; then
|
||||
linker_opts="-link$linker_opts"
|
||||
fi
|
||||
exec "$@" $linker_opts
|
||||
exit 1
|
||||
}
|
||||
|
||||
eat=
|
||||
|
||||
case $1 in
|
||||
'')
|
||||
echo "$0: No command. Try \`$0 --help' for more information." 1>&2
|
||||
echo "$0: No command. Try '$0 --help' for more information." 1>&2
|
||||
exit 1;
|
||||
;;
|
||||
-h | --h*)
|
||||
cat <<\EOF
|
||||
Usage: compile [--help] [--version] PROGRAM [ARGS]
|
||||
|
||||
Wrapper for compilers which do not understand `-c -o'.
|
||||
Remove `-o dest.o' from ARGS, run PROGRAM with the remaining
|
||||
Wrapper for compilers which do not understand '-c -o'.
|
||||
Remove '-o dest.o' from ARGS, run PROGRAM with the remaining
|
||||
arguments, and rename the output as expected.
|
||||
|
||||
If you are trying to build a whole package this is not the
|
||||
right script to run: please start by reading the file `INSTALL'.
|
||||
right script to run: please start by reading the file 'INSTALL'.
|
||||
|
||||
Report bugs to <bug-automake@gnu.org>.
|
||||
EOF
|
||||
@ -53,11 +255,13 @@ EOF
|
||||
echo "compile $scriptversion"
|
||||
exit $?
|
||||
;;
|
||||
cl | *[/\\]cl | cl.exe | *[/\\]cl.exe )
|
||||
func_cl_wrapper "$@" # Doesn't return...
|
||||
;;
|
||||
esac
|
||||
|
||||
ofile=
|
||||
cfile=
|
||||
eat=
|
||||
|
||||
for arg
|
||||
do
|
||||
@ -66,8 +270,8 @@ do
|
||||
else
|
||||
case $1 in
|
||||
-o)
|
||||
# configure might choose to run compile as `compile cc -o foo foo.c'.
|
||||
# So we strip `-o arg' only if arg is an object.
|
||||
# configure might choose to run compile as 'compile cc -o foo foo.c'.
|
||||
# So we strip '-o arg' only if arg is an object.
|
||||
eat=1
|
||||
case $2 in
|
||||
*.o | *.obj)
|
||||
@ -94,10 +298,10 @@ do
|
||||
done
|
||||
|
||||
if test -z "$ofile" || test -z "$cfile"; then
|
||||
# If no `-o' option was seen then we might have been invoked from a
|
||||
# If no '-o' option was seen then we might have been invoked from a
|
||||
# pattern rule where we don't need one. That is ok -- this is a
|
||||
# normal compilation that the losing compiler can handle. If no
|
||||
# `.c' file was seen then we are probably linking. That is also
|
||||
# '.c' file was seen then we are probably linking. That is also
|
||||
# ok.
|
||||
exec "$@"
|
||||
fi
|
||||
@ -106,7 +310,7 @@ fi
|
||||
cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'`
|
||||
|
||||
# Create the lock directory.
|
||||
# Note: use `[/\\:.-]' here to ensure that we don't use the same name
|
||||
# Note: use '[/\\:.-]' here to ensure that we don't use the same name
|
||||
# that we are using for the .o file. Also, base the name on the expected
|
||||
# object file name, since that is what matters with a parallel build.
|
||||
lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d
|
||||
|
1530
config.guess
vendored
Executable file
1530
config.guess
vendored
Executable file
File diff suppressed because it is too large
Load Diff
168
config.h.in
168
config.h.in
@ -1,14 +1,23 @@
|
||||
/* config.h.in. Generated from configure.ac by autoheader. */
|
||||
|
||||
/* Define if building universal (internal helper macro) */
|
||||
#undef AC_APPLE_UNIVERSAL_BUILD
|
||||
|
||||
/* Define in built-in ELF support is used */
|
||||
#undef BUILTIN_ELF
|
||||
|
||||
/* Define for ELF core file support */
|
||||
#undef ELFCORE
|
||||
|
||||
/* Define to 1 if you have the `asctime_r' function. */
|
||||
#undef HAVE_ASCTIME_R
|
||||
|
||||
/* Define to 1 if you have the `asprintf' function. */
|
||||
#undef HAVE_ASPRINTF
|
||||
|
||||
/* Define to 1 if you have the `ctime_r' function. */
|
||||
#undef HAVE_CTIME_R
|
||||
|
||||
/* HAVE_DAYLIGHT */
|
||||
#undef HAVE_DAYLIGHT
|
||||
|
||||
@ -29,6 +38,9 @@
|
||||
/* Define to 1 if you have the <fcntl.h> header file. */
|
||||
#undef HAVE_FCNTL_H
|
||||
|
||||
/* Define to 1 if you have the `fmtcheck' function. */
|
||||
#undef HAVE_FMTCHECK
|
||||
|
||||
/* Define to 1 if you have the `fork' function. */
|
||||
#undef HAVE_FORK
|
||||
|
||||
@ -44,11 +56,11 @@
|
||||
/* Define to 1 if you have the `getopt_long' function. */
|
||||
#undef HAVE_GETOPT_LONG
|
||||
|
||||
/* Define to 1 if the system has the type `int32_t'. */
|
||||
#undef HAVE_INT32_T
|
||||
/* Define to 1 if you have the `getpagesize' function. */
|
||||
#undef HAVE_GETPAGESIZE
|
||||
|
||||
/* Define to 1 if the system has the type `int64_t'. */
|
||||
#undef HAVE_INT64_T
|
||||
/* Define to 1 if the system has the type `intptr_t'. */
|
||||
#undef HAVE_INTPTR_T
|
||||
|
||||
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||
#undef HAVE_INTTYPES_H
|
||||
@ -65,7 +77,7 @@
|
||||
/* Define to 1 if you have the <locale.h> header file. */
|
||||
#undef HAVE_LOCALE_H
|
||||
|
||||
/* Define to 1 if you have the `mbrtowc' function. */
|
||||
/* Define to 1 if mbrtowc and mbstate_t are properly declared. */
|
||||
#undef HAVE_MBRTOWC
|
||||
|
||||
/* Define to 1 if <wchar.h> declares mbstate_t. */
|
||||
@ -74,14 +86,20 @@
|
||||
/* Define to 1 if you have the <memory.h> header file. */
|
||||
#undef HAVE_MEMORY_H
|
||||
|
||||
/* Define to 1 if you have the `mkostemp' function. */
|
||||
#undef HAVE_MKOSTEMP
|
||||
|
||||
/* Define to 1 if you have the `mkstemp' function. */
|
||||
#undef HAVE_MKSTEMP
|
||||
|
||||
/* Define to 1 if you have the `mmap' function. */
|
||||
/* Define to 1 if you have a working `mmap' system call. */
|
||||
#undef HAVE_MMAP
|
||||
|
||||
/* Define to 1 if the system has the type `pid_t'. */
|
||||
#undef HAVE_PID_T
|
||||
/* Define to 1 if you have the `pread' function. */
|
||||
#undef HAVE_PREAD
|
||||
|
||||
/* Define to 1 if you have the <stddef.h> header file. */
|
||||
#undef HAVE_STDDEF_H
|
||||
|
||||
/* Define to 1 if you have the <stdint.h> header file. */
|
||||
#undef HAVE_STDINT_H
|
||||
@ -89,6 +107,9 @@
|
||||
/* Define to 1 if you have the <stdlib.h> header file. */
|
||||
#undef HAVE_STDLIB_H
|
||||
|
||||
/* Define to 1 if you have the `strcasestr' function. */
|
||||
#undef HAVE_STRCASESTR
|
||||
|
||||
/* Define to 1 if you have the `strerror' function. */
|
||||
#undef HAVE_STRERROR
|
||||
|
||||
@ -128,6 +149,9 @@
|
||||
/* Define to 1 if you have the <sys/mman.h> header file. */
|
||||
#undef HAVE_SYS_MMAN_H
|
||||
|
||||
/* Define to 1 if you have the <sys/param.h> header file. */
|
||||
#undef HAVE_SYS_PARAM_H
|
||||
|
||||
/* Define to 1 if you have the <sys/stat.h> header file. */
|
||||
#undef HAVE_SYS_STAT_H
|
||||
|
||||
@ -152,17 +176,8 @@
|
||||
/* HAVE_TZNAME */
|
||||
#undef HAVE_TZNAME
|
||||
|
||||
/* Define to 1 if the system has the type `uint16_t'. */
|
||||
#undef HAVE_UINT16_T
|
||||
|
||||
/* Define to 1 if the system has the type `uint32_t'. */
|
||||
#undef HAVE_UINT32_T
|
||||
|
||||
/* Define to 1 if the system has the type `uint64_t'. */
|
||||
#undef HAVE_UINT64_T
|
||||
|
||||
/* Define to 1 if the system has the type `uint8_t'. */
|
||||
#undef HAVE_UINT8_T
|
||||
/* Define to 1 if the system has the type `uintptr_t'. */
|
||||
#undef HAVE_UINTPTR_T
|
||||
|
||||
/* Define to 1 if you have the <unistd.h> header file. */
|
||||
#undef HAVE_UNISTD_H
|
||||
@ -179,6 +194,16 @@
|
||||
/* Define to 1 if you have the `vasprintf' function. */
|
||||
#undef HAVE_VASPRINTF
|
||||
|
||||
/* Define to 1 if you have the `vfork' function. */
|
||||
#undef HAVE_VFORK
|
||||
|
||||
/* Define to 1 if you have the <vfork.h> header file. */
|
||||
#undef HAVE_VFORK_H
|
||||
|
||||
/* Define to 1 or 0, depending whether the compiler supports simple visibility
|
||||
declarations. */
|
||||
#undef HAVE_VISIBILITY
|
||||
|
||||
/* Define to 1 if you have the <wchar.h> header file. */
|
||||
#undef HAVE_WCHAR_H
|
||||
|
||||
@ -188,6 +213,12 @@
|
||||
/* Define to 1 if you have the `wcwidth' function. */
|
||||
#undef HAVE_WCWIDTH
|
||||
|
||||
/* Define to 1 if `fork' works. */
|
||||
#undef HAVE_WORKING_FORK
|
||||
|
||||
/* Define to 1 if `vfork' works. */
|
||||
#undef HAVE_WORKING_VFORK
|
||||
|
||||
/* Define to 1 if you have the <zlib.h> header file. */
|
||||
#undef HAVE_ZLIB_H
|
||||
|
||||
@ -203,9 +234,6 @@
|
||||
<sysmacros.h>. */
|
||||
#undef MAJOR_IN_SYSMACROS
|
||||
|
||||
/* Define to 1 if your C compiler doesn't accept -c and -o together. */
|
||||
#undef NO_MINUS_C_MINUS_O
|
||||
|
||||
/* Name of package */
|
||||
#undef PACKAGE
|
||||
|
||||
@ -227,9 +255,6 @@
|
||||
/* Define to the version of this package. */
|
||||
#undef PACKAGE_VERSION
|
||||
|
||||
/* The size of `long long', as computed by sizeof. */
|
||||
#undef SIZEOF_LONG_LONG
|
||||
|
||||
/* Define to 1 if you have the ANSI C header files. */
|
||||
#undef STDC_HEADERS
|
||||
|
||||
@ -261,6 +286,23 @@
|
||||
/* Version number of package */
|
||||
#undef VERSION
|
||||
|
||||
/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
|
||||
significant byte first (like Motorola and SPARC, unlike Intel). */
|
||||
#if defined AC_APPLE_UNIVERSAL_BUILD
|
||||
# if defined __BIG_ENDIAN__
|
||||
# define WORDS_BIGENDIAN 1
|
||||
# endif
|
||||
#else
|
||||
# ifndef WORDS_BIGENDIAN
|
||||
# undef WORDS_BIGENDIAN
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* Enable large inode numbers on Mac OS X 10.5. */
|
||||
#ifndef _DARWIN_USE_64_BIT_INODE
|
||||
# define _DARWIN_USE_64_BIT_INODE 1
|
||||
#endif
|
||||
|
||||
/* Number of bits in a file offset, on hosts where this is settable. */
|
||||
#undef _FILE_OFFSET_BITS
|
||||
|
||||
@ -280,43 +322,67 @@
|
||||
/* Define to 1 if you need to in order for `stat' and other things to work. */
|
||||
#undef _POSIX_SOURCE
|
||||
|
||||
/* Define for Solaris 2.5.1 so the uint32_t typedef from <sys/synch.h>,
|
||||
<pthread.h>, or <semaphore.h> is not used. If the typedef were allowed, the
|
||||
#define below would cause a syntax error. */
|
||||
#undef _UINT32_T
|
||||
|
||||
/* Define for Solaris 2.5.1 so the uint64_t typedef from <sys/synch.h>,
|
||||
<pthread.h>, or <semaphore.h> is not used. If the typedef were allowed, the
|
||||
#define below would cause a syntax error. */
|
||||
#undef _UINT64_T
|
||||
|
||||
/* Define for Solaris 2.5.1 so the uint8_t typedef from <sys/synch.h>,
|
||||
<pthread.h>, or <semaphore.h> is not used. If the typedef were allowed, the
|
||||
#define below would cause a syntax error. */
|
||||
#undef _UINT8_T
|
||||
|
||||
/* Define to empty if `const' does not conform to ANSI C. */
|
||||
#undef const
|
||||
|
||||
/* Define to the type of a signed integer type of width exactly 32 bits if
|
||||
such a type exists and the standard includes do not define it. */
|
||||
#undef int32_t
|
||||
|
||||
/* Define to the type of a signed integer type of width exactly 64 bits if
|
||||
such a type exists and the standard includes do not define it. */
|
||||
#undef int64_t
|
||||
|
||||
/* Define to the type of a signed integer type wide enough to hold a pointer,
|
||||
if such a type exists, and if the system does not define it. */
|
||||
#undef intptr_t
|
||||
|
||||
/* Define to a type if <wchar.h> does not define. */
|
||||
#undef mbstate_t
|
||||
|
||||
/* Define to `long int' if <sys/types.h> does not define. */
|
||||
#undef off_t
|
||||
|
||||
/* Define to `int' if <sys/types.h> does not define. */
|
||||
#undef pid_t
|
||||
|
||||
/* Define to `unsigned int' if <sys/types.h> does not define. */
|
||||
#undef size_t
|
||||
|
||||
/* Define to the type of an unsigned integer type of width exactly 16 bits if
|
||||
such a type exists and the standard includes do not define it. */
|
||||
#undef uint16_t
|
||||
|
||||
#ifndef HAVE_UINT8_T
|
||||
typedef unsigned char uint8_t;
|
||||
#endif
|
||||
#ifndef HAVE_UINT16_T
|
||||
typedef unsigned short uint16_t;
|
||||
#endif
|
||||
#ifndef HAVE_UINT32_T
|
||||
typedef unsigned int uint32_t;
|
||||
#endif
|
||||
#ifndef HAVE_INT32_T
|
||||
typedef int int32_t;
|
||||
#endif
|
||||
#ifndef HAVE_UINT64_T
|
||||
#if SIZEOF_LONG_LONG == 8
|
||||
typedef unsigned long long uint64_t;
|
||||
#else
|
||||
typedef unsigned long uint64_t;
|
||||
#endif
|
||||
#endif
|
||||
#ifndef HAVE_INT64_T
|
||||
#if SIZEOF_LONG_LONG == 8
|
||||
typedef long long int64_t;
|
||||
#else
|
||||
typedef long int64_t;
|
||||
#endif
|
||||
#endif
|
||||
/* Define to the type of an unsigned integer type of width exactly 32 bits if
|
||||
such a type exists and the standard includes do not define it. */
|
||||
#undef uint32_t
|
||||
|
||||
/* Define to the type of an unsigned integer type of width exactly 64 bits if
|
||||
such a type exists and the standard includes do not define it. */
|
||||
#undef uint64_t
|
||||
|
||||
/* Define to the type of an unsigned integer type of width exactly 8 bits if
|
||||
such a type exists and the standard includes do not define it. */
|
||||
#undef uint8_t
|
||||
|
||||
/* Define to the type of an unsigned integer type wide enough to hold a
|
||||
pointer, if such a type exists, and if the system does not define it. */
|
||||
#undef uintptr_t
|
||||
|
||||
/* Define as `fork' if `vfork' does not work. */
|
||||
#undef vfork
|
||||
|
1779
config.sub
vendored
Executable file
1779
config.sub
vendored
Executable file
File diff suppressed because it is too large
Load Diff
68
configure.ac
68
configure.ac
@ -1,9 +1,9 @@
|
||||
dnl Process this file with autoconf to produce a configure script.
|
||||
AC_INIT(file, 5.11, christos@astron.com)
|
||||
AM_INIT_AUTOMAKE()
|
||||
AC_INIT([file],[5.19],[christos@astron.com])
|
||||
AM_INIT_AUTOMAKE([subdir-objects foreign])
|
||||
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
|
||||
|
||||
AM_CONFIG_HEADER(config.h)
|
||||
AC_CONFIG_HEADERS([config.h])
|
||||
AC_CONFIG_MACRO_DIR([m4])
|
||||
|
||||
AC_MSG_CHECKING(for builtin ELF support)
|
||||
@ -66,21 +66,22 @@ AC_SUBST(fsect)
|
||||
AM_CONDITIONAL(FSECT5, test x$fsect = x5)
|
||||
|
||||
AC_SUBST(WARNINGS)
|
||||
AC_GNU_SOURCE
|
||||
|
||||
dnl Checks for programs.
|
||||
AC_PROG_CC
|
||||
AC_PROG_CC_STDC
|
||||
AC_USE_SYSTEM_EXTENSIONS
|
||||
AM_PROG_CC_C_O
|
||||
AC_C_BIGENDIAN
|
||||
AC_PROG_INSTALL
|
||||
AC_PROG_LN_S
|
||||
AC_PROG_LIBTOOL
|
||||
|
||||
LT_INIT([disable-static pic-only])
|
||||
gl_VISIBILITY
|
||||
dnl Checks for headers
|
||||
AC_HEADER_STDC
|
||||
AC_HEADER_MAJOR
|
||||
AC_HEADER_SYS_WAIT
|
||||
AC_CHECK_HEADERS(stdint.h fcntl.h locale.h stdint.h inttypes.h unistd.h)
|
||||
AC_CHECK_HEADERS(utime.h wchar.h wctype.h limits.h)
|
||||
AC_CHECK_HEADERS(stddef.h utime.h wchar.h wctype.h limits.h)
|
||||
AC_CHECK_HEADERS(getopt.h err.h)
|
||||
AC_CHECK_HEADERS(sys/mman.h sys/stat.h sys/types.h sys/utime.h sys/time.h)
|
||||
AC_CHECK_HEADERS(zlib.h)
|
||||
@ -91,45 +92,26 @@ AC_TYPE_OFF_T
|
||||
AC_TYPE_SIZE_T
|
||||
AC_CHECK_MEMBERS([struct stat.st_rdev])
|
||||
|
||||
AC_STRUCT_TM
|
||||
AC_CHECK_MEMBERS([struct tm.tm_gmtoff, struct tm.tm_zone])
|
||||
AC_CHECK_MEMBERS([struct tm.tm_gmtoff])
|
||||
AC_STRUCT_TIMEZONE
|
||||
AC_STRUCT_TIMEZONE_DAYLIGHT
|
||||
AC_SYS_LARGEFILE
|
||||
AC_FUNC_FSEEKO
|
||||
AC_TYPE_MBSTATE_T
|
||||
|
||||
AC_STRUCT_OPTION_GETOPT_H
|
||||
|
||||
AC_CHECK_TYPES([pid_t, uint8_t, uint16_t, uint32_t, int32_t, uint64_t, int64_t])
|
||||
AC_CHECK_SIZEOF(long long)
|
||||
AH_BOTTOM([
|
||||
#ifndef HAVE_UINT8_T
|
||||
typedef unsigned char uint8_t;
|
||||
#endif
|
||||
#ifndef HAVE_UINT16_T
|
||||
typedef unsigned short uint16_t;
|
||||
#endif
|
||||
#ifndef HAVE_UINT32_T
|
||||
typedef unsigned int uint32_t;
|
||||
#endif
|
||||
#ifndef HAVE_INT32_T
|
||||
typedef int int32_t;
|
||||
#endif
|
||||
#ifndef HAVE_UINT64_T
|
||||
#if SIZEOF_LONG_LONG == 8
|
||||
typedef unsigned long long uint64_t;
|
||||
#else
|
||||
typedef unsigned long uint64_t;
|
||||
#endif
|
||||
#endif
|
||||
#ifndef HAVE_INT64_T
|
||||
#if SIZEOF_LONG_LONG == 8
|
||||
typedef long long int64_t;
|
||||
#else
|
||||
typedef long int64_t;
|
||||
#endif
|
||||
#endif
|
||||
])
|
||||
AC_TYPE_PID_T
|
||||
AC_TYPE_UINT8_T
|
||||
AC_TYPE_UINT16_T
|
||||
AC_TYPE_UINT32_T
|
||||
AC_TYPE_INT32_T
|
||||
AC_TYPE_UINT64_T
|
||||
AC_TYPE_INT64_T
|
||||
AC_TYPE_INTPTR_T
|
||||
AC_TYPE_UINTPTR_T
|
||||
AC_FUNC_MMAP
|
||||
AC_FUNC_FORK
|
||||
AC_FUNC_MBRTOWC
|
||||
|
||||
AC_MSG_CHECKING(for gcc compiler warnings)
|
||||
AC_ARG_ENABLE(warnings,
|
||||
@ -156,10 +138,10 @@ else
|
||||
fi])
|
||||
|
||||
dnl Checks for functions
|
||||
AC_CHECK_FUNCS(mmap strerror strndup strtoul mbrtowc mkstemp utimes utime wcwidth strtof fork)
|
||||
AC_CHECK_FUNCS(strerror strndup strtoul mkstemp mkostemp utimes utime wcwidth strtof)
|
||||
|
||||
dnl Provide implementation of some required functions if necessary
|
||||
AC_REPLACE_FUNCS(getopt_long asprintf vasprintf strlcpy strlcat getline)
|
||||
AC_REPLACE_FUNCS(getopt_long asprintf vasprintf strlcpy strlcat getline ctime_r asctime_r pread strcasestr fmtcheck)
|
||||
|
||||
dnl Checks for libraries
|
||||
AC_CHECK_LIB(z,gzopen)
|
||||
|
791
depcomp
Executable file
791
depcomp
Executable file
@ -0,0 +1,791 @@
|
||||
#! /bin/sh
|
||||
# depcomp - compile a program generating dependencies as side-effects
|
||||
|
||||
scriptversion=2013-05-30.07; # UTC
|
||||
|
||||
# Copyright (C) 1999-2013 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
|
||||
|
||||
case $1 in
|
||||
'')
|
||||
echo "$0: No command. Try '$0 --help' for more information." 1>&2
|
||||
exit 1;
|
||||
;;
|
||||
-h | --h*)
|
||||
cat <<\EOF
|
||||
Usage: depcomp [--help] [--version] PROGRAM [ARGS]
|
||||
|
||||
Run PROGRAMS ARGS to compile a file, generating dependencies
|
||||
as side-effects.
|
||||
|
||||
Environment variables:
|
||||
depmode Dependency tracking mode.
|
||||
source Source file read by 'PROGRAMS ARGS'.
|
||||
object Object file output by 'PROGRAMS ARGS'.
|
||||
DEPDIR directory where to store dependencies.
|
||||
depfile Dependency file to output.
|
||||
tmpdepfile Temporary file to use when outputting dependencies.
|
||||
libtool Whether libtool is used (yes/no).
|
||||
|
||||
Report bugs to <bug-automake@gnu.org>.
|
||||
EOF
|
||||
exit $?
|
||||
;;
|
||||
-v | --v*)
|
||||
echo "depcomp $scriptversion"
|
||||
exit $?
|
||||
;;
|
||||
esac
|
||||
|
||||
# Get the directory component of the given path, and save it in the
|
||||
# global variables '$dir'. Note that this directory component will
|
||||
# be either empty or ending with a '/' character. This is deliberate.
|
||||
set_dir_from ()
|
||||
{
|
||||
case $1 in
|
||||
*/*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;;
|
||||
*) dir=;;
|
||||
esac
|
||||
}
|
||||
|
||||
# Get the suffix-stripped basename of the given path, and save it the
|
||||
# global variable '$base'.
|
||||
set_base_from ()
|
||||
{
|
||||
base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'`
|
||||
}
|
||||
|
||||
# If no dependency file was actually created by the compiler invocation,
|
||||
# we still have to create a dummy depfile, to avoid errors with the
|
||||
# Makefile "include basename.Plo" scheme.
|
||||
make_dummy_depfile ()
|
||||
{
|
||||
echo "#dummy" > "$depfile"
|
||||
}
|
||||
|
||||
# Factor out some common post-processing of the generated depfile.
|
||||
# Requires the auxiliary global variable '$tmpdepfile' to be set.
|
||||
aix_post_process_depfile ()
|
||||
{
|
||||
# If the compiler actually managed to produce a dependency file,
|
||||
# post-process it.
|
||||
if test -f "$tmpdepfile"; then
|
||||
# Each line is of the form 'foo.o: dependency.h'.
|
||||
# Do two passes, one to just change these to
|
||||
# $object: dependency.h
|
||||
# and one to simply output
|
||||
# dependency.h:
|
||||
# which is needed to avoid the deleted-header problem.
|
||||
{ sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile"
|
||||
sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile"
|
||||
} > "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
else
|
||||
make_dummy_depfile
|
||||
fi
|
||||
}
|
||||
|
||||
# A tabulation character.
|
||||
tab=' '
|
||||
# A newline character.
|
||||
nl='
|
||||
'
|
||||
# Character ranges might be problematic outside the C locale.
|
||||
# These definitions help.
|
||||
upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ
|
||||
lower=abcdefghijklmnopqrstuvwxyz
|
||||
digits=0123456789
|
||||
alpha=${upper}${lower}
|
||||
|
||||
if test -z "$depmode" || test -z "$source" || test -z "$object"; then
|
||||
echo "depcomp: Variables source, object and depmode must be set" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po.
|
||||
depfile=${depfile-`echo "$object" |
|
||||
sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`}
|
||||
tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
|
||||
|
||||
rm -f "$tmpdepfile"
|
||||
|
||||
# Avoid interferences from the environment.
|
||||
gccflag= dashmflag=
|
||||
|
||||
# Some modes work just like other modes, but use different flags. We
|
||||
# parameterize here, but still list the modes in the big case below,
|
||||
# to make depend.m4 easier to write. Note that we *cannot* use a case
|
||||
# here, because this file can only contain one case statement.
|
||||
if test "$depmode" = hp; then
|
||||
# HP compiler uses -M and no extra arg.
|
||||
gccflag=-M
|
||||
depmode=gcc
|
||||
fi
|
||||
|
||||
if test "$depmode" = dashXmstdout; then
|
||||
# This is just like dashmstdout with a different argument.
|
||||
dashmflag=-xM
|
||||
depmode=dashmstdout
|
||||
fi
|
||||
|
||||
cygpath_u="cygpath -u -f -"
|
||||
if test "$depmode" = msvcmsys; then
|
||||
# This is just like msvisualcpp but w/o cygpath translation.
|
||||
# Just convert the backslash-escaped backslashes to single forward
|
||||
# slashes to satisfy depend.m4
|
||||
cygpath_u='sed s,\\\\,/,g'
|
||||
depmode=msvisualcpp
|
||||
fi
|
||||
|
||||
if test "$depmode" = msvc7msys; then
|
||||
# This is just like msvc7 but w/o cygpath translation.
|
||||
# Just convert the backslash-escaped backslashes to single forward
|
||||
# slashes to satisfy depend.m4
|
||||
cygpath_u='sed s,\\\\,/,g'
|
||||
depmode=msvc7
|
||||
fi
|
||||
|
||||
if test "$depmode" = xlc; then
|
||||
# IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information.
|
||||
gccflag=-qmakedep=gcc,-MF
|
||||
depmode=gcc
|
||||
fi
|
||||
|
||||
case "$depmode" in
|
||||
gcc3)
|
||||
## gcc 3 implements dependency tracking that does exactly what
|
||||
## we want. Yay! Note: for some reason libtool 1.4 doesn't like
|
||||
## it if -MD -MP comes after the -MF stuff. Hmm.
|
||||
## Unfortunately, FreeBSD c89 acceptance of flags depends upon
|
||||
## the command line argument order; so add the flags where they
|
||||
## appear in depend2.am. Note that the slowdown incurred here
|
||||
## affects only configure: in makefiles, %FASTDEP% shortcuts this.
|
||||
for arg
|
||||
do
|
||||
case $arg in
|
||||
-c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;;
|
||||
*) set fnord "$@" "$arg" ;;
|
||||
esac
|
||||
shift # fnord
|
||||
shift # $arg
|
||||
done
|
||||
"$@"
|
||||
stat=$?
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
mv "$tmpdepfile" "$depfile"
|
||||
;;
|
||||
|
||||
gcc)
|
||||
## Note that this doesn't just cater to obsosete pre-3.x GCC compilers.
|
||||
## but also to in-use compilers like IMB xlc/xlC and the HP C compiler.
|
||||
## (see the conditional assignment to $gccflag above).
|
||||
## There are various ways to get dependency output from gcc. Here's
|
||||
## why we pick this rather obscure method:
|
||||
## - Don't want to use -MD because we'd like the dependencies to end
|
||||
## up in a subdir. Having to rename by hand is ugly.
|
||||
## (We might end up doing this anyway to support other compilers.)
|
||||
## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
|
||||
## -MM, not -M (despite what the docs say). Also, it might not be
|
||||
## supported by the other compilers which use the 'gcc' depmode.
|
||||
## - Using -M directly means running the compiler twice (even worse
|
||||
## than renaming).
|
||||
if test -z "$gccflag"; then
|
||||
gccflag=-MD,
|
||||
fi
|
||||
"$@" -Wp,"$gccflag$tmpdepfile"
|
||||
stat=$?
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
# The second -e expression handles DOS-style file names with drive
|
||||
# letters.
|
||||
sed -e 's/^[^:]*: / /' \
|
||||
-e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
|
||||
## This next piece of magic avoids the "deleted header file" problem.
|
||||
## The problem is that when a header file which appears in a .P file
|
||||
## is deleted, the dependency causes make to die (because there is
|
||||
## typically no way to rebuild the header). We avoid this by adding
|
||||
## dummy dependencies for each header file. Too bad gcc doesn't do
|
||||
## this for us directly.
|
||||
## Some versions of gcc put a space before the ':'. On the theory
|
||||
## that the space means something, we add a space to the output as
|
||||
## well. hp depmode also adds that space, but also prefixes the VPATH
|
||||
## to the object. Take care to not repeat it in the output.
|
||||
## Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
## correctly. Breaking it into two sed invocations is a workaround.
|
||||
tr ' ' "$nl" < "$tmpdepfile" \
|
||||
| sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \
|
||||
| sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
hp)
|
||||
# This case exists only to let depend.m4 do its work. It works by
|
||||
# looking at the text of this script. This case will never be run,
|
||||
# since it is checked for above.
|
||||
exit 1
|
||||
;;
|
||||
|
||||
sgi)
|
||||
if test "$libtool" = yes; then
|
||||
"$@" "-Wp,-MDupdate,$tmpdepfile"
|
||||
else
|
||||
"$@" -MDupdate "$tmpdepfile"
|
||||
fi
|
||||
stat=$?
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
|
||||
if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
|
||||
echo "$object : \\" > "$depfile"
|
||||
# Clip off the initial element (the dependent). Don't try to be
|
||||
# clever and replace this with sed code, as IRIX sed won't handle
|
||||
# lines with more than a fixed number of characters (4096 in
|
||||
# IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines;
|
||||
# the IRIX cc adds comments like '#:fec' to the end of the
|
||||
# dependency line.
|
||||
tr ' ' "$nl" < "$tmpdepfile" \
|
||||
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \
|
||||
| tr "$nl" ' ' >> "$depfile"
|
||||
echo >> "$depfile"
|
||||
# The second pass generates a dummy entry for each header file.
|
||||
tr ' ' "$nl" < "$tmpdepfile" \
|
||||
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
|
||||
>> "$depfile"
|
||||
else
|
||||
make_dummy_depfile
|
||||
fi
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
xlc)
|
||||
# This case exists only to let depend.m4 do its work. It works by
|
||||
# looking at the text of this script. This case will never be run,
|
||||
# since it is checked for above.
|
||||
exit 1
|
||||
;;
|
||||
|
||||
aix)
|
||||
# The C for AIX Compiler uses -M and outputs the dependencies
|
||||
# in a .u file. In older versions, this file always lives in the
|
||||
# current directory. Also, the AIX compiler puts '$object:' at the
|
||||
# start of each line; $object doesn't have directory information.
|
||||
# Version 6 uses the directory in both cases.
|
||||
set_dir_from "$object"
|
||||
set_base_from "$object"
|
||||
if test "$libtool" = yes; then
|
||||
tmpdepfile1=$dir$base.u
|
||||
tmpdepfile2=$base.u
|
||||
tmpdepfile3=$dir.libs/$base.u
|
||||
"$@" -Wc,-M
|
||||
else
|
||||
tmpdepfile1=$dir$base.u
|
||||
tmpdepfile2=$dir$base.u
|
||||
tmpdepfile3=$dir$base.u
|
||||
"$@" -M
|
||||
fi
|
||||
stat=$?
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
|
||||
exit $stat
|
||||
fi
|
||||
|
||||
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
|
||||
do
|
||||
test -f "$tmpdepfile" && break
|
||||
done
|
||||
aix_post_process_depfile
|
||||
;;
|
||||
|
||||
tcc)
|
||||
# tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26
|
||||
# FIXME: That version still under development at the moment of writing.
|
||||
# Make that this statement remains true also for stable, released
|
||||
# versions.
|
||||
# It will wrap lines (doesn't matter whether long or short) with a
|
||||
# trailing '\', as in:
|
||||
#
|
||||
# foo.o : \
|
||||
# foo.c \
|
||||
# foo.h \
|
||||
#
|
||||
# It will put a trailing '\' even on the last line, and will use leading
|
||||
# spaces rather than leading tabs (at least since its commit 0394caf7
|
||||
# "Emit spaces for -MD").
|
||||
"$@" -MD -MF "$tmpdepfile"
|
||||
stat=$?
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
# Each non-empty line is of the form 'foo.o : \' or ' dep.h \'.
|
||||
# We have to change lines of the first kind to '$object: \'.
|
||||
sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile"
|
||||
# And for each line of the second kind, we have to emit a 'dep.h:'
|
||||
# dummy dependency, to avoid the deleted-header problem.
|
||||
sed -n -e 's|^ *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
## The order of this option in the case statement is important, since the
|
||||
## shell code in configure will try each of these formats in the order
|
||||
## listed in this file. A plain '-MD' option would be understood by many
|
||||
## compilers, so we must ensure this comes after the gcc and icc options.
|
||||
pgcc)
|
||||
# Portland's C compiler understands '-MD'.
|
||||
# Will always output deps to 'file.d' where file is the root name of the
|
||||
# source file under compilation, even if file resides in a subdirectory.
|
||||
# The object file name does not affect the name of the '.d' file.
|
||||
# pgcc 10.2 will output
|
||||
# foo.o: sub/foo.c sub/foo.h
|
||||
# and will wrap long lines using '\' :
|
||||
# foo.o: sub/foo.c ... \
|
||||
# sub/foo.h ... \
|
||||
# ...
|
||||
set_dir_from "$object"
|
||||
# Use the source, not the object, to determine the base name, since
|
||||
# that's sadly what pgcc will do too.
|
||||
set_base_from "$source"
|
||||
tmpdepfile=$base.d
|
||||
|
||||
# For projects that build the same source file twice into different object
|
||||
# files, the pgcc approach of using the *source* file root name can cause
|
||||
# problems in parallel builds. Use a locking strategy to avoid stomping on
|
||||
# the same $tmpdepfile.
|
||||
lockdir=$base.d-lock
|
||||
trap "
|
||||
echo '$0: caught signal, cleaning up...' >&2
|
||||
rmdir '$lockdir'
|
||||
exit 1
|
||||
" 1 2 13 15
|
||||
numtries=100
|
||||
i=$numtries
|
||||
while test $i -gt 0; do
|
||||
# mkdir is a portable test-and-set.
|
||||
if mkdir "$lockdir" 2>/dev/null; then
|
||||
# This process acquired the lock.
|
||||
"$@" -MD
|
||||
stat=$?
|
||||
# Release the lock.
|
||||
rmdir "$lockdir"
|
||||
break
|
||||
else
|
||||
# If the lock is being held by a different process, wait
|
||||
# until the winning process is done or we timeout.
|
||||
while test -d "$lockdir" && test $i -gt 0; do
|
||||
sleep 1
|
||||
i=`expr $i - 1`
|
||||
done
|
||||
fi
|
||||
i=`expr $i - 1`
|
||||
done
|
||||
trap - 1 2 13 15
|
||||
if test $i -le 0; then
|
||||
echo "$0: failed to acquire lock after $numtries attempts" >&2
|
||||
echo "$0: check lockdir '$lockdir'" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
# Each line is of the form `foo.o: dependent.h',
|
||||
# or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
|
||||
# Do two passes, one to just change these to
|
||||
# `$object: dependent.h' and one to simply `dependent.h:'.
|
||||
sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
|
||||
# Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
# correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" \
|
||||
| sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
hp2)
|
||||
# The "hp" stanza above does not work with aCC (C++) and HP's ia64
|
||||
# compilers, which have integrated preprocessors. The correct option
|
||||
# to use with these is +Maked; it writes dependencies to a file named
|
||||
# 'foo.d', which lands next to the object file, wherever that
|
||||
# happens to be.
|
||||
# Much of this is similar to the tru64 case; see comments there.
|
||||
set_dir_from "$object"
|
||||
set_base_from "$object"
|
||||
if test "$libtool" = yes; then
|
||||
tmpdepfile1=$dir$base.d
|
||||
tmpdepfile2=$dir.libs/$base.d
|
||||
"$@" -Wc,+Maked
|
||||
else
|
||||
tmpdepfile1=$dir$base.d
|
||||
tmpdepfile2=$dir$base.d
|
||||
"$@" +Maked
|
||||
fi
|
||||
stat=$?
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile1" "$tmpdepfile2"
|
||||
exit $stat
|
||||
fi
|
||||
|
||||
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2"
|
||||
do
|
||||
test -f "$tmpdepfile" && break
|
||||
done
|
||||
if test -f "$tmpdepfile"; then
|
||||
sed -e "s,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile"
|
||||
# Add 'dependent.h:' lines.
|
||||
sed -ne '2,${
|
||||
s/^ *//
|
||||
s/ \\*$//
|
||||
s/$/:/
|
||||
p
|
||||
}' "$tmpdepfile" >> "$depfile"
|
||||
else
|
||||
make_dummy_depfile
|
||||
fi
|
||||
rm -f "$tmpdepfile" "$tmpdepfile2"
|
||||
;;
|
||||
|
||||
tru64)
|
||||
# The Tru64 compiler uses -MD to generate dependencies as a side
|
||||
# effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'.
|
||||
# At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
|
||||
# dependencies in 'foo.d' instead, so we check for that too.
|
||||
# Subdirectories are respected.
|
||||
set_dir_from "$object"
|
||||
set_base_from "$object"
|
||||
|
||||
if test "$libtool" = yes; then
|
||||
# Libtool generates 2 separate objects for the 2 libraries. These
|
||||
# two compilations output dependencies in $dir.libs/$base.o.d and
|
||||
# in $dir$base.o.d. We have to check for both files, because
|
||||
# one of the two compilations can be disabled. We should prefer
|
||||
# $dir$base.o.d over $dir.libs/$base.o.d because the latter is
|
||||
# automatically cleaned when .libs/ is deleted, while ignoring
|
||||
# the former would cause a distcleancheck panic.
|
||||
tmpdepfile1=$dir$base.o.d # libtool 1.5
|
||||
tmpdepfile2=$dir.libs/$base.o.d # Likewise.
|
||||
tmpdepfile3=$dir.libs/$base.d # Compaq CCC V6.2-504
|
||||
"$@" -Wc,-MD
|
||||
else
|
||||
tmpdepfile1=$dir$base.d
|
||||
tmpdepfile2=$dir$base.d
|
||||
tmpdepfile3=$dir$base.d
|
||||
"$@" -MD
|
||||
fi
|
||||
|
||||
stat=$?
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
|
||||
exit $stat
|
||||
fi
|
||||
|
||||
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
|
||||
do
|
||||
test -f "$tmpdepfile" && break
|
||||
done
|
||||
# Same post-processing that is required for AIX mode.
|
||||
aix_post_process_depfile
|
||||
;;
|
||||
|
||||
msvc7)
|
||||
if test "$libtool" = yes; then
|
||||
showIncludes=-Wc,-showIncludes
|
||||
else
|
||||
showIncludes=-showIncludes
|
||||
fi
|
||||
"$@" $showIncludes > "$tmpdepfile"
|
||||
stat=$?
|
||||
grep -v '^Note: including file: ' "$tmpdepfile"
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
# The first sed program below extracts the file names and escapes
|
||||
# backslashes for cygpath. The second sed program outputs the file
|
||||
# name when reading, but also accumulates all include files in the
|
||||
# hold buffer in order to output them again at the end. This only
|
||||
# works with sed implementations that can handle large buffers.
|
||||
sed < "$tmpdepfile" -n '
|
||||
/^Note: including file: *\(.*\)/ {
|
||||
s//\1/
|
||||
s/\\/\\\\/g
|
||||
p
|
||||
}' | $cygpath_u | sort -u | sed -n '
|
||||
s/ /\\ /g
|
||||
s/\(.*\)/'"$tab"'\1 \\/p
|
||||
s/.\(.*\) \\/\1:/
|
||||
H
|
||||
$ {
|
||||
s/.*/'"$tab"'/
|
||||
G
|
||||
p
|
||||
}' >> "$depfile"
|
||||
echo >> "$depfile" # make sure the fragment doesn't end with a backslash
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
msvc7msys)
|
||||
# This case exists only to let depend.m4 do its work. It works by
|
||||
# looking at the text of this script. This case will never be run,
|
||||
# since it is checked for above.
|
||||
exit 1
|
||||
;;
|
||||
|
||||
#nosideeffect)
|
||||
# This comment above is used by automake to tell side-effect
|
||||
# dependency tracking mechanisms from slower ones.
|
||||
|
||||
dashmstdout)
|
||||
# Important note: in order to support this mode, a compiler *must*
|
||||
# always write the preprocessed file to stdout, regardless of -o.
|
||||
"$@" || exit $?
|
||||
|
||||
# Remove the call to Libtool.
|
||||
if test "$libtool" = yes; then
|
||||
while test "X$1" != 'X--mode=compile'; do
|
||||
shift
|
||||
done
|
||||
shift
|
||||
fi
|
||||
|
||||
# Remove '-o $object'.
|
||||
IFS=" "
|
||||
for arg
|
||||
do
|
||||
case $arg in
|
||||
-o)
|
||||
shift
|
||||
;;
|
||||
$object)
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"
|
||||
shift # fnord
|
||||
shift # $arg
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
test -z "$dashmflag" && dashmflag=-M
|
||||
# Require at least two characters before searching for ':'
|
||||
# in the target name. This is to cope with DOS-style filenames:
|
||||
# a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise.
|
||||
"$@" $dashmflag |
|
||||
sed "s|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$object: |" > "$tmpdepfile"
|
||||
rm -f "$depfile"
|
||||
cat < "$tmpdepfile" > "$depfile"
|
||||
# Some versions of the HPUX 10.20 sed can't process this sed invocation
|
||||
# correctly. Breaking it into two sed invocations is a workaround.
|
||||
tr ' ' "$nl" < "$tmpdepfile" \
|
||||
| sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \
|
||||
| sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
dashXmstdout)
|
||||
# This case only exists to satisfy depend.m4. It is never actually
|
||||
# run, as this mode is specially recognized in the preamble.
|
||||
exit 1
|
||||
;;
|
||||
|
||||
makedepend)
|
||||
"$@" || exit $?
|
||||
# Remove any Libtool call
|
||||
if test "$libtool" = yes; then
|
||||
while test "X$1" != 'X--mode=compile'; do
|
||||
shift
|
||||
done
|
||||
shift
|
||||
fi
|
||||
# X makedepend
|
||||
shift
|
||||
cleared=no eat=no
|
||||
for arg
|
||||
do
|
||||
case $cleared in
|
||||
no)
|
||||
set ""; shift
|
||||
cleared=yes ;;
|
||||
esac
|
||||
if test $eat = yes; then
|
||||
eat=no
|
||||
continue
|
||||
fi
|
||||
case "$arg" in
|
||||
-D*|-I*)
|
||||
set fnord "$@" "$arg"; shift ;;
|
||||
# Strip any option that makedepend may not understand. Remove
|
||||
# the object too, otherwise makedepend will parse it as a source file.
|
||||
-arch)
|
||||
eat=yes ;;
|
||||
-*|$object)
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"; shift ;;
|
||||
esac
|
||||
done
|
||||
obj_suffix=`echo "$object" | sed 's/^.*\././'`
|
||||
touch "$tmpdepfile"
|
||||
${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
|
||||
rm -f "$depfile"
|
||||
# makedepend may prepend the VPATH from the source file name to the object.
|
||||
# No need to regex-escape $object, excess matching of '.' is harmless.
|
||||
sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile"
|
||||
# Some versions of the HPUX 10.20 sed can't process the last invocation
|
||||
# correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed '1,2d' "$tmpdepfile" \
|
||||
| tr ' ' "$nl" \
|
||||
| sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \
|
||||
| sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile" "$tmpdepfile".bak
|
||||
;;
|
||||
|
||||
cpp)
|
||||
# Important note: in order to support this mode, a compiler *must*
|
||||
# always write the preprocessed file to stdout.
|
||||
"$@" || exit $?
|
||||
|
||||
# Remove the call to Libtool.
|
||||
if test "$libtool" = yes; then
|
||||
while test "X$1" != 'X--mode=compile'; do
|
||||
shift
|
||||
done
|
||||
shift
|
||||
fi
|
||||
|
||||
# Remove '-o $object'.
|
||||
IFS=" "
|
||||
for arg
|
||||
do
|
||||
case $arg in
|
||||
-o)
|
||||
shift
|
||||
;;
|
||||
$object)
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"
|
||||
shift # fnord
|
||||
shift # $arg
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
"$@" -E \
|
||||
| sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
|
||||
-e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
|
||||
| sed '$ s: \\$::' > "$tmpdepfile"
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
cat < "$tmpdepfile" >> "$depfile"
|
||||
sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
msvisualcpp)
|
||||
# Important note: in order to support this mode, a compiler *must*
|
||||
# always write the preprocessed file to stdout.
|
||||
"$@" || exit $?
|
||||
|
||||
# Remove the call to Libtool.
|
||||
if test "$libtool" = yes; then
|
||||
while test "X$1" != 'X--mode=compile'; do
|
||||
shift
|
||||
done
|
||||
shift
|
||||
fi
|
||||
|
||||
IFS=" "
|
||||
for arg
|
||||
do
|
||||
case "$arg" in
|
||||
-o)
|
||||
shift
|
||||
;;
|
||||
$object)
|
||||
shift
|
||||
;;
|
||||
"-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
|
||||
set fnord "$@"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
done
|
||||
"$@" -E 2>/dev/null |
|
||||
sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile"
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile"
|
||||
echo "$tab" >> "$depfile"
|
||||
sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
msvcmsys)
|
||||
# This case exists only to let depend.m4 do its work. It works by
|
||||
# looking at the text of this script. This case will never be run,
|
||||
# since it is checked for above.
|
||||
exit 1
|
||||
;;
|
||||
|
||||
none)
|
||||
exec "$@"
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Unknown depmode $depmode" 1>&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
|
||||
# Local Variables:
|
||||
# mode: shell-script
|
||||
# sh-indentation: 2
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-time-zone: "UTC"
|
||||
# time-stamp-end: "; # UTC"
|
||||
# End:
|
32
doc/Makefile.am
Normal file
32
doc/Makefile.am
Normal file
@ -0,0 +1,32 @@
|
||||
MAGIC = $(pkgdatadir)/magic
|
||||
if FSECT5
|
||||
man_MAGIC = magic.5
|
||||
else
|
||||
man_MAGIC = magic.4
|
||||
endif
|
||||
fsect = @fsect@
|
||||
man_MANS = file.1 $(man_MAGIC) libmagic.3
|
||||
|
||||
EXTRA_DIST = file.man magic.man libmagic.man
|
||||
CLEANFILES = $(man_MANS)
|
||||
|
||||
file.1: Makefile file.man
|
||||
@rm -f $@
|
||||
sed -e s@__CSECTION__@1@g \
|
||||
-e s@__FSECTION__@${fsect}@g \
|
||||
-e s@__VERSION__@${VERSION}@g \
|
||||
-e s@__MAGIC__@${MAGIC}@g $(srcdir)/file.man > $@
|
||||
|
||||
magic.${fsect}: Makefile magic.man
|
||||
@rm -f $@
|
||||
sed -e s@__CSECTION__@1@g \
|
||||
-e s@__FSECTION__@${fsect}@g \
|
||||
-e s@__VERSION__@${VERSION}@g \
|
||||
-e s@__MAGIC__@${MAGIC}@g $(srcdir)/magic.man > $@
|
||||
|
||||
libmagic.3: Makefile libmagic.man
|
||||
@rm -f $@
|
||||
sed -e s@__CSECTION__@1@g \
|
||||
-e s@__FSECTION__@${fsect}@g \
|
||||
-e s@__VERSION__@${VERSION}@g \
|
||||
-e s@__MAGIC__@${MAGIC}@g $(srcdir)/libmagic.man > $@
|
669
doc/Makefile.in
Normal file
669
doc/Makefile.in
Normal file
@ -0,0 +1,669 @@
|
||||
# Makefile.in generated by automake 1.14 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994-2013 Free Software Foundation, Inc.
|
||||
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
VPATH = @srcdir@
|
||||
am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
|
||||
am__make_running_with_option = \
|
||||
case $${target_option-} in \
|
||||
?) ;; \
|
||||
*) echo "am__make_running_with_option: internal error: invalid" \
|
||||
"target option '$${target_option-}' specified" >&2; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
has_opt=no; \
|
||||
sane_makeflags=$$MAKEFLAGS; \
|
||||
if $(am__is_gnu_make); then \
|
||||
sane_makeflags=$$MFLAGS; \
|
||||
else \
|
||||
case $$MAKEFLAGS in \
|
||||
*\\[\ \ ]*) \
|
||||
bs=\\; \
|
||||
sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
|
||||
| sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
|
||||
esac; \
|
||||
fi; \
|
||||
skip_next=no; \
|
||||
strip_trailopt () \
|
||||
{ \
|
||||
flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
|
||||
}; \
|
||||
for flg in $$sane_makeflags; do \
|
||||
test $$skip_next = yes && { skip_next=no; continue; }; \
|
||||
case $$flg in \
|
||||
*=*|--*) continue;; \
|
||||
-*I) strip_trailopt 'I'; skip_next=yes;; \
|
||||
-*I?*) strip_trailopt 'I';; \
|
||||
-*O) strip_trailopt 'O'; skip_next=yes;; \
|
||||
-*O?*) strip_trailopt 'O';; \
|
||||
-*l) strip_trailopt 'l'; skip_next=yes;; \
|
||||
-*l?*) strip_trailopt 'l';; \
|
||||
-[dEDm]) skip_next=yes;; \
|
||||
-[JT]) skip_next=yes;; \
|
||||
esac; \
|
||||
case $$flg in \
|
||||
*$$target_option*) has_opt=yes; break;; \
|
||||
esac; \
|
||||
done; \
|
||||
test $$has_opt = yes
|
||||
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
|
||||
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkglibexecdir = $(libexecdir)/@PACKAGE@
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
subdir = doc
|
||||
DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
|
||||
$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
|
||||
$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
|
||||
$(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(install_sh) -d
|
||||
CONFIG_HEADER = $(top_builddir)/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
CONFIG_CLEAN_VPATH_FILES =
|
||||
AM_V_P = $(am__v_P_@AM_V@)
|
||||
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
|
||||
am__v_P_0 = false
|
||||
am__v_P_1 = :
|
||||
AM_V_GEN = $(am__v_GEN_@AM_V@)
|
||||
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
|
||||
am__v_GEN_0 = @echo " GEN " $@;
|
||||
am__v_GEN_1 =
|
||||
AM_V_at = $(am__v_at_@AM_V@)
|
||||
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
|
||||
am__v_at_0 = @
|
||||
am__v_at_1 =
|
||||
SOURCES =
|
||||
DIST_SOURCES =
|
||||
am__can_run_installinfo = \
|
||||
case $$AM_UPDATE_INFO_DIR in \
|
||||
n|no|NO) false;; \
|
||||
*) (install-info --version) >/dev/null 2>&1;; \
|
||||
esac
|
||||
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
|
||||
am__vpath_adj = case $$p in \
|
||||
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
*) f=$$p;; \
|
||||
esac;
|
||||
am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
|
||||
am__install_max = 40
|
||||
am__nobase_strip_setup = \
|
||||
srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
|
||||
am__nobase_strip = \
|
||||
for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
|
||||
am__nobase_list = $(am__nobase_strip_setup); \
|
||||
for p in $$list; do echo "$$p $$p"; done | \
|
||||
sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
|
||||
$(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
|
||||
if (++n[$$2] == $(am__install_max)) \
|
||||
{ print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
|
||||
END { for (dir in files) print dir, files[dir] }'
|
||||
am__base_list = \
|
||||
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
|
||||
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
|
||||
am__uninstall_files_from_dir = { \
|
||||
test -z "$$files" \
|
||||
|| { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
|
||||
|| { echo " ( cd '$$dir' && rm -f" $$files ")"; \
|
||||
$(am__cd) "$$dir" && rm -f $$files; }; \
|
||||
}
|
||||
man1dir = $(mandir)/man1
|
||||
am__installdirs = "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man3dir)" \
|
||||
"$(DESTDIR)$(man4dir)" "$(DESTDIR)$(man5dir)"
|
||||
man3dir = $(mandir)/man3
|
||||
man4dir = $(mandir)/man4
|
||||
man5dir = $(mandir)/man5
|
||||
NROFF = nroff
|
||||
MANS = $(man_MANS)
|
||||
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
pkgdatadir = @pkgdatadir@
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMTAR = @AMTAR@
|
||||
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
|
||||
AR = @AR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CFLAG_VISIBILITY = @CFLAG_VISIBILITY@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
DLLTOOL = @DLLTOOL@
|
||||
DSYMUTIL = @DSYMUTIL@
|
||||
DUMPBIN = @DUMPBIN@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
FGREP = @FGREP@
|
||||
GREP = @GREP@
|
||||
HAVE_VISIBILITY = @HAVE_VISIBILITY@
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LD = @LD@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LIPO = @LIPO@
|
||||
LN_S = @LN_S@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MANIFEST_TOOL = @MANIFEST_TOOL@
|
||||
MINGW = @MINGW@
|
||||
MKDIR_P = @MKDIR_P@
|
||||
NM = @NM@
|
||||
NMEDIT = @NMEDIT@
|
||||
OBJDUMP = @OBJDUMP@
|
||||
OBJEXT = @OBJEXT@
|
||||
OTOOL = @OTOOL@
|
||||
OTOOL64 = @OTOOL64@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_URL = @PACKAGE_URL@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
RANLIB = @RANLIB@
|
||||
SED = @SED@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
VERSION = @VERSION@
|
||||
WARNINGS = @WARNINGS@
|
||||
abs_builddir = @abs_builddir@
|
||||
abs_srcdir = @abs_srcdir@
|
||||
abs_top_builddir = @abs_top_builddir@
|
||||
abs_top_srcdir = @abs_top_srcdir@
|
||||
ac_ct_AR = @ac_ct_AR@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
builddir = @builddir@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
docdir = @docdir@
|
||||
dvidir = @dvidir@
|
||||
exec_prefix = @exec_prefix@
|
||||
fsect = @fsect@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
htmldir = @htmldir@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
pdfdir = @pdfdir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
srcdir = @srcdir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target_alias = @target_alias@
|
||||
top_build_prefix = @top_build_prefix@
|
||||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
MAGIC = $(pkgdatadir)/magic
|
||||
@FSECT5_FALSE@man_MAGIC = magic.4
|
||||
@FSECT5_TRUE@man_MAGIC = magic.5
|
||||
man_MANS = file.1 $(man_MAGIC) libmagic.3
|
||||
EXTRA_DIST = file.man magic.man libmagic.man
|
||||
CLEANFILES = $(man_MANS)
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
|
||||
&& { if test -f $@; then exit 0; else break; fi; }; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign doc/Makefile'; \
|
||||
$(am__cd) $(top_srcdir) && \
|
||||
$(AUTOMAKE) --foreign doc/Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
$(top_srcdir)/configure: $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(am__aclocal_m4_deps):
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
install-man1: $(man_MANS)
|
||||
@$(NORMAL_INSTALL)
|
||||
@list1=''; \
|
||||
list2='$(man_MANS)'; \
|
||||
test -n "$(man1dir)" \
|
||||
&& test -n "`echo $$list1$$list2`" \
|
||||
|| exit 0; \
|
||||
echo " $(MKDIR_P) '$(DESTDIR)$(man1dir)'"; \
|
||||
$(MKDIR_P) "$(DESTDIR)$(man1dir)" || exit 1; \
|
||||
{ for i in $$list1; do echo "$$i"; done; \
|
||||
if test -n "$$list2"; then \
|
||||
for i in $$list2; do echo "$$i"; done \
|
||||
| sed -n '/\.1[a-z]*$$/p'; \
|
||||
fi; \
|
||||
} | while read p; do \
|
||||
if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
|
||||
echo "$$d$$p"; echo "$$p"; \
|
||||
done | \
|
||||
sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
|
||||
-e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \
|
||||
sed 'N;N;s,\n, ,g' | { \
|
||||
list=; while read file base inst; do \
|
||||
if test "$$base" = "$$inst"; then list="$$list $$file"; else \
|
||||
echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \
|
||||
$(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \
|
||||
fi; \
|
||||
done; \
|
||||
for i in $$list; do echo "$$i"; done | $(am__base_list) | \
|
||||
while read files; do \
|
||||
test -z "$$files" || { \
|
||||
echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \
|
||||
$(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \
|
||||
done; }
|
||||
|
||||
uninstall-man1:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list=''; test -n "$(man1dir)" || exit 0; \
|
||||
files=`{ for i in $$list; do echo "$$i"; done; \
|
||||
l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
|
||||
sed -n '/\.1[a-z]*$$/p'; \
|
||||
} | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
|
||||
-e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
|
||||
dir='$(DESTDIR)$(man1dir)'; $(am__uninstall_files_from_dir)
|
||||
install-man3: $(man_MANS)
|
||||
@$(NORMAL_INSTALL)
|
||||
@list1=''; \
|
||||
list2='$(man_MANS)'; \
|
||||
test -n "$(man3dir)" \
|
||||
&& test -n "`echo $$list1$$list2`" \
|
||||
|| exit 0; \
|
||||
echo " $(MKDIR_P) '$(DESTDIR)$(man3dir)'"; \
|
||||
$(MKDIR_P) "$(DESTDIR)$(man3dir)" || exit 1; \
|
||||
{ for i in $$list1; do echo "$$i"; done; \
|
||||
if test -n "$$list2"; then \
|
||||
for i in $$list2; do echo "$$i"; done \
|
||||
| sed -n '/\.3[a-z]*$$/p'; \
|
||||
fi; \
|
||||
} | while read p; do \
|
||||
if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
|
||||
echo "$$d$$p"; echo "$$p"; \
|
||||
done | \
|
||||
sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^3][0-9a-z]*$$,3,;x' \
|
||||
-e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \
|
||||
sed 'N;N;s,\n, ,g' | { \
|
||||
list=; while read file base inst; do \
|
||||
if test "$$base" = "$$inst"; then list="$$list $$file"; else \
|
||||
echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man3dir)/$$inst'"; \
|
||||
$(INSTALL_DATA) "$$file" "$(DESTDIR)$(man3dir)/$$inst" || exit $$?; \
|
||||
fi; \
|
||||
done; \
|
||||
for i in $$list; do echo "$$i"; done | $(am__base_list) | \
|
||||
while read files; do \
|
||||
test -z "$$files" || { \
|
||||
echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man3dir)'"; \
|
||||
$(INSTALL_DATA) $$files "$(DESTDIR)$(man3dir)" || exit $$?; }; \
|
||||
done; }
|
||||
|
||||
uninstall-man3:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list=''; test -n "$(man3dir)" || exit 0; \
|
||||
files=`{ for i in $$list; do echo "$$i"; done; \
|
||||
l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
|
||||
sed -n '/\.3[a-z]*$$/p'; \
|
||||
} | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^3][0-9a-z]*$$,3,;x' \
|
||||
-e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
|
||||
dir='$(DESTDIR)$(man3dir)'; $(am__uninstall_files_from_dir)
|
||||
install-man4: $(man_MANS)
|
||||
@$(NORMAL_INSTALL)
|
||||
@list1=''; \
|
||||
list2='$(man_MANS)'; \
|
||||
test -n "$(man4dir)" \
|
||||
&& test -n "`echo $$list1$$list2`" \
|
||||
|| exit 0; \
|
||||
echo " $(MKDIR_P) '$(DESTDIR)$(man4dir)'"; \
|
||||
$(MKDIR_P) "$(DESTDIR)$(man4dir)" || exit 1; \
|
||||
{ for i in $$list1; do echo "$$i"; done; \
|
||||
if test -n "$$list2"; then \
|
||||
for i in $$list2; do echo "$$i"; done \
|
||||
| sed -n '/\.4[a-z]*$$/p'; \
|
||||
fi; \
|
||||
} | while read p; do \
|
||||
if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
|
||||
echo "$$d$$p"; echo "$$p"; \
|
||||
done | \
|
||||
sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^4][0-9a-z]*$$,4,;x' \
|
||||
-e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \
|
||||
sed 'N;N;s,\n, ,g' | { \
|
||||
list=; while read file base inst; do \
|
||||
if test "$$base" = "$$inst"; then list="$$list $$file"; else \
|
||||
echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man4dir)/$$inst'"; \
|
||||
$(INSTALL_DATA) "$$file" "$(DESTDIR)$(man4dir)/$$inst" || exit $$?; \
|
||||
fi; \
|
||||
done; \
|
||||
for i in $$list; do echo "$$i"; done | $(am__base_list) | \
|
||||
while read files; do \
|
||||
test -z "$$files" || { \
|
||||
echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man4dir)'"; \
|
||||
$(INSTALL_DATA) $$files "$(DESTDIR)$(man4dir)" || exit $$?; }; \
|
||||
done; }
|
||||
|
||||
uninstall-man4:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list=''; test -n "$(man4dir)" || exit 0; \
|
||||
files=`{ for i in $$list; do echo "$$i"; done; \
|
||||
l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
|
||||
sed -n '/\.4[a-z]*$$/p'; \
|
||||
} | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^4][0-9a-z]*$$,4,;x' \
|
||||
-e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
|
||||
dir='$(DESTDIR)$(man4dir)'; $(am__uninstall_files_from_dir)
|
||||
install-man5: $(man_MANS)
|
||||
@$(NORMAL_INSTALL)
|
||||
@list1=''; \
|
||||
list2='$(man_MANS)'; \
|
||||
test -n "$(man5dir)" \
|
||||
&& test -n "`echo $$list1$$list2`" \
|
||||
|| exit 0; \
|
||||
echo " $(MKDIR_P) '$(DESTDIR)$(man5dir)'"; \
|
||||
$(MKDIR_P) "$(DESTDIR)$(man5dir)" || exit 1; \
|
||||
{ for i in $$list1; do echo "$$i"; done; \
|
||||
if test -n "$$list2"; then \
|
||||
for i in $$list2; do echo "$$i"; done \
|
||||
| sed -n '/\.5[a-z]*$$/p'; \
|
||||
fi; \
|
||||
} | while read p; do \
|
||||
if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
|
||||
echo "$$d$$p"; echo "$$p"; \
|
||||
done | \
|
||||
sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^5][0-9a-z]*$$,5,;x' \
|
||||
-e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \
|
||||
sed 'N;N;s,\n, ,g' | { \
|
||||
list=; while read file base inst; do \
|
||||
if test "$$base" = "$$inst"; then list="$$list $$file"; else \
|
||||
echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man5dir)/$$inst'"; \
|
||||
$(INSTALL_DATA) "$$file" "$(DESTDIR)$(man5dir)/$$inst" || exit $$?; \
|
||||
fi; \
|
||||
done; \
|
||||
for i in $$list; do echo "$$i"; done | $(am__base_list) | \
|
||||
while read files; do \
|
||||
test -z "$$files" || { \
|
||||
echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man5dir)'"; \
|
||||
$(INSTALL_DATA) $$files "$(DESTDIR)$(man5dir)" || exit $$?; }; \
|
||||
done; }
|
||||
|
||||
uninstall-man5:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list=''; test -n "$(man5dir)" || exit 0; \
|
||||
files=`{ for i in $$list; do echo "$$i"; done; \
|
||||
l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
|
||||
sed -n '/\.5[a-z]*$$/p'; \
|
||||
} | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^5][0-9a-z]*$$,5,;x' \
|
||||
-e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
|
||||
dir='$(DESTDIR)$(man5dir)'; $(am__uninstall_files_from_dir)
|
||||
tags TAGS:
|
||||
|
||||
ctags CTAGS:
|
||||
|
||||
cscope cscopelist:
|
||||
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
list='$(DISTFILES)'; \
|
||||
dist_files=`for file in $$list; do echo $$file; done | \
|
||||
sed -e "s|^$$srcdirstrip/||;t" \
|
||||
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
|
||||
case $$dist_files in \
|
||||
*/*) $(MKDIR_P) `echo "$$dist_files" | \
|
||||
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
|
||||
sort -u` ;; \
|
||||
esac; \
|
||||
for file in $$dist_files; do \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test -d "$(distdir)/$$file"; then \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
|
||||
else \
|
||||
test -f "$(distdir)/$$file" \
|
||||
|| cp -p $$d/$$file "$(distdir)/$$file" \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
all-am: Makefile $(MANS)
|
||||
installdirs:
|
||||
for dir in "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man3dir)" "$(DESTDIR)$(man4dir)" "$(DESTDIR)$(man5dir)"; do \
|
||||
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
|
||||
done
|
||||
install: install-am
|
||||
install-exec: install-exec-am
|
||||
install-data: install-data-am
|
||||
uninstall: uninstall-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
if test -z '$(STRIP)'; then \
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
install; \
|
||||
else \
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
|
||||
fi
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-am
|
||||
|
||||
clean-am: clean-generic clean-libtool mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-generic
|
||||
|
||||
dvi: dvi-am
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-am
|
||||
|
||||
html-am:
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am: install-man
|
||||
|
||||
install-dvi: install-dvi-am
|
||||
|
||||
install-dvi-am:
|
||||
|
||||
install-exec-am:
|
||||
|
||||
install-html: install-html-am
|
||||
|
||||
install-html-am:
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
install-info-am:
|
||||
|
||||
install-man: install-man1 install-man3 install-man4 install-man5
|
||||
|
||||
install-pdf: install-pdf-am
|
||||
|
||||
install-pdf-am:
|
||||
|
||||
install-ps: install-ps-am
|
||||
|
||||
install-ps-am:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
|
||||
|
||||
pdf: pdf-am
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-am
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am: uninstall-man
|
||||
|
||||
uninstall-man: uninstall-man1 uninstall-man3 uninstall-man4 \
|
||||
uninstall-man5
|
||||
|
||||
.MAKE: install-am install-strip
|
||||
|
||||
.PHONY: all all-am check check-am clean clean-generic clean-libtool \
|
||||
cscopelist-am ctags-am distclean distclean-generic \
|
||||
distclean-libtool distdir dvi dvi-am html html-am info info-am \
|
||||
install install-am install-data install-data-am install-dvi \
|
||||
install-dvi-am install-exec install-exec-am install-html \
|
||||
install-html-am install-info install-info-am install-man \
|
||||
install-man1 install-man3 install-man4 install-man5 \
|
||||
install-pdf install-pdf-am install-ps install-ps-am \
|
||||
install-strip installcheck installcheck-am installdirs \
|
||||
maintainer-clean maintainer-clean-generic mostlyclean \
|
||||
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
|
||||
tags-am uninstall uninstall-am uninstall-man uninstall-man1 \
|
||||
uninstall-man3 uninstall-man4 uninstall-man5
|
||||
|
||||
|
||||
file.1: Makefile file.man
|
||||
@rm -f $@
|
||||
sed -e s@__CSECTION__@1@g \
|
||||
-e s@__FSECTION__@${fsect}@g \
|
||||
-e s@__VERSION__@${VERSION}@g \
|
||||
-e s@__MAGIC__@${MAGIC}@g $(srcdir)/file.man > $@
|
||||
|
||||
magic.${fsect}: Makefile magic.man
|
||||
@rm -f $@
|
||||
sed -e s@__CSECTION__@1@g \
|
||||
-e s@__FSECTION__@${fsect}@g \
|
||||
-e s@__VERSION__@${VERSION}@g \
|
||||
-e s@__MAGIC__@${MAGIC}@g $(srcdir)/magic.man > $@
|
||||
|
||||
libmagic.3: Makefile libmagic.man
|
||||
@rm -f $@
|
||||
sed -e s@__CSECTION__@1@g \
|
||||
-e s@__FSECTION__@${fsect}@g \
|
||||
-e s@__VERSION__@${VERSION}@g \
|
||||
-e s@__MAGIC__@${MAGIC}@g $(srcdir)/libmagic.man > $@
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
@ -1,5 +1,5 @@
|
||||
.\" $File: file.man,v 1.98 2011/12/08 12:12:46 rrt Exp $
|
||||
.Dd October 17, 2011
|
||||
.\" $File: file.man,v 1.106 2014/03/07 23:11:51 christos Exp $
|
||||
.Dd January 30, 2014
|
||||
.Dt FILE __CSECTION__
|
||||
.Os
|
||||
.Sh NAME
|
||||
@ -8,7 +8,7 @@
|
||||
.Sh SYNOPSIS
|
||||
.Nm
|
||||
.Bk -words
|
||||
.Op Fl bchiklLNnprsvz0
|
||||
.Op Fl bcEhiklLNnprsvz0
|
||||
.Op Fl Fl apple
|
||||
.Op Fl Fl mime-encoding
|
||||
.Op Fl Fl mime-type
|
||||
@ -164,6 +164,10 @@ in any of the character sets listed above is simply said to be
|
||||
.Dq data .
|
||||
.Sh OPTIONS
|
||||
.Bl -tag -width indent
|
||||
.It Fl Fl apple
|
||||
Causes the file command to output the file type and creator code as
|
||||
used by older MacOS versions. The code consists of eight letters,
|
||||
the first describing the file type, the latter the creator.
|
||||
.It Fl b , Fl Fl brief
|
||||
Do not prepend filenames to output lines (brief mode).
|
||||
.It Fl C , Fl Fl compile
|
||||
@ -175,6 +179,10 @@ Cause a checking printout of the parsed form of the magic file.
|
||||
This is usually used in conjunction with the
|
||||
.Fl m
|
||||
flag to debug a new magic file before installing it.
|
||||
.It Fl E
|
||||
On filesystem errors (file not found etc), instead of handling the error
|
||||
as regular output as POSIX mandates and keep going, issue an error message
|
||||
and exit.
|
||||
.It Fl e , Fl Fl exclude Ar testname
|
||||
Exclude the test named in
|
||||
.Ar testname
|
||||
@ -259,8 +267,16 @@ prepended.
|
||||
(If you want a newline, see the
|
||||
.Fl r
|
||||
option.)
|
||||
The magic pattern with the highest strength (see the
|
||||
.Fl l
|
||||
option) comes first.
|
||||
.It Fl l , Fl Fl list
|
||||
Print information about the strength of each magic pattern.
|
||||
Shows a list of patterns and their strength sorted descending by
|
||||
.Xr magic 4
|
||||
strength
|
||||
which is used for the matching (see also the
|
||||
.Fl k
|
||||
option).
|
||||
.It Fl L , Fl Fl dereference
|
||||
option causes symlinks to be followed, as the like-named option in
|
||||
.Xr ls 1
|
||||
@ -268,8 +284,6 @@ option causes symlinks to be followed, as the like-named option in
|
||||
This is the default if the environment variable
|
||||
.Ev POSIXLY_CORRECT
|
||||
is defined.
|
||||
.It Fl l
|
||||
Shows sorted patterns list in the order which is used for the matching.
|
||||
.It Fl m , Fl Fl magic-file Ar magicfiles
|
||||
Specify an alternate list of files and directories containing magic.
|
||||
This can be a single item, or a colon-separated list.
|
||||
@ -325,7 +339,7 @@ after the end of the filename.
|
||||
Nice to
|
||||
.Xr cut 1
|
||||
the output.
|
||||
This does not affect the separator which is still printed.
|
||||
This does not affect the separator, which is still printed.
|
||||
.It Fl -help
|
||||
Print a help message and exit.
|
||||
.El
|
||||
@ -547,20 +561,27 @@ returns 0 on success, and non-zero on error.
|
||||
Please report bugs and send patches to the bug tracker at
|
||||
.Pa http://bugs.gw.com/
|
||||
or the mailing list at
|
||||
.Aq file@mx.gw.com .
|
||||
.Aq file@mx.gw.com
|
||||
(visit
|
||||
.Pa http://mx.gw.com/mailman/listinfo/file
|
||||
first to subscribe).
|
||||
.Sh TODO
|
||||
.Pp
|
||||
Fix output so that tests for MIME and APPLE flags are not needed all
|
||||
over the place, and actual output is only done in one place. This
|
||||
needs a design. Suggestion: push possible outputs on to a list, then
|
||||
pick the last-pushed (most specific, one hopes) value at the end, or
|
||||
use a default if the list is empty. This should not slow down evaluation.
|
||||
over the place, and actual output is only done in one place.
|
||||
This needs a design.
|
||||
Suggestion: push possible outputs on to a list, then pick the
|
||||
last-pushed (most specific, one hopes) value at the end, or
|
||||
use a default if the list is empty.
|
||||
This should not slow down evaluation.
|
||||
.Pp
|
||||
Continue to squash all magic bugs. See Debian BTS for a good source.
|
||||
Continue to squash all magic bugs.
|
||||
See Debian BTS for a good source.
|
||||
.Pp
|
||||
Store arbitrarily long strings, for example for %s patterns, so that
|
||||
they can be printed out. Fixes Debian bug #271672. Would require more
|
||||
complex store/load code in apprentice.
|
||||
they can be printed out.
|
||||
Fixes Debian bug #271672.
|
||||
Would require more complex store/load code in apprentice.
|
||||
.Pp
|
||||
Add syntax for relative offsets after current level (Debian bug #466037).
|
||||
.Pp
|
||||
@ -570,6 +591,30 @@ Add a zip library so we can peek inside Office2007 documents to
|
||||
figure out what they are.
|
||||
.Pp
|
||||
Add an option to print URLs for the sources of the file descriptions.
|
||||
.Pp
|
||||
Combine script searches and add a way to map executable names to MIME
|
||||
types (e.g. have a magic value for !:mime which causes the resulting
|
||||
string to be looked up in a table).
|
||||
This would avoid adding the same magic repeatedly for each new
|
||||
hash-bang interpreter.
|
||||
.Pp
|
||||
Fix
|
||||
.Dq name
|
||||
and
|
||||
.Dq use
|
||||
to check for consistency at compile time (duplicate
|
||||
.Dq name ,
|
||||
.Dq use
|
||||
pointing to undefined
|
||||
.Dq name
|
||||
).
|
||||
Make
|
||||
.Dq name
|
||||
/
|
||||
.Dq use
|
||||
more efficient by keeping a sorted list of names.
|
||||
Special-case ^ to flip endianness in the parser so that it does not
|
||||
have to be escaped, and document it.
|
||||
.Sh AVAILABILITY
|
||||
You can obtain the original author's latest version by anonymous FTP
|
||||
on
|
@ -1,4 +1,4 @@
|
||||
.\" $File: libmagic.man,v 1.26 2011/12/19 17:49:31 christos Exp $
|
||||
.\" $File: libmagic.man,v 1.28 2014/03/02 14:47:16 christos Exp $
|
||||
.\"
|
||||
.\" Copyright (c) Christos Zoulas 2003.
|
||||
.\" All Rights Reserved.
|
||||
@ -25,19 +25,22 @@
|
||||
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
.\" SUCH DAMAGE.
|
||||
.\"
|
||||
.Dd December 19, 2011
|
||||
.Dd January 6, 2012
|
||||
.Dt LIBMAGIC 3
|
||||
.Os
|
||||
.Sh NAME
|
||||
.Nm magic_open ,
|
||||
.Nm magic_close ,
|
||||
.Nm magic_error ,
|
||||
.Nm magic_errno ,
|
||||
.Nm magic_descriptor ,
|
||||
.Nm magic_buffer ,
|
||||
.Nm magic_setflags ,
|
||||
.Nm magic_check ,
|
||||
.Nm magic_compile ,
|
||||
.Nm magic_load
|
||||
.Nm magic_list ,
|
||||
.Nm magic_load ,
|
||||
.Nm magic_version
|
||||
.Nd Magic number recognition library
|
||||
.Sh LIBRARY
|
||||
.Lb libmagic
|
||||
@ -67,6 +70,8 @@
|
||||
.Fn magic_list "magic_t cookie" "const char *filename"
|
||||
.Ft int
|
||||
.Fn magic_load "magic_t cookie" "const char *filename"
|
||||
.Ft int
|
||||
.Fn magic_version "void"
|
||||
.Sh DESCRIPTION
|
||||
These functions
|
||||
operate on the magic database file
|
||||
@ -246,6 +251,16 @@ If that variable is not set, the default database file name is __MAGIC__.
|
||||
adds
|
||||
.Dq .mgc
|
||||
to the database filename as appropriate.
|
||||
.Pp
|
||||
The
|
||||
.Fn magic_version
|
||||
command returns the version number of this library which is compiled into
|
||||
the shared library using the constant
|
||||
.Dv MAGIC_VERSION
|
||||
from
|
||||
.In magic.h .
|
||||
This can be used by client programs to verify that the version they compile
|
||||
against is the same as the version that they run against.
|
||||
.Sh RETURN VALUES
|
||||
The function
|
||||
.Fn magic_open
|
||||
@ -276,6 +291,9 @@ function returns a textual description of the errors of the above
|
||||
functions, or
|
||||
.Dv NULL
|
||||
if there was no error.
|
||||
The
|
||||
.Fn magic_version
|
||||
always returns the version number of the library.
|
||||
Finally,
|
||||
.Fn magic_setflags
|
||||
returns \-1 on systems that don't support
|
@ -1,5 +1,5 @@
|
||||
.\" $File: magic.man,v 1.71 2011/12/07 11:58:24 rrt Exp $
|
||||
.Dd April 20, 2011
|
||||
.\" $File: magic.man,v 1.84 2014/06/03 19:01:34 christos Exp $
|
||||
.Dd June 3, 2014
|
||||
.Dt MAGIC __FSECTION__
|
||||
.Os
|
||||
.\" install as magic.4 on USG, magic.5 on V7, Berkeley and Linux systems.
|
||||
@ -51,7 +51,7 @@ A 64-bit double precision IEEE floating point number in this machine's native by
|
||||
.It Dv string
|
||||
A string of bytes.
|
||||
The string type specification can be optionally followed
|
||||
by /[WwcCtb]*.
|
||||
by /[WwcCtbT]*.
|
||||
The
|
||||
.Dq W
|
||||
flag compacts whitespace in the target, which must
|
||||
@ -85,8 +85,12 @@ The
|
||||
flag forces the test to be done for text files, while the
|
||||
.Dq b
|
||||
flag forces the test to be done for binary files.
|
||||
The
|
||||
.Dq T
|
||||
flag causes the string to be trimmed, i.e. leading and trailing whitespace
|
||||
is deleted before the string is printed.
|
||||
.It Dv pstring
|
||||
A Pascal-style string where the first byte/short/int is interpreted as the an
|
||||
A Pascal-style string where the first byte/short/int is interpreted as the
|
||||
unsigned length.
|
||||
The length defaults to byte and can be specified as a modifier.
|
||||
The following modifiers are supported:
|
||||
@ -121,6 +125,8 @@ local time rather than UTC.
|
||||
.It Dv qldate
|
||||
An eight-byte value interpreted as a UNIX-style date, but interpreted as
|
||||
local time rather than UTC.
|
||||
.It Dv qwdate
|
||||
An eight-byte value interpreted as a Windows-style date.
|
||||
.It Dv beid3
|
||||
A 32-bit ID3 length in big-endian byte order.
|
||||
.It Dv beshort
|
||||
@ -147,6 +153,9 @@ than UTC.
|
||||
An eight-byte value in big-endian byte order,
|
||||
interpreted as a UNIX-style date, but interpreted as local time rather
|
||||
than UTC.
|
||||
.It Dv beqwdate
|
||||
An eight-byte value in big-endian byte order,
|
||||
interpreted as a Windows-style date.
|
||||
.It Dv bestring16
|
||||
A two-byte unicode (UCS16) string in big-endian byte order.
|
||||
.It Dv leid3
|
||||
@ -175,6 +184,9 @@ than UTC.
|
||||
An eight-byte value in little-endian byte order,
|
||||
interpreted as a UNIX-style date, but interpreted as local time rather
|
||||
than UTC.
|
||||
.It Dv leqwdate
|
||||
An eight-byte value in little-endian byte order,
|
||||
interpreted as a Windows-style date.
|
||||
.It Dv lestring16
|
||||
A two-byte unicode (UCS16) string in little-endian byte order.
|
||||
.It Dv melong
|
||||
@ -188,6 +200,27 @@ interpreted as a UNIX-style date, but interpreted as local time rather
|
||||
than UTC.
|
||||
.It Dv indirect
|
||||
Starting at the given offset, consult the magic database again.
|
||||
.It Dv name
|
||||
Define a
|
||||
.Dq named
|
||||
magic instance that can be called from another
|
||||
.Dv use
|
||||
magic entry, like a subroutine call.
|
||||
Named instance direct magic offsets are relative to the offset of the
|
||||
previous matched entry, but indirect offsets are relative to the beginning
|
||||
of the file as usual.
|
||||
Named magic entries always match.
|
||||
.It Dv use
|
||||
Recursively call the named magic starting from the current offset.
|
||||
If the name of the referenced begins with a
|
||||
.Dv ^
|
||||
then the endianness of the magic is switched; if the magic mentioned
|
||||
.Dv leshort
|
||||
for example,
|
||||
it is treated as
|
||||
.Dv beshort
|
||||
and vice versa.
|
||||
This is useful to avoid duplicating the rules for different endianness.
|
||||
.It Dv regex
|
||||
A regular expression match in extended POSIX regular expression syntax
|
||||
(like egrep).
|
||||
@ -195,19 +228,25 @@ Regular expressions can take exponential time to process, and their
|
||||
performance is hard to predict, so their use is discouraged.
|
||||
When used in production environments, their performance
|
||||
should be carefully checked.
|
||||
The type specification can be optionally followed by
|
||||
.Dv /[c][s] .
|
||||
The size of the string to search should also be limited by specifying
|
||||
.Dv /<length> ,
|
||||
to avoid performance issues scanning long files.
|
||||
The type specification can also be optionally followed by
|
||||
.Dv /[c][s][l] .
|
||||
The
|
||||
.Dq c
|
||||
flag makes the match case insensitive, while the
|
||||
.Dq s
|
||||
flag update the offset to the start offset of the match, rather than the end.
|
||||
The regular expression is tested against line
|
||||
.Dv N + 1
|
||||
onwards, where
|
||||
.Dv N
|
||||
is the given offset.
|
||||
Line endings are assumed to be in the machine's native format.
|
||||
The
|
||||
.Dq l
|
||||
modifier, changes the limit of length to mean number of lines instead of a
|
||||
byte count.
|
||||
Lines are delimited by the platforms native line delimiter.
|
||||
When a line count is specified, an implicit byte count also computed assuming
|
||||
each line is 80 characters long.
|
||||
If neither a byte or line count is specified, the search is limited automatically
|
||||
to 8KiB.
|
||||
.Dv ^
|
||||
and
|
||||
.Dv $
|
||||
@ -216,22 +255,91 @@ not beginning and end of file.
|
||||
.It Dv search
|
||||
A literal string search starting at the given offset.
|
||||
The same modifier flags can be used as for string patterns.
|
||||
The modifier flags (if any) must be followed by
|
||||
.Dv /number
|
||||
the range, that is, the number of positions at which the match will be
|
||||
The search expression must contain the range in the form
|
||||
.Dv /number,
|
||||
that is the number of positions at which the match will be
|
||||
attempted, starting from the start offset.
|
||||
This is suitable for
|
||||
searching larger binary expressions with variable offsets, using
|
||||
.Dv \e
|
||||
escapes for special characters.
|
||||
The offset works as for regex.
|
||||
The order of modifier and number is not relevant.
|
||||
.It Dv default
|
||||
This is intended to be used with the test
|
||||
.Em x
|
||||
(which is always true) and a message that is to be used if there are
|
||||
no other matches.
|
||||
(which is always true) and it has no type.
|
||||
It matches when no other test at that continuation level has matched before.
|
||||
Clearing that matched tests for a continuation level, can be done using the
|
||||
.Dv clear
|
||||
test.
|
||||
.It Dv clear
|
||||
This test is always true and clears the match flag for that continuation level.
|
||||
It is intended to be used with the
|
||||
.Dv default
|
||||
test.
|
||||
.El
|
||||
.Pp
|
||||
For compatibility with the Single
|
||||
.Ux
|
||||
Standard, the type specifiers
|
||||
.Dv dC
|
||||
and
|
||||
.Dv d1
|
||||
are equivalent to
|
||||
.Dv byte ,
|
||||
the type specifiers
|
||||
.Dv uC
|
||||
and
|
||||
.Dv u1
|
||||
are equivalent to
|
||||
.Dv ubyte ,
|
||||
the type specifiers
|
||||
.Dv dS
|
||||
and
|
||||
.Dv d2
|
||||
are equivalent to
|
||||
.Dv short ,
|
||||
the type specifiers
|
||||
.Dv uS
|
||||
and
|
||||
.Dv u2
|
||||
are equivalent to
|
||||
.Dv ushort ,
|
||||
the type specifiers
|
||||
.Dv dI ,
|
||||
.Dv dL ,
|
||||
and
|
||||
.Dv d4
|
||||
are equivalent to
|
||||
.Dv long ,
|
||||
the type specifiers
|
||||
.Dv uI ,
|
||||
.Dv uL ,
|
||||
and
|
||||
.Dv u4
|
||||
are equivalent to
|
||||
.Dv ulong ,
|
||||
the type specifier
|
||||
.Dv d8
|
||||
is equivalent to
|
||||
.Dv quad ,
|
||||
the type specifier
|
||||
.Dv u8
|
||||
is equivalent to
|
||||
.Dv uquad ,
|
||||
and the type specifier
|
||||
.Dv s
|
||||
is equivalent to
|
||||
.Dv string .
|
||||
In addition, the type specifier
|
||||
.Dv dQ
|
||||
is equivalent to
|
||||
.Dv quad
|
||||
and the type specifier
|
||||
.Dv uQ
|
||||
is equivalent to
|
||||
.Dv uquad .
|
||||
.Pp
|
||||
Each top-level magic pattern (see below for an explanation of levels)
|
||||
is classified as text or binary according to the types used.
|
||||
Types
|
||||
@ -307,6 +415,9 @@ is octal, and
|
||||
.Dv 0x13
|
||||
is hexadecimal.
|
||||
.Pp
|
||||
Numeric operations are not performed on date types, instead the numeric
|
||||
value is interpreted as an offset.
|
||||
.Pp
|
||||
For string values, the string from the
|
||||
file must match the specified string.
|
||||
The operators
|
||||
@ -324,6 +435,9 @@ then print the string), with
|
||||
.Em \*[Gt]\e0
|
||||
(because all non-empty strings are greater than the empty string).
|
||||
.Pp
|
||||
Dates are treated as numerical values in the respective internal
|
||||
representation.
|
||||
.Pp
|
||||
The special test
|
||||
.Em x
|
||||
always evaluates to true.
|
||||
@ -511,7 +625,7 @@ Or even both!
|
||||
\*[Gt]\*[Gt]\*[Gt]\*[Am](\*[Am]0x54.l-3) string UNACE \eb, ACE self-extracting archive
|
||||
.Ed
|
||||
.Pp
|
||||
Finally, if you have to deal with offset/length pairs in your file, even the
|
||||
If you have to deal with offset/length pairs in your file, even the
|
||||
second value in a parenthesized expression can be taken from the file itself,
|
||||
using another set of parentheses.
|
||||
Note that this additional indirect offset is always relative to the
|
||||
@ -526,6 +640,18 @@ start of the main indirect offset.
|
||||
# these are located 14 and 10 bytes after the section name
|
||||
\*[Gt]\*[Gt]\*[Gt]\*[Gt](\*[Am]0xe.l+(-4)) string PK\e3\e4 \eb, ZIP self-extracting archive
|
||||
.Ed
|
||||
.Pp
|
||||
If you have a list of known avalues at a particular continuation level,
|
||||
and you want to provide a switch-like default case:
|
||||
.Bd -literal -offset indent
|
||||
# clear that continuation level match
|
||||
\*[Gt]18 clear
|
||||
\*[Gt]18 lelong 1 one
|
||||
\*[Gt]18 lelong 2 two
|
||||
\*[Gt]18 default x
|
||||
# print default match
|
||||
\*[Gt]\*[Gt]18 lelong x unmatched 0x%x
|
||||
.Ed
|
||||
.Sh SEE ALSO
|
||||
.Xr file __CSECTION__
|
||||
\- the command that reads this file.
|
||||
@ -537,19 +663,41 @@ The formats
|
||||
.Dv melong ,
|
||||
.Dv short ,
|
||||
.Dv beshort ,
|
||||
.Dv leshort ,
|
||||
.Dv date ,
|
||||
.Dv bedate ,
|
||||
.Dv medate ,
|
||||
.Dv ledate ,
|
||||
.Dv beldate ,
|
||||
.Dv leldate ,
|
||||
and
|
||||
.Dv meldate
|
||||
are system-dependent; perhaps they should be specified as a number
|
||||
of bytes (2B, 4B, etc),
|
||||
since the files being recognized typically come from
|
||||
a system on which the lengths are invariant.
|
||||
.Dv leshort
|
||||
do not depend on the length of the C data types
|
||||
.Dv short
|
||||
and
|
||||
.Dv long
|
||||
on the platform, even though the Single
|
||||
.Ux
|
||||
Specification implies that they do. However, as OS X Mountain Lion has
|
||||
passed the Single
|
||||
.Ux
|
||||
Specification validation suite, and supplies a version of
|
||||
.Xr file __CSECTION__
|
||||
in which they do not depend on the sizes of the C data types and that is
|
||||
built for a 64-bit environment in which
|
||||
.Dv long
|
||||
is 8 bytes rather than 4 bytes, presumably the validation suite does not
|
||||
test whether, for example
|
||||
.Dv long
|
||||
refers to an item with the same size as the C data type
|
||||
.Dv long .
|
||||
There should probably be
|
||||
.Dv type
|
||||
names
|
||||
.Dv int8 ,
|
||||
.Dv uint8 ,
|
||||
.Dv int16 ,
|
||||
.Dv uint16 ,
|
||||
.Dv int32 ,
|
||||
.Dv uint32 ,
|
||||
.Dv int64 ,
|
||||
and
|
||||
.Dv uint64 ,
|
||||
and specified-byte-order variants of them,
|
||||
to make it clearer that those types have specified widths.
|
||||
.\"
|
||||
.\" From: guy@sun.uucp (Guy Harris)
|
||||
.\" Newsgroups: net.bugs.usg
|
14
install-sh
14
install-sh
@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# $NetBSD: install-sh.in,v 1.5 2010/10/08 19:57:05 tez Exp $
|
||||
# $NetBSD: install-sh.in,v 1.6 2012/01/11 13:07:31 hans Exp $
|
||||
# This script now also installs multiple files, but might choke on installing
|
||||
# multiple files with spaces in the file names.
|
||||
#
|
||||
@ -45,6 +45,7 @@ rmprog="${RMPROG-rm}"
|
||||
mkdirprog="${MKDIRPROG-mkdir}"
|
||||
|
||||
instcmd="$cpprog"
|
||||
instflags=""
|
||||
pathcompchmodcmd="$chmodprog 755"
|
||||
chmodcmd="$chmodprog 755"
|
||||
chowncmd=""
|
||||
@ -84,6 +85,11 @@ while [ x"$1" != x ]; do
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-m*)
|
||||
chmodcmd="$chmodprog ${1#-m}"
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-o) chowncmd="$chownprog $2"
|
||||
shift
|
||||
shift
|
||||
@ -104,6 +110,10 @@ while [ x"$1" != x ]; do
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-p) instflags="-p"
|
||||
shift
|
||||
continue;;
|
||||
|
||||
*) if [ x"$msrc" = x ]
|
||||
then
|
||||
msrc="$dst"
|
||||
@ -154,7 +164,7 @@ else
|
||||
|
||||
if [ -f "$srcarg" ]
|
||||
then
|
||||
doinst="$instcmd"
|
||||
doinst="$instcmd $instflags"
|
||||
elif [ -d "$srcarg" ]
|
||||
then
|
||||
echo "install: $srcarg: not a regular file"
|
||||
|
7982
m4/libtool.m4
vendored
Normal file
7982
m4/libtool.m4
vendored
Normal file
File diff suppressed because it is too large
Load Diff
384
m4/ltoptions.m4
vendored
Normal file
384
m4/ltoptions.m4
vendored
Normal file
@ -0,0 +1,384 @@
|
||||
# Helper functions for option handling. -*- Autoconf -*-
|
||||
#
|
||||
# Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation,
|
||||
# Inc.
|
||||
# Written by Gary V. Vaughan, 2004
|
||||
#
|
||||
# This file is free software; the Free Software Foundation gives
|
||||
# unlimited permission to copy and/or distribute it, with or without
|
||||
# modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 7 ltoptions.m4
|
||||
|
||||
# This is to help aclocal find these macros, as it can't see m4_define.
|
||||
AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
|
||||
|
||||
|
||||
# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
|
||||
# ------------------------------------------
|
||||
m4_define([_LT_MANGLE_OPTION],
|
||||
[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
|
||||
|
||||
|
||||
# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
|
||||
# ---------------------------------------
|
||||
# Set option OPTION-NAME for macro MACRO-NAME, and if there is a
|
||||
# matching handler defined, dispatch to it. Other OPTION-NAMEs are
|
||||
# saved as a flag.
|
||||
m4_define([_LT_SET_OPTION],
|
||||
[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
|
||||
m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
|
||||
_LT_MANGLE_DEFUN([$1], [$2]),
|
||||
[m4_warning([Unknown $1 option `$2'])])[]dnl
|
||||
])
|
||||
|
||||
|
||||
# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
|
||||
# ------------------------------------------------------------
|
||||
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
|
||||
m4_define([_LT_IF_OPTION],
|
||||
[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
|
||||
|
||||
|
||||
# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
|
||||
# -------------------------------------------------------
|
||||
# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
|
||||
# are set.
|
||||
m4_define([_LT_UNLESS_OPTIONS],
|
||||
[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
|
||||
[m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
|
||||
[m4_define([$0_found])])])[]dnl
|
||||
m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
|
||||
])[]dnl
|
||||
])
|
||||
|
||||
|
||||
# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
|
||||
# ----------------------------------------
|
||||
# OPTION-LIST is a space-separated list of Libtool options associated
|
||||
# with MACRO-NAME. If any OPTION has a matching handler declared with
|
||||
# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
|
||||
# the unknown option and exit.
|
||||
m4_defun([_LT_SET_OPTIONS],
|
||||
[# Set options
|
||||
m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
|
||||
[_LT_SET_OPTION([$1], _LT_Option)])
|
||||
|
||||
m4_if([$1],[LT_INIT],[
|
||||
dnl
|
||||
dnl Simply set some default values (i.e off) if boolean options were not
|
||||
dnl specified:
|
||||
_LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
|
||||
])
|
||||
_LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
|
||||
])
|
||||
dnl
|
||||
dnl If no reference was made to various pairs of opposing options, then
|
||||
dnl we run the default mode handler for the pair. For example, if neither
|
||||
dnl `shared' nor `disable-shared' was passed, we enable building of shared
|
||||
dnl archives by default:
|
||||
_LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
|
||||
_LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
|
||||
_LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
|
||||
_LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
|
||||
[_LT_ENABLE_FAST_INSTALL])
|
||||
])
|
||||
])# _LT_SET_OPTIONS
|
||||
|
||||
|
||||
## --------------------------------- ##
|
||||
## Macros to handle LT_INIT options. ##
|
||||
## --------------------------------- ##
|
||||
|
||||
# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
|
||||
# -----------------------------------------
|
||||
m4_define([_LT_MANGLE_DEFUN],
|
||||
[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
|
||||
|
||||
|
||||
# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
|
||||
# -----------------------------------------------
|
||||
m4_define([LT_OPTION_DEFINE],
|
||||
[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
|
||||
])# LT_OPTION_DEFINE
|
||||
|
||||
|
||||
# dlopen
|
||||
# ------
|
||||
LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
|
||||
])
|
||||
|
||||
AU_DEFUN([AC_LIBTOOL_DLOPEN],
|
||||
[_LT_SET_OPTION([LT_INIT], [dlopen])
|
||||
AC_DIAGNOSE([obsolete],
|
||||
[$0: Remove this warning and the call to _LT_SET_OPTION when you
|
||||
put the `dlopen' option into LT_INIT's first parameter.])
|
||||
])
|
||||
|
||||
dnl aclocal-1.4 backwards compatibility:
|
||||
dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
|
||||
|
||||
|
||||
# win32-dll
|
||||
# ---------
|
||||
# Declare package support for building win32 dll's.
|
||||
LT_OPTION_DEFINE([LT_INIT], [win32-dll],
|
||||
[enable_win32_dll=yes
|
||||
|
||||
case $host in
|
||||
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
|
||||
AC_CHECK_TOOL(AS, as, false)
|
||||
AC_CHECK_TOOL(DLLTOOL, dlltool, false)
|
||||
AC_CHECK_TOOL(OBJDUMP, objdump, false)
|
||||
;;
|
||||
esac
|
||||
|
||||
test -z "$AS" && AS=as
|
||||
_LT_DECL([], [AS], [1], [Assembler program])dnl
|
||||
|
||||
test -z "$DLLTOOL" && DLLTOOL=dlltool
|
||||
_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl
|
||||
|
||||
test -z "$OBJDUMP" && OBJDUMP=objdump
|
||||
_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl
|
||||
])# win32-dll
|
||||
|
||||
AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
|
||||
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
|
||||
_LT_SET_OPTION([LT_INIT], [win32-dll])
|
||||
AC_DIAGNOSE([obsolete],
|
||||
[$0: Remove this warning and the call to _LT_SET_OPTION when you
|
||||
put the `win32-dll' option into LT_INIT's first parameter.])
|
||||
])
|
||||
|
||||
dnl aclocal-1.4 backwards compatibility:
|
||||
dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
|
||||
|
||||
|
||||
# _LT_ENABLE_SHARED([DEFAULT])
|
||||
# ----------------------------
|
||||
# implement the --enable-shared flag, and supports the `shared' and
|
||||
# `disable-shared' LT_INIT options.
|
||||
# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
|
||||
m4_define([_LT_ENABLE_SHARED],
|
||||
[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
|
||||
AC_ARG_ENABLE([shared],
|
||||
[AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
|
||||
[build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
|
||||
[p=${PACKAGE-default}
|
||||
case $enableval in
|
||||
yes) enable_shared=yes ;;
|
||||
no) enable_shared=no ;;
|
||||
*)
|
||||
enable_shared=no
|
||||
# Look at the argument we got. We use all the common list separators.
|
||||
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
|
||||
for pkg in $enableval; do
|
||||
IFS="$lt_save_ifs"
|
||||
if test "X$pkg" = "X$p"; then
|
||||
enable_shared=yes
|
||||
fi
|
||||
done
|
||||
IFS="$lt_save_ifs"
|
||||
;;
|
||||
esac],
|
||||
[enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
|
||||
|
||||
_LT_DECL([build_libtool_libs], [enable_shared], [0],
|
||||
[Whether or not to build shared libraries])
|
||||
])# _LT_ENABLE_SHARED
|
||||
|
||||
LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
|
||||
LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
|
||||
|
||||
# Old names:
|
||||
AC_DEFUN([AC_ENABLE_SHARED],
|
||||
[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
|
||||
])
|
||||
|
||||
AC_DEFUN([AC_DISABLE_SHARED],
|
||||
[_LT_SET_OPTION([LT_INIT], [disable-shared])
|
||||
])
|
||||
|
||||
AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
|
||||
AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
|
||||
|
||||
dnl aclocal-1.4 backwards compatibility:
|
||||
dnl AC_DEFUN([AM_ENABLE_SHARED], [])
|
||||
dnl AC_DEFUN([AM_DISABLE_SHARED], [])
|
||||
|
||||
|
||||
|
||||
# _LT_ENABLE_STATIC([DEFAULT])
|
||||
# ----------------------------
|
||||
# implement the --enable-static flag, and support the `static' and
|
||||
# `disable-static' LT_INIT options.
|
||||
# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
|
||||
m4_define([_LT_ENABLE_STATIC],
|
||||
[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
|
||||
AC_ARG_ENABLE([static],
|
||||
[AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
|
||||
[build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
|
||||
[p=${PACKAGE-default}
|
||||
case $enableval in
|
||||
yes) enable_static=yes ;;
|
||||
no) enable_static=no ;;
|
||||
*)
|
||||
enable_static=no
|
||||
# Look at the argument we got. We use all the common list separators.
|
||||
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
|
||||
for pkg in $enableval; do
|
||||
IFS="$lt_save_ifs"
|
||||
if test "X$pkg" = "X$p"; then
|
||||
enable_static=yes
|
||||
fi
|
||||
done
|
||||
IFS="$lt_save_ifs"
|
||||
;;
|
||||
esac],
|
||||
[enable_static=]_LT_ENABLE_STATIC_DEFAULT)
|
||||
|
||||
_LT_DECL([build_old_libs], [enable_static], [0],
|
||||
[Whether or not to build static libraries])
|
||||
])# _LT_ENABLE_STATIC
|
||||
|
||||
LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
|
||||
LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
|
||||
|
||||
# Old names:
|
||||
AC_DEFUN([AC_ENABLE_STATIC],
|
||||
[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
|
||||
])
|
||||
|
||||
AC_DEFUN([AC_DISABLE_STATIC],
|
||||
[_LT_SET_OPTION([LT_INIT], [disable-static])
|
||||
])
|
||||
|
||||
AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
|
||||
AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
|
||||
|
||||
dnl aclocal-1.4 backwards compatibility:
|
||||
dnl AC_DEFUN([AM_ENABLE_STATIC], [])
|
||||
dnl AC_DEFUN([AM_DISABLE_STATIC], [])
|
||||
|
||||
|
||||
|
||||
# _LT_ENABLE_FAST_INSTALL([DEFAULT])
|
||||
# ----------------------------------
|
||||
# implement the --enable-fast-install flag, and support the `fast-install'
|
||||
# and `disable-fast-install' LT_INIT options.
|
||||
# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
|
||||
m4_define([_LT_ENABLE_FAST_INSTALL],
|
||||
[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
|
||||
AC_ARG_ENABLE([fast-install],
|
||||
[AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
|
||||
[optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
|
||||
[p=${PACKAGE-default}
|
||||
case $enableval in
|
||||
yes) enable_fast_install=yes ;;
|
||||
no) enable_fast_install=no ;;
|
||||
*)
|
||||
enable_fast_install=no
|
||||
# Look at the argument we got. We use all the common list separators.
|
||||
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
|
||||
for pkg in $enableval; do
|
||||
IFS="$lt_save_ifs"
|
||||
if test "X$pkg" = "X$p"; then
|
||||
enable_fast_install=yes
|
||||
fi
|
||||
done
|
||||
IFS="$lt_save_ifs"
|
||||
;;
|
||||
esac],
|
||||
[enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
|
||||
|
||||
_LT_DECL([fast_install], [enable_fast_install], [0],
|
||||
[Whether or not to optimize for fast installation])dnl
|
||||
])# _LT_ENABLE_FAST_INSTALL
|
||||
|
||||
LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
|
||||
LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
|
||||
|
||||
# Old names:
|
||||
AU_DEFUN([AC_ENABLE_FAST_INSTALL],
|
||||
[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
|
||||
AC_DIAGNOSE([obsolete],
|
||||
[$0: Remove this warning and the call to _LT_SET_OPTION when you put
|
||||
the `fast-install' option into LT_INIT's first parameter.])
|
||||
])
|
||||
|
||||
AU_DEFUN([AC_DISABLE_FAST_INSTALL],
|
||||
[_LT_SET_OPTION([LT_INIT], [disable-fast-install])
|
||||
AC_DIAGNOSE([obsolete],
|
||||
[$0: Remove this warning and the call to _LT_SET_OPTION when you put
|
||||
the `disable-fast-install' option into LT_INIT's first parameter.])
|
||||
])
|
||||
|
||||
dnl aclocal-1.4 backwards compatibility:
|
||||
dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
|
||||
dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
|
||||
|
||||
|
||||
# _LT_WITH_PIC([MODE])
|
||||
# --------------------
|
||||
# implement the --with-pic flag, and support the `pic-only' and `no-pic'
|
||||
# LT_INIT options.
|
||||
# MODE is either `yes' or `no'. If omitted, it defaults to `both'.
|
||||
m4_define([_LT_WITH_PIC],
|
||||
[AC_ARG_WITH([pic],
|
||||
[AS_HELP_STRING([--with-pic@<:@=PKGS@:>@],
|
||||
[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
|
||||
[lt_p=${PACKAGE-default}
|
||||
case $withval in
|
||||
yes|no) pic_mode=$withval ;;
|
||||
*)
|
||||
pic_mode=default
|
||||
# Look at the argument we got. We use all the common list separators.
|
||||
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
|
||||
for lt_pkg in $withval; do
|
||||
IFS="$lt_save_ifs"
|
||||
if test "X$lt_pkg" = "X$lt_p"; then
|
||||
pic_mode=yes
|
||||
fi
|
||||
done
|
||||
IFS="$lt_save_ifs"
|
||||
;;
|
||||
esac],
|
||||
[pic_mode=default])
|
||||
|
||||
test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
|
||||
|
||||
_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
|
||||
])# _LT_WITH_PIC
|
||||
|
||||
LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
|
||||
LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
|
||||
|
||||
# Old name:
|
||||
AU_DEFUN([AC_LIBTOOL_PICMODE],
|
||||
[_LT_SET_OPTION([LT_INIT], [pic-only])
|
||||
AC_DIAGNOSE([obsolete],
|
||||
[$0: Remove this warning and the call to _LT_SET_OPTION when you
|
||||
put the `pic-only' option into LT_INIT's first parameter.])
|
||||
])
|
||||
|
||||
dnl aclocal-1.4 backwards compatibility:
|
||||
dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
|
||||
|
||||
## ----------------- ##
|
||||
## LTDL_INIT Options ##
|
||||
## ----------------- ##
|
||||
|
||||
m4_define([_LTDL_MODE], [])
|
||||
LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
|
||||
[m4_define([_LTDL_MODE], [nonrecursive])])
|
||||
LT_OPTION_DEFINE([LTDL_INIT], [recursive],
|
||||
[m4_define([_LTDL_MODE], [recursive])])
|
||||
LT_OPTION_DEFINE([LTDL_INIT], [subproject],
|
||||
[m4_define([_LTDL_MODE], [subproject])])
|
||||
|
||||
m4_define([_LTDL_TYPE], [])
|
||||
LT_OPTION_DEFINE([LTDL_INIT], [installable],
|
||||
[m4_define([_LTDL_TYPE], [installable])])
|
||||
LT_OPTION_DEFINE([LTDL_INIT], [convenience],
|
||||
[m4_define([_LTDL_TYPE], [convenience])])
|
123
m4/ltsugar.m4
vendored
Normal file
123
m4/ltsugar.m4
vendored
Normal file
@ -0,0 +1,123 @@
|
||||
# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*-
|
||||
#
|
||||
# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
|
||||
# Written by Gary V. Vaughan, 2004
|
||||
#
|
||||
# This file is free software; the Free Software Foundation gives
|
||||
# unlimited permission to copy and/or distribute it, with or without
|
||||
# modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 6 ltsugar.m4
|
||||
|
||||
# This is to help aclocal find these macros, as it can't see m4_define.
|
||||
AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
|
||||
|
||||
|
||||
# lt_join(SEP, ARG1, [ARG2...])
|
||||
# -----------------------------
|
||||
# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
|
||||
# associated separator.
|
||||
# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
|
||||
# versions in m4sugar had bugs.
|
||||
m4_define([lt_join],
|
||||
[m4_if([$#], [1], [],
|
||||
[$#], [2], [[$2]],
|
||||
[m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
|
||||
m4_define([_lt_join],
|
||||
[m4_if([$#$2], [2], [],
|
||||
[m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
|
||||
|
||||
|
||||
# lt_car(LIST)
|
||||
# lt_cdr(LIST)
|
||||
# ------------
|
||||
# Manipulate m4 lists.
|
||||
# These macros are necessary as long as will still need to support
|
||||
# Autoconf-2.59 which quotes differently.
|
||||
m4_define([lt_car], [[$1]])
|
||||
m4_define([lt_cdr],
|
||||
[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
|
||||
[$#], 1, [],
|
||||
[m4_dquote(m4_shift($@))])])
|
||||
m4_define([lt_unquote], $1)
|
||||
|
||||
|
||||
# lt_append(MACRO-NAME, STRING, [SEPARATOR])
|
||||
# ------------------------------------------
|
||||
# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
|
||||
# Note that neither SEPARATOR nor STRING are expanded; they are appended
|
||||
# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
|
||||
# No SEPARATOR is output if MACRO-NAME was previously undefined (different
|
||||
# than defined and empty).
|
||||
#
|
||||
# This macro is needed until we can rely on Autoconf 2.62, since earlier
|
||||
# versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
|
||||
m4_define([lt_append],
|
||||
[m4_define([$1],
|
||||
m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
|
||||
|
||||
|
||||
|
||||
# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
|
||||
# ----------------------------------------------------------
|
||||
# Produce a SEP delimited list of all paired combinations of elements of
|
||||
# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list
|
||||
# has the form PREFIXmINFIXSUFFIXn.
|
||||
# Needed until we can rely on m4_combine added in Autoconf 2.62.
|
||||
m4_define([lt_combine],
|
||||
[m4_if(m4_eval([$# > 3]), [1],
|
||||
[m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
|
||||
[[m4_foreach([_Lt_prefix], [$2],
|
||||
[m4_foreach([_Lt_suffix],
|
||||
]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
|
||||
[_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
|
||||
|
||||
|
||||
# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
|
||||
# -----------------------------------------------------------------------
|
||||
# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
|
||||
# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
|
||||
m4_define([lt_if_append_uniq],
|
||||
[m4_ifdef([$1],
|
||||
[m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
|
||||
[lt_append([$1], [$2], [$3])$4],
|
||||
[$5])],
|
||||
[lt_append([$1], [$2], [$3])$4])])
|
||||
|
||||
|
||||
# lt_dict_add(DICT, KEY, VALUE)
|
||||
# -----------------------------
|
||||
m4_define([lt_dict_add],
|
||||
[m4_define([$1($2)], [$3])])
|
||||
|
||||
|
||||
# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
|
||||
# --------------------------------------------
|
||||
m4_define([lt_dict_add_subkey],
|
||||
[m4_define([$1($2:$3)], [$4])])
|
||||
|
||||
|
||||
# lt_dict_fetch(DICT, KEY, [SUBKEY])
|
||||
# ----------------------------------
|
||||
m4_define([lt_dict_fetch],
|
||||
[m4_ifval([$3],
|
||||
m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
|
||||
m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
|
||||
|
||||
|
||||
# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
|
||||
# -----------------------------------------------------------------
|
||||
m4_define([lt_if_dict_fetch],
|
||||
[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
|
||||
[$5],
|
||||
[$6])])
|
||||
|
||||
|
||||
# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
|
||||
# --------------------------------------------------------------
|
||||
m4_define([lt_dict_filter],
|
||||
[m4_if([$5], [], [],
|
||||
[lt_join(m4_quote(m4_default([$4], [[, ]])),
|
||||
lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
|
||||
[lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
|
||||
])
|
23
m4/ltversion.m4
vendored
Normal file
23
m4/ltversion.m4
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
# ltversion.m4 -- version numbers -*- Autoconf -*-
|
||||
#
|
||||
# Copyright (C) 2004 Free Software Foundation, Inc.
|
||||
# Written by Scott James Remnant, 2004
|
||||
#
|
||||
# This file is free software; the Free Software Foundation gives
|
||||
# unlimited permission to copy and/or distribute it, with or without
|
||||
# modifications, as long as this notice is preserved.
|
||||
|
||||
# @configure_input@
|
||||
|
||||
# serial 3337 ltversion.m4
|
||||
# This file is part of GNU Libtool
|
||||
|
||||
m4_define([LT_PACKAGE_VERSION], [2.4.2])
|
||||
m4_define([LT_PACKAGE_REVISION], [1.3337])
|
||||
|
||||
AC_DEFUN([LTVERSION_VERSION],
|
||||
[macro_version='2.4.2'
|
||||
macro_revision='1.3337'
|
||||
_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
|
||||
_LT_DECL(, macro_revision, 0)
|
||||
])
|
98
m4/lt~obsolete.m4
vendored
Normal file
98
m4/lt~obsolete.m4
vendored
Normal file
@ -0,0 +1,98 @@
|
||||
# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*-
|
||||
#
|
||||
# Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc.
|
||||
# Written by Scott James Remnant, 2004.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation gives
|
||||
# unlimited permission to copy and/or distribute it, with or without
|
||||
# modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 5 lt~obsolete.m4
|
||||
|
||||
# These exist entirely to fool aclocal when bootstrapping libtool.
|
||||
#
|
||||
# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
|
||||
# which have later been changed to m4_define as they aren't part of the
|
||||
# exported API, or moved to Autoconf or Automake where they belong.
|
||||
#
|
||||
# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN
|
||||
# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
|
||||
# using a macro with the same name in our local m4/libtool.m4 it'll
|
||||
# pull the old libtool.m4 in (it doesn't see our shiny new m4_define
|
||||
# and doesn't know about Autoconf macros at all.)
|
||||
#
|
||||
# So we provide this file, which has a silly filename so it's always
|
||||
# included after everything else. This provides aclocal with the
|
||||
# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
|
||||
# because those macros already exist, or will be overwritten later.
|
||||
# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
|
||||
#
|
||||
# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
|
||||
# Yes, that means every name once taken will need to remain here until
|
||||
# we give up compatibility with versions before 1.7, at which point
|
||||
# we need to keep only those names which we still refer to.
|
||||
|
||||
# This is to help aclocal find these macros, as it can't see m4_define.
|
||||
AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
|
||||
|
||||
m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
|
||||
m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])])
|
||||
m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
|
||||
m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])])
|
||||
m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
|
||||
m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])])
|
||||
m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])])
|
||||
m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
|
||||
m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])])
|
||||
m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])])
|
||||
m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])])
|
||||
m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
|
||||
m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
|
||||
m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
|
||||
m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
|
||||
m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])])
|
||||
m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])])
|
||||
m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
|
||||
m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
|
||||
m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])])
|
||||
m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])])
|
||||
m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
|
||||
m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
|
||||
m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
|
||||
m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
|
||||
m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
|
||||
m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
|
||||
m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
|
||||
m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])])
|
||||
m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])])
|
||||
m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])])
|
||||
m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
|
||||
m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])])
|
||||
m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])])
|
||||
m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])])
|
||||
m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])])
|
||||
m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
|
||||
m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])])
|
||||
m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
|
||||
m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])])
|
||||
m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])])
|
||||
m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])])
|
||||
m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
|
||||
m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
|
||||
m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
|
||||
m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
|
||||
m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
|
||||
m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
|
||||
m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
|
||||
m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
|
||||
m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
|
||||
m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
|
||||
m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])])
|
||||
m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
|
||||
m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])])
|
||||
m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])])
|
||||
m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])])
|
||||
m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])])
|
||||
m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])])
|
||||
m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])])
|
||||
m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])])
|
@ -1,6 +1,6 @@
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# $File: adventure,v 1.13 2010/12/31 16:32:54 christos Exp $
|
||||
# $File: adventure,v 1.14 2012/06/21 01:32:26 christos Exp $
|
||||
# adventure: file(1) magic for Adventure game files
|
||||
#
|
||||
# from Allen Garvin <earendil@faeryland.tamu-commerce.edu>
|
||||
@ -33,10 +33,14 @@
|
||||
#
|
||||
0 ubyte >0
|
||||
>0 ubyte <9
|
||||
>>16 belong&0xfe00f0f0 0x3030 Infocom game data
|
||||
>>>0 ubyte x (Z-machine %d,
|
||||
>>>>2 ubeshort x Release %d /
|
||||
>>>>18 string >\0 Serial %.6s)
|
||||
>>16 belong&0xfe00f0f0 0x3030
|
||||
>>>0 ubyte < 10
|
||||
>>>>2 ubeshort < 10
|
||||
>>>>>18 regex [0-9][0-9][0-9][0-9][0-9][0-9]
|
||||
>>>>>>0 ubyte < 10 Infocom (Z-machine %d,
|
||||
>>>>>>>2 ubeshort < 10 Release %d /
|
||||
>>>>>>>>18 string >\0 Serial %.6s)
|
||||
!:strength + 40
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# Glulx: file(1) magic for Glulx binaries.
|
@ -1,6 +1,6 @@
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# $File: amigaos,v 1.14 2009/09/19 16:28:07 christos Exp $
|
||||
# $File: amigaos,v 1.15 2012/06/21 01:13:59 christos Exp $
|
||||
# amigaos: file(1) magic for AmigaOS binary formats:
|
||||
|
||||
#
|
||||
@ -63,3 +63,6 @@
|
||||
# From: Alex Beregszaszi <alex@fsn.hu>
|
||||
0 string LZX LZX compressed archive (Amiga)
|
||||
|
||||
# From: Przemek Kramarczyk <pkramarczyk@gmail.com>
|
||||
0 string .KEY AmigaDOS script
|
||||
0 string .key AmigaDOS script
|
100
magic/Magdir/android
Normal file
100
magic/Magdir/android
Normal file
@ -0,0 +1,100 @@
|
||||
|
||||
#------------------------------------------------------------
|
||||
# $File: android,v 1.4 2014/06/03 19:01:34 christos Exp $
|
||||
# Various android related magic entries
|
||||
#------------------------------------------------------------
|
||||
|
||||
# Dalvik .dex format. http://retrodev.com/android/dexformat.html
|
||||
# From <mkf@google.com> "Mike Fleming"
|
||||
# Fixed to avoid regexec 17 errors on some dex files
|
||||
# From <diff@lookout.com> "Tim Strazzere"
|
||||
0 string dex\n
|
||||
>0 regex dex\n[0-9]{2}\0 Dalvik dex file
|
||||
>4 string >000 version %s
|
||||
0 string dey\n
|
||||
>0 regex dey\n[0-9]{2}\0 Dalvik dex file (optimized for host)
|
||||
>4 string >000 version %s
|
||||
|
||||
# http://android.stackexchange.com/questions/23357/\
|
||||
# is-there-a-way-to-look-inside-and-modify-an-adb-backup-created-file/\
|
||||
# 23608#23608
|
||||
0 string ANDROID\040BACKUP\n Android Backup
|
||||
>15 string 1\n \b, version 1
|
||||
>17 string 0\n \b, uncompressed
|
||||
>17 string 1\n \b, compressed
|
||||
>19 string none\n \b, unencrypted
|
||||
>19 string AES-256\n \b, encrypted AES-256
|
||||
|
||||
# Android bootimg format
|
||||
# From https://android.googlesource.com/\
|
||||
# platform/system/core/+/master/mkbootimg/bootimg.h
|
||||
0 string ANDROID! Android bootimg
|
||||
>8 lelong >0 \b, kernel
|
||||
>>12 lelong >0 \b (0x%x)
|
||||
>16 lelong >0 \b, ramdisk
|
||||
>>20 lelong >0 \b (0x%x)
|
||||
>24 lelong >0 \b, second stage
|
||||
>>28 lelong >0 \b (0x%x)
|
||||
>36 lelong >0 \b, page size: %d
|
||||
>38 string >0 \b, name: %s
|
||||
>64 string >0 \b, cmdline (%s)
|
||||
# Dalvik .dex format. http://retrodev.com/android/dexformat.html
|
||||
# From <mkf@google.com> "Mike Fleming"
|
||||
# Fixed to avoid regexec 17 errors on some dex files
|
||||
# From <diff@lookout.com> "Tim Strazzere"
|
||||
0 string dex\n
|
||||
>0 regex dex\n[0-9]{2}\0 Dalvik dex file
|
||||
>4 string >000 version %s
|
||||
0 string dey\n
|
||||
>0 regex dey\n[0-9]{2}\0 Dalvik dex file (optimized for host)
|
||||
>4 string >000 version %s
|
||||
|
||||
# http://android.stackexchange.com/questions/23357/\
|
||||
# is-there-a-way-to-look-inside-and-modify-an-adb-backup-created-file/\
|
||||
# 23608#23608
|
||||
0 string ANDROID\040BACKUP\n Android Backup
|
||||
>15 string 1\n \b, version 1
|
||||
>17 string 0\n \b, uncompressed
|
||||
>17 string 1\n \b, compressed
|
||||
>19 string none\n \b, unencrypted
|
||||
>19 string AES-256\n \b, encrypted AES-256
|
||||
|
||||
# Android bootimg format
|
||||
# From https://android.googlesource.com/\
|
||||
# platform/system/core/+/master/mkbootimg/bootimg.h
|
||||
0 string ANDROID! Android bootimg
|
||||
>8 lelong >0 \b, kernel
|
||||
>>12 lelong >0 \b (0x%x)
|
||||
>16 lelong >0 \b, ramdisk
|
||||
>>20 lelong >0 \b (0x%x)
|
||||
>24 lelong >0 \b, second stage
|
||||
>>28 lelong >0 \b (0x%x)
|
||||
>36 lelong >0 \b, page size: %d
|
||||
>38 string >0 \b, name: %s
|
||||
>64 string >0 \b, cmdline (%s)
|
||||
|
||||
# Android Backup archive
|
||||
# From: Ariel Shkedi
|
||||
# File extension: .ab
|
||||
# No mime-type defined
|
||||
# URL: https://github.com/android/platform_frameworks_base/blob/\
|
||||
# 0bacfd2ba68d21a68a3df345b830bc2a1e515b5a/services/java/com/\
|
||||
# android/server/BackupManagerService.java#L2367
|
||||
# After the header comes a tar file
|
||||
# If compressed, the entire tar file is compressed with JAVA deflate
|
||||
#
|
||||
# Include the version number hardcoded with the magic string to avoid
|
||||
# false positives
|
||||
0 string/b ANDROID\ BACKUP\n1\n Android Backup
|
||||
>17 string 0\n \b, Not-Compressed
|
||||
>17 string 1\n \b, Compressed
|
||||
# any string as long as it's not the word none (which is matched below)
|
||||
>>19 regex/1l \^([^n\n]|n[^o]|no[^n]|non[^e]|none.+).* \b, Encrypted (%s)
|
||||
>>19 string none\n \b, Not-Encrypted
|
||||
# Commented out because they don't seem useful to print
|
||||
# (but they are part of the header - the tar file comes after them):
|
||||
#>>>&1 regex/1l .* \b, Password salt: %s
|
||||
#>>>>&1 regex/1l .* \b, Master salt: %s
|
||||
#>>>>>&1 regex/1l .* \b, PBKDF2 rounds: %s
|
||||
#>>>>>>&1 regex/1l .* \b, IV: %s
|
||||
#>>>>>>>&1 regex/1l .* \b, Key: %s
|
@ -1,6 +1,6 @@
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# $File: animation,v 1.45 2011/09/06 11:00:06 christos Exp $
|
||||
# $File: animation,v 1.53 2014/04/30 21:41:02 christos Exp $
|
||||
# animation: file(1) magic for animation/movie formats
|
||||
#
|
||||
# animation formats
|
||||
@ -89,7 +89,10 @@
|
||||
>>4 byte 77 \b, main
|
||||
>>4 byte 88 \b, extended
|
||||
>>6 byte x \b @ L %u
|
||||
# GRR too general as it catches also FoxPro Memo example NG.FPT
|
||||
>3 byte 0xB0 MPEG sequence, v4
|
||||
# TODO: maybe this extra line exclude FoxPro Memo example NG.FPT starting with 000001b0 00000100 00000000
|
||||
#>>4 byte !0 MPEG sequence, v4
|
||||
!:mime video/mpeg4-generic
|
||||
>>5 belong 0x000001B5
|
||||
>>>9 byte &0x80
|
||||
@ -448,6 +451,7 @@
|
||||
|
||||
# MP2, M2A
|
||||
0 beshort&0xFFFE 0xFFF4 MPEG ADTS, layer II, v2
|
||||
!:mime audio/mpeg
|
||||
# rate
|
||||
>2 byte&0xF0 0x10 \b, 8 kbps
|
||||
>2 byte&0xF0 0x20 \b, 16 kbps
|
||||
@ -617,7 +621,7 @@
|
||||
# Live MPEG-4 audio streams (instead of RTP FlexMux)
|
||||
0 beshort&0xFFE0 0x56E0 MPEG-4 LOAS
|
||||
!:mime audio/x-mp4a-latm
|
||||
#>1 beshort&0x1FFF x \b, %u byte packet
|
||||
#>1 beshort&0x1FFF x \b, %hu byte packet
|
||||
>3 byte&0xE0 0x40
|
||||
>>4 byte&0x3C 0x04 \b, single stream
|
||||
>>4 byte&0x3C 0x08 \b, 2 streams
|
||||
@ -688,10 +692,6 @@
|
||||
# iso 13818 transport stream
|
||||
#
|
||||
# from Oskar Schirmer <schirmer@scara.com> Feb 3, 2001 (ISO 13818.1)
|
||||
# (the following is a little bit restrictive and works fine for a stream
|
||||
# that starts with PAT properly. it won't work for stream data, that is
|
||||
# cut from an input device data right in the middle, but this shouldn't
|
||||
# disturb)
|
||||
# syncbyte 8 bit 0x47
|
||||
# error_ind 1 bit -
|
||||
# payload_start 1 bit 1
|
||||
@ -699,9 +699,9 @@
|
||||
# PID 13 bit 0x0000
|
||||
# scrambling 2 bit -
|
||||
# adaptfld_ctrl 2 bit 1 or 3
|
||||
# conti_count 4 bit 0
|
||||
0 belong&0xFF5FFF1F 0x47400010 MPEG transport stream data
|
||||
>188 byte !0x47 CORRUPTED
|
||||
# conti_count 4 bit -
|
||||
0 belong&0xFF5FFF10 0x47400010
|
||||
>188 byte 0x47 MPEG transport stream data
|
||||
|
||||
# DIF digital video file format <mpruett@sgi.com>
|
||||
0 belong&0xffffff00 0x1f070000 DIF
|
||||
@ -719,16 +719,16 @@
|
||||
!:mime video/x-mng
|
||||
>4 belong !0x0d0a1a0a CORRUPTED,
|
||||
>4 belong 0x0d0a1a0a
|
||||
>>16 belong x %ld x
|
||||
>>20 belong x %ld
|
||||
>>16 belong x %d x
|
||||
>>20 belong x %d
|
||||
|
||||
# JNG Video Format, <URL:http://www.libpng.org/pub/mng/spec/>
|
||||
0 string \x8bJNG JNG video data,
|
||||
!:mime video/x-jng
|
||||
>4 belong !0x0d0a1a0a CORRUPTED,
|
||||
>4 belong 0x0d0a1a0a
|
||||
>>16 belong x %ld x
|
||||
>>20 belong x %ld
|
||||
>>16 belong x %d x
|
||||
>>20 belong x %d
|
||||
|
||||
# Vivo video (Wolfram Kleff)
|
||||
3 string \x0D\x0AVersion:Vivo Vivo video data
|
||||
@ -755,7 +755,7 @@
|
||||
>0 byte x GameCube movie,
|
||||
>0x34 ubeshort x %d x
|
||||
>0x36 ubeshort x %d,
|
||||
>0x26 ubeshort x %dµs,
|
||||
>0x26 ubeshort x %dus,
|
||||
>0x42 ubeshort 0 no audio
|
||||
>0x42 ubeshort >0 %dHz audio
|
||||
|
||||
@ -789,25 +789,26 @@
|
||||
|
||||
# MPEG file
|
||||
# MPEG sequences
|
||||
# FIXME: This section is from the old magic.mime file and needs integrating with the rest
|
||||
0 belong 0x000001BA
|
||||
>4 byte &0x40
|
||||
!:mime video/mp2p
|
||||
>4 byte ^0x40
|
||||
!:mime video/mpeg
|
||||
0 belong 0x000001BB
|
||||
!:mime video/mpeg
|
||||
0 belong 0x000001B0
|
||||
!:mime video/mp4v-es
|
||||
0 belong 0x000001B5
|
||||
!:mime video/mp4v-es
|
||||
0 belong 0x000001B3
|
||||
!:mime video/mpv
|
||||
0 belong&0xFF5FFF1F 0x47400010
|
||||
!:mime video/mp2t
|
||||
0 belong 0x00000001
|
||||
>4 byte&0x1F 0x07
|
||||
!:mime video/h264
|
||||
# FIXME: This section is from the old magic.mime file and needs
|
||||
# integrating with the rest
|
||||
#0 belong 0x000001BA
|
||||
#>4 byte &0x40
|
||||
#!:mime video/mp2p
|
||||
#>4 byte ^0x40
|
||||
#!:mime video/mpeg
|
||||
#0 belong 0x000001BB
|
||||
#!:mime video/mpeg
|
||||
#0 belong 0x000001B0
|
||||
#!:mime video/mp4v-es
|
||||
#0 belong 0x000001B5
|
||||
#!:mime video/mp4v-es
|
||||
#0 belong 0x000001B3
|
||||
#!:mime video/mpv
|
||||
#0 belong&0xFF5FFF10 0x47400010
|
||||
#!:mime video/mp2t
|
||||
#0 belong 0x00000001
|
||||
#>4 byte&0x1F 0x07
|
||||
#!:mime video/h264
|
||||
|
||||
# Type: Bink Video
|
||||
# Extension: .bik
|
46
magic/Magdir/aout
Normal file
46
magic/Magdir/aout
Normal file
@ -0,0 +1,46 @@
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# $File: aout,v 1.1 2013/01/09 22:37:23 christos Exp $
|
||||
# aout: file(1) magic for a.out executable/object/etc entries that
|
||||
# handle executables on multiple platforms.
|
||||
#
|
||||
|
||||
#
|
||||
# Little-endian 32-bit-int a.out, merged from bsdi (for BSD/OS, from
|
||||
# BSDI), netbsd, and vax (for UNIX/32V and BSD)
|
||||
#
|
||||
# XXX - is there anything we can look at to distinguish BSD/OS 386 from
|
||||
# NetBSD 386 from various VAX binaries? The BSD/OS shared library flag
|
||||
# works only for binaries using shared libraries. Grabbing the entry
|
||||
# point from the a.out header, using it to find the first code executed
|
||||
# in the program, and looking at that might help.
|
||||
#
|
||||
0 lelong 0407 a.out little-endian 32-bit executable
|
||||
>16 lelong >0 not stripped
|
||||
>32 byte 0x6a (uses BSD/OS shared libs)
|
||||
|
||||
0 lelong 0410 a.out little-endian 32-bit pure executable
|
||||
>16 lelong >0 not stripped
|
||||
>32 byte 0x6a (uses BSD/OS shared libs)
|
||||
|
||||
0 lelong 0413 a.out little-endian 32-bit demand paged pure executable
|
||||
>16 lelong >0 not stripped
|
||||
>32 byte 0x6a (uses BSD/OS shared libs)
|
||||
|
||||
#
|
||||
# Big-endian 32-bit-int a.out, merged from sun (for old 68010 SunOS a.out),
|
||||
# mips (for old 68020(!) SGI a.out), and netbsd (for old big-endian a.out).
|
||||
#
|
||||
# XXX - is there anything we can look at to distinguish old SunOS 68010
|
||||
# from old 68020 IRIX from old NetBSD? Again, I guess we could look at
|
||||
# the first instruction or instructions in the program.
|
||||
#
|
||||
0 belong 0407 a.out big-endian 32-bit executable
|
||||
>16 belong >0 not stripped
|
||||
|
||||
0 belong 0410 a.out big-endian 32-bit pure executable
|
||||
>16 belong >0 not stripped
|
||||
|
||||
0 belong 0413 a.out big-endian 32-bit demand paged executable
|
||||
>16 belong >0 not stripped
|
||||
|
@ -1,6 +1,6 @@
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# $File: apple,v 1.24 2010/11/25 15:00:12 christos Exp $
|
||||
# $File: apple,v 1.29 2014/04/30 21:41:02 christos Exp $
|
||||
# apple: file(1) magic for Apple file formats
|
||||
#
|
||||
0 search/1/t FiLeStArTfIlEsTaRt binscii (apple ][) text
|
||||
@ -106,8 +106,13 @@
|
||||
# This is incredibly sloppy, but will be true if the program was
|
||||
# written at its usual memory location of 2048 and its first line
|
||||
# number is less than 256. Yuck.
|
||||
# update by Joerg Jenderek at Feb 2013
|
||||
|
||||
0 belong&0xff00ff 0x80000 Applesoft BASIC program data
|
||||
# GRR: this test is still too general as it catches also Gujin BOOT144.SYS (0xfa080000)
|
||||
#0 belong&0xff00ff 0x80000 Applesoft BASIC program data
|
||||
0 belong&0x00ff00ff 0x00080000
|
||||
# assuming that line number must be positive
|
||||
>2 leshort >0 Applesoft BASIC program data, first line number %d
|
||||
#>2 leshort x \b, first line number %d
|
||||
|
||||
# ORCA/EZ assembler:
|
||||
@ -199,15 +204,15 @@
|
||||
# purposes in YellowStep/Cocoa, including some nib files.
|
||||
# From: David Remahl <dremahl@apple.com>
|
||||
2 string typedstream NeXT/Apple typedstream data, big endian
|
||||
>0 byte x \b, version %hhd
|
||||
>0 byte x \b, version %d
|
||||
>0 byte <5 \b
|
||||
>>13 byte 0x81 \b
|
||||
>>>14 ubeshort x \b, system %hd
|
||||
>>>14 ubeshort x \b, system %d
|
||||
2 string streamtyped NeXT/Apple typedstream data, little endian
|
||||
>0 byte x \b, version %hhd
|
||||
>0 byte x \b, version %d
|
||||
>0 byte <5 \b
|
||||
>>13 byte 0x81 \b
|
||||
>>>14 uleshort x \b, system %hd
|
||||
>>>14 uleshort x \b, system %d
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# CAF: Apple CoreAudio File Format
|
||||
@ -249,3 +254,49 @@
|
||||
# From: "Nelson A. de Oliveira" <naoliv@gmail.com>
|
||||
# .vdi
|
||||
4 string innotek\ VirtualBox\ Disk\ Image %s
|
||||
|
||||
# Apple disk partition stuff, strengthen the magic using byte 4
|
||||
0 beshort 0x4552
|
||||
>4 byte 0 Apple Driver Map
|
||||
>>2 beshort x \b, blocksize %d
|
||||
>>4 belong x \b, blockcount %d
|
||||
>>10 beshort x \b, devtype %d
|
||||
>>12 beshort x \b, devid %d
|
||||
>>20 beshort x \b, descriptors %d
|
||||
# Assume 8 partitions each at a multiple of the sector size.
|
||||
# We could glean this from the partition descriptors, but they are empty!?!?
|
||||
>>(2.S*1) indirect \b, contains[@0x%x]:
|
||||
>>(2.S*2) indirect \b, contains[@0x%x]:
|
||||
>>(2.S*3) indirect \b, contains[@0x%x]:
|
||||
>>(2.S*4) indirect \b, contains[@0x%x]:
|
||||
>>(2.S*5) indirect \b, contains[@0x%x]:
|
||||
>>(2.S*6) indirect \b, contains[@0x%x]:
|
||||
>>(2.S*7) indirect \b, contains[@0x%x]:
|
||||
>>(2.S*8) indirect \b, contains[@0x%x]:
|
||||
|
||||
# Yes, the 3rd and 4th bytes are reserved, but we use them to make the
|
||||
# magic stronger.
|
||||
0 belong 0x504d0000 Apple Partition Map
|
||||
>4 belong x \b, map block count %d
|
||||
>8 belong x \b, start block %d
|
||||
>12 belong x \b, block count %d
|
||||
>16 string >0 \b, name %s
|
||||
>48 string >0 \b, type %s
|
||||
>124 string >0 \b, processor %s
|
||||
>140 string >0 \b, boot arguments %s
|
||||
>92 belong & 1 \b, valid
|
||||
>92 belong & 2 \b, allocated
|
||||
>92 belong & 4 \b, in use
|
||||
>92 belong & 8 \b, has boot info
|
||||
>92 belong & 16 \b, readable
|
||||
>92 belong & 32 \b, writable
|
||||
>92 belong & 64 \b, pic boot code
|
||||
>92 belong & 128 \b, chain compatible driver
|
||||
>92 belong & 256 \b, real driver
|
||||
>92 belong & 512 \b, chain driver
|
||||
>92 belong & 1024 \b, mount at startup
|
||||
>92 belong & 2048 \b, is the startup partition
|
||||
|
||||
#http://wiki.mozilla.org/DS_Store_File_Format`
|
||||
#http://en.wikipedia.org/wiki/.DS_Store
|
||||
0 string \0\0\0\1Bud1\0 Apple Desktop Services Store
|
@ -1,5 +1,5 @@
|
||||
#------------------------------------------------------------------------------
|
||||
# $File: archive,v 1.70 2011/10/26 15:44:47 christos Exp $
|
||||
# $File: archive,v 1.87 2014/06/03 19:15:58 christos Exp $
|
||||
# archive: file(1) magic for archive formats (see also "msdos" for self-
|
||||
# extracting compressed archives)
|
||||
#
|
||||
@ -36,12 +36,66 @@
|
||||
0 string 070701 ASCII cpio archive (SVR4 with no CRC)
|
||||
0 string 070702 ASCII cpio archive (SVR4 with CRC)
|
||||
|
||||
# Debian package (needs to go before regular portable archives)
|
||||
#
|
||||
# Various archive formats used by various versions of the "ar"
|
||||
# command.
|
||||
#
|
||||
|
||||
#
|
||||
# Original UNIX archive formats.
|
||||
# They were written with binary values in host byte order, and
|
||||
# the magic number was a host "int", which might have been 16 bits
|
||||
# or 32 bits. We don't say "PDP-11" or "VAX", as there might have
|
||||
# been ports to little-endian 16-bit-int or 32-bit-int platforms
|
||||
# (x86?) using some of those formats; if none existed, feel free
|
||||
# to use "PDP-11" for little-endian 16-bit and "VAX" for little-endian
|
||||
# 32-bit. There might have been big-endian ports of that sort as
|
||||
# well.
|
||||
#
|
||||
0 leshort 0177555 very old 16-bit-int little-endian archive
|
||||
0 beshort 0177555 very old 16-bit-int big-endian archive
|
||||
0 lelong 0177555 very old 32-bit-int little-endian archive
|
||||
0 belong 0177555 very old 32-bit-int big-endian archive
|
||||
|
||||
0 leshort 0177545 old 16-bit-int little-endian archive
|
||||
>2 string __.SYMDEF random library
|
||||
0 beshort 0177545 old 16-bit-int big-endian archive
|
||||
>2 string __.SYMDEF random library
|
||||
0 lelong 0177545 old 32-bit-int little-endian archive
|
||||
>4 string __.SYMDEF random library
|
||||
0 belong 0177545 old 32-bit-int big-endian archive
|
||||
>4 string __.SYMDEF random library
|
||||
|
||||
#
|
||||
# From "pdp" (but why a 4-byte quantity?)
|
||||
#
|
||||
0 lelong 0x39bed PDP-11 old archive
|
||||
0 lelong 0x39bee PDP-11 4.0 archive
|
||||
|
||||
#
|
||||
# XXX - what flavor of APL used this, and was it a variant of
|
||||
# some ar archive format? It's similar to, but not the same
|
||||
# as, the APL workspace magic numbers in pdp.
|
||||
#
|
||||
0 long 0100554 apl workspace
|
||||
|
||||
#
|
||||
# System V Release 1 portable(?) archive format.
|
||||
#
|
||||
0 string =<ar> System V Release 1 ar archive
|
||||
!:mime application/x-archive
|
||||
|
||||
#
|
||||
# Debian package; it's in the portable archive format, and needs to go
|
||||
# before the entry for regular portable archives, as it's recognized as
|
||||
# a portable archive whose first member has a name beginning with
|
||||
# "debian".
|
||||
#
|
||||
0 string =!<arch>\ndebian
|
||||
!:mime application/x-debian-package
|
||||
>8 string debian-split part of multipart Debian package
|
||||
!:mime application/vnd.debian.binary-package
|
||||
>8 string debian-binary Debian binary package
|
||||
!:mime application/vnd.debian.binary-package
|
||||
>8 string !debian
|
||||
>68 string >\0 (format %s)
|
||||
# These next two lines do not work, because a bzip2 Debian archive
|
||||
@ -53,18 +107,14 @@
|
||||
#>84 string gz \b, uses gzip compression
|
||||
#>136 ledate x created: %s
|
||||
|
||||
# other archives
|
||||
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 long 0100554 apl workspace
|
||||
0 string =<ar> archive
|
||||
!:mime application/x-archive
|
||||
|
||||
# MIPS archive (needs to go before regular portable archives)
|
||||
#
|
||||
# MIPS archive; they're in the portable archive format, and need to go
|
||||
# before the entry for regular portable archives, as it's recognized as
|
||||
# a portable archive whose first member has a name beginning with
|
||||
# "__________E".
|
||||
#
|
||||
0 string =!<arch>\n__________E MIPS archive
|
||||
!:mime application/x-archive
|
||||
>20 string U with MIPS Ucode members
|
||||
>21 string L with MIPSEL members
|
||||
>21 string B with MIPSEB members
|
||||
@ -75,56 +125,20 @@
|
||||
0 search/1 -h- Software Tools format archive text
|
||||
|
||||
#
|
||||
# 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 SVR1 archives, we have:
|
||||
#
|
||||
# 0 string \<ar> System V Release 1 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?
|
||||
# BSD/SVR2-and-later portable archive formats.
|
||||
#
|
||||
0 string =!<arch> current ar archive
|
||||
!:mime application/x-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
|
||||
>68 string __.SYMDEF\ SORTED random library
|
||||
|
||||
#
|
||||
# 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....
|
||||
# "Thin" archive, as can be produced by GNU ar.
|
||||
#
|
||||
0 belong 0x65ff0000 VAX 3.0 archive
|
||||
0 belong 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
|
||||
#
|
||||
# From "pdp" (but why a 4-byte quantity?)
|
||||
#
|
||||
0 lelong 0x39bed PDP-11 old archive
|
||||
0 lelong 0x39bee PDP-11 4.0 archive
|
||||
0 string =!<thin>\n thin archive with
|
||||
>68 belong 0 no symbol entries
|
||||
>68 belong 1 %d symbol entry
|
||||
>68 belong >1 %d symbol entries
|
||||
|
||||
# ARC archiver, from Daniel Quinlan (quinlan@yggdrasil.com)
|
||||
#
|
||||
@ -184,7 +198,10 @@
|
||||
# SAR
|
||||
3 string LH5 SAR archive data
|
||||
# BSArc/BS2
|
||||
0 string \212\3SB \0 BSArc/BS2 archive data
|
||||
0 string \212\3SB\020\0 BSArc/BS2 archive data
|
||||
# Bethesda Softworks Archive (Oblivion)
|
||||
0 string BSA\0 BSArc archive data
|
||||
>4 lelong x version %d
|
||||
# MAR
|
||||
2 string =-ah MAR archive data
|
||||
# ACB
|
||||
@ -209,7 +226,7 @@
|
||||
# AMGC
|
||||
0 string \xad6" AMGC archive data
|
||||
# NuLIB
|
||||
0 string NõFélå NuLIB archive data
|
||||
0 string N\xc3\xb5F\xc3\xa9lx\xc3\xa5 NuLIB archive data
|
||||
# PakLeo
|
||||
0 string LEOLZW PAKLeo archive data
|
||||
# ChArc
|
||||
@ -221,7 +238,7 @@
|
||||
# Freeze
|
||||
0 string \x1f\x9f\x4a\x10\x0a Freeze archive data
|
||||
# KBoom
|
||||
0 string ¨MP¨ KBoom archive data
|
||||
0 string \xc2\xa8MP\xc2\xa8 KBoom archive data
|
||||
# NSQ, must go after CDC Codec
|
||||
0 string \x76\xff NSQ archive data
|
||||
# DPA
|
||||
@ -252,14 +269,14 @@
|
||||
>9 string \0
|
||||
>>0 string KWAJ
|
||||
>>>7 string \321\003 MS Compress archive data
|
||||
>>>>14 ulong >0 \b, original size: %ld bytes
|
||||
>>>>14 ulong >0 \b, original size: %d bytes
|
||||
>>>>18 ubyte >0x65
|
||||
>>>>>18 string x \b, was %.8s
|
||||
>>>>>(10.b-4) string x \b.%.3s
|
||||
# MP3 (archiver, not lossy audio compression)
|
||||
0 string MP3\x1a MP3-Archiver archive data
|
||||
# ZET
|
||||
0 string OZÝ ZET archive data
|
||||
0 string OZ\xc3\x9d ZET archive data
|
||||
# TSComp
|
||||
0 string \x65\x5d\x13\x8c\x08\x01\x03\x00 TSComp archive data
|
||||
# ARQ
|
||||
@ -290,7 +307,7 @@
|
||||
# Xtreme
|
||||
0 string ULEB\0 Xtreme archive data
|
||||
# Pack Magic
|
||||
0 string @â\1\0 Pack Magic archive data
|
||||
0 string @\xc3\xa2\1\0 Pack Magic archive data
|
||||
# BTS
|
||||
0 belong&0xfeffffff 0x1a034465 BTS archive data
|
||||
# ELI 5750
|
||||
@ -426,7 +443,7 @@
|
||||
# XPack Data
|
||||
0 string xpa XPack archive data
|
||||
# XPack Single Data
|
||||
0 string Í\ jm XPack single archive data
|
||||
0 string \xc3\x8d\ jm XPack single archive data
|
||||
|
||||
# TODO: missing due to unknown magic/magic at end of file:
|
||||
#DWC
|
||||
@ -481,7 +498,7 @@
|
||||
# This is a really bad format. A file containing HAWAII will match this...
|
||||
#0 string HA HA archive data,
|
||||
#>2 leshort =1 1 file,
|
||||
#>2 leshort >1 %u files,
|
||||
#>2 leshort >1 %hu files,
|
||||
#>4 byte&0x0f =0 first is type CPY
|
||||
#>4 byte&0x0f =1 first is type ASC
|
||||
#>4 byte&0x0f =2 first is type HSC
|
||||
@ -571,6 +588,7 @@
|
||||
!:mime application/zip
|
||||
|
||||
# Zip archives (Greg Roelofs, c/o zip-bugs@wkuvx1.wku.edu)
|
||||
0 string PK\005\006 Zip archive data (empty)
|
||||
0 string PK\003\004
|
||||
|
||||
# Specialised zip formats which start with a member named 'mimetype'
|
||||
@ -660,11 +678,10 @@
|
||||
!:mime application/vnd.oasis.opendocument.image-template
|
||||
|
||||
# EPUB (OEBPS) books using OCF (OEBPS Container Format)
|
||||
# From: Adam Buchbinder <adam.buchbinder@gmail.com>
|
||||
# http://www.idpf.org/ocf/ocf1.0/download/ocf10.htm, section 4.
|
||||
# (mimetype contains "application/epub+zip")
|
||||
>>50 string epub+zip EPUB ebook data
|
||||
!:mime application/epub+zip
|
||||
# From: Ralf Brown <ralf.brown@gmail.com>
|
||||
>>50 string epub+zip EPUB document
|
||||
!:mime application/epub+zip
|
||||
|
||||
# Catch other ZIP-with-mimetype formats
|
||||
# In a ZIP file, the bytes immediately after a member's contents are
|
||||
@ -684,16 +701,21 @@
|
||||
>>>38 regex [!-OQ-~]+ Zip data (MIME type "%s"?)
|
||||
!:mime application/zip
|
||||
|
||||
# Java Jar files
|
||||
>(26.s+30) leshort 0xcafe Java archive data (JAR)
|
||||
!:mime application/java-archive
|
||||
|
||||
# Generic zip archives (Greg Roelofs, c/o zip-bugs@wkuvx1.wku.edu)
|
||||
# Next line excludes specialized formats:
|
||||
>26 string !\x8\0\0\0mimetype Zip archive data
|
||||
>(26.s+30) leshort !0xcafe
|
||||
>>26 string !\x8\0\0\0mimetype Zip archive data
|
||||
!:mime application/zip
|
||||
>>4 byte 0x09 \b, at least v0.9 to extract
|
||||
>>4 byte 0x0a \b, at least v1.0 to extract
|
||||
>>4 byte 0x0b \b, at least v1.1 to extract
|
||||
>>4 byte 0x14 \b, at least v2.0 to extract
|
||||
>>4 byte 0x2d \b, at least v3.0 to extract
|
||||
>>0x161 string WINZIP \b, WinZIP self-extracting
|
||||
>>>4 byte 0x09 \b, at least v0.9 to extract
|
||||
>>>4 byte 0x0a \b, at least v1.0 to extract
|
||||
>>>4 byte 0x0b \b, at least v1.1 to extract
|
||||
>>>4 byte 0x14 \b, at least v2.0 to extract
|
||||
>>>4 byte 0x2d \b, at least v3.0 to extract
|
||||
>>>0x161 string WINZIP \b, WinZIP self-extracting
|
||||
|
||||
# StarView Metafile
|
||||
# From Pierre Ducroquet <pinaraf@pinaraf.info>
|
||||
@ -852,7 +874,7 @@
|
||||
# From: Dirk Jagdmann <doj@cubic.org>
|
||||
# xar archive format: http://code.google.com/p/xar/
|
||||
0 string xar! xar archive
|
||||
>6 beshort x - version %ld
|
||||
>6 beshort x - version %d
|
||||
|
||||
# From: "Nelson A. de Oliveira" <naoliv@gmail.com>
|
||||
# .kgb
|
||||
@ -884,14 +906,8 @@
|
||||
# archive must be an uncompressed file called 'mimetype' with contents
|
||||
# 'application/epub+zip'
|
||||
|
||||
# start by checking that this is a ZIP archive, then check for the
|
||||
# proper mimetype file
|
||||
# From: Ralf Brown <ralf.brown@gmail.com>
|
||||
0 string PK\003\004
|
||||
>0x1E string mimetypeapplication/epub+zip EPUB document
|
||||
!:mime application/epub+zip
|
||||
|
||||
# From: "Michał Górny" <mgorny@gentoo.org>
|
||||
# From: "Michael Gorny" <mgorny@gentoo.org>
|
||||
# ZPAQ: http://mattmahoney.net/dc/zpaq.html
|
||||
0 string zPQ ZPAQ stream
|
||||
>3 byte x \b, level %d
|
||||
@ -905,3 +921,67 @@
|
||||
>36 byte 16 \b, back-to-front
|
||||
>42 beshort x \b, (%dx,
|
||||
>44 beshort x %d)
|
||||
|
||||
# Symantec GHOST image by Joerg Jenderek at May 2014
|
||||
# http://us.norton.com/ghost/
|
||||
# http://www.garykessler.net/library/file_sigs.html
|
||||
0 ubelong&0xFFFFf7f0 0xFEEF0100 Norton GHost image
|
||||
# *.GHO
|
||||
>2 ubyte&0x08 0x00 \b, first file
|
||||
# *.GHS or *.[0-9] with cns program option
|
||||
>2 ubyte&0x08 0x08 \b, split file
|
||||
# part of split index interesting for *.ghs
|
||||
>>4 ubyte x id=0x%x
|
||||
# compression tag minus one equals numeric compression command line switch z[1-9]
|
||||
>3 ubyte 0 \b, no compression
|
||||
>3 ubyte 2 \b, fast compression (Z1)
|
||||
>3 ubyte 3 \b, medium compression (Z2)
|
||||
>3 ubyte >3
|
||||
>>3 ubyte <11 \b, compression (Z%d-1)
|
||||
>2 ubyte&0x08 0x00
|
||||
# ~ 30 byte password field only for *.gho
|
||||
>>12 ubequad !0 \b, password protected
|
||||
>>44 ubyte !1
|
||||
# 1~Image All, sector-by-sector only for *.gho
|
||||
>>>10 ubyte 1 \b, sector copy
|
||||
# 1~Image Boot track only for *.gho
|
||||
>>>43 ubyte 1 \b, boot track
|
||||
# 1~Image Disc only for *.gho implies Image Boot track and sector copy
|
||||
>>44 ubyte 1 \b, disc sector copy
|
||||
# optional image description only *.gho
|
||||
>>0xff string >\0 "%-.254s"
|
||||
# look for DOS sector end sequence
|
||||
>0xE08 search/7776 \x55\xAA
|
||||
>>&-512 indirect x \b; contains
|
||||
|
||||
# Symantec GHOST image by Joerg Jenderek at May 2014
|
||||
# http://us.norton.com/ghost/
|
||||
# http://www.garykessler.net/library/file_sigs.html
|
||||
0 ubelong&0xFFFFf7f0 0xFEEF0100 Norton GHost image
|
||||
# *.GHO
|
||||
>2 ubyte&0x08 0x00 \b, first file
|
||||
# *.GHS or *.[0-9] with cns program option
|
||||
>2 ubyte&0x08 0x08 \b, split file
|
||||
# part of split index interesting for *.ghs
|
||||
>>4 ubyte x id=0x%x
|
||||
# compression tag minus one equals numeric compression command line switch z[1-9]
|
||||
>3 ubyte 0 \b, no compression
|
||||
>3 ubyte 2 \b, fast compression (Z1)
|
||||
>3 ubyte 3 \b, medium compression (Z2)
|
||||
>3 ubyte >3
|
||||
>>3 ubyte <11 \b, compression (Z%d-1)
|
||||
>2 ubyte&0x08 0x00
|
||||
# ~ 30 byte password field only for *.gho
|
||||
>>12 ubequad !0 \b, password protected
|
||||
>>44 ubyte !1
|
||||
# 1~Image All, sector-by-sector only for *.gho
|
||||
>>>10 ubyte 1 \b, sector copy
|
||||
# 1~Image Boot track only for *.gho
|
||||
>>>43 ubyte 1 \b, boot track
|
||||
# 1~Image Disc only for *.gho implies Image Boot track and sector copy
|
||||
>>44 ubyte 1 \b, disc sector copy
|
||||
# optional image description only *.gho
|
||||
>>0xff string >\0 "%-.254s"
|
||||
# look for DOS sector end sequence
|
||||
>0xE08 search/7776 \x55\xAA
|
||||
>>&-512 indirect x \b; contains
|
18
magic/Magdir/assembler
Normal file
18
magic/Magdir/assembler
Normal file
@ -0,0 +1,18 @@
|
||||
#------------------------------------------------------------------------------
|
||||
# $File: assembler,v 1.6 2013/12/11 14:14:20 christos Exp $
|
||||
# make: file(1) magic for assembler source
|
||||
#
|
||||
0 regex \^[\040\t]{0,50}\\.asciiz assembler source text
|
||||
!:mime text/x-asm
|
||||
0 regex \^[\040\t]{0,50}\\.byte assembler source text
|
||||
!:mime text/x-asm
|
||||
0 regex \^[\040\t]{0,50}\\.even assembler source text
|
||||
!:mime text/x-asm
|
||||
0 regex \^[\040\t]{0,50}\\.globl assembler source text
|
||||
!:mime text/x-asm
|
||||
0 regex \^[\040\t]{0,50}\\.text assembler source text
|
||||
!:mime text/x-asm
|
||||
0 regex \^[\040\t]{0,50}\\.file assembler source text
|
||||
!:mime text/x-asm
|
||||
0 regex \^[\040\t]{0,50}\\.type assembler source text
|
||||
!:mime text/x-asm
|
@ -1,6 +1,6 @@
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# $File: att3b,v 1.8 2009/09/19 16:28:08 christos Exp $
|
||||
# $File: att3b,v 1.9 2014/04/30 21:41:02 christos Exp $
|
||||
# att3b: file(1) magic for AT&T 3B machines
|
||||
#
|
||||
# The `versions' should be un-commented if they work for you.
|
||||
@ -11,10 +11,10 @@
|
||||
# The 3B20 conflicts with SCCS.
|
||||
#0 beshort 0550 3b20 COFF executable
|
||||
#>12 belong >0 not stripped
|
||||
#>22 beshort >0 - version %ld
|
||||
#>22 beshort >0 - version %d
|
||||
#0 beshort 0551 3b20 COFF executable (TV)
|
||||
#>12 belong >0 not stripped
|
||||
#>22 beshort >0 - version %ld
|
||||
#>22 beshort >0 - version %d
|
||||
#
|
||||
# WE32K
|
||||
#
|
||||
@ -29,12 +29,12 @@
|
||||
>20 beshort 0410 (pure)
|
||||
>20 beshort 0413 (demand paged)
|
||||
>20 beshort 0443 (target shared library)
|
||||
>22 beshort >0 - version %ld
|
||||
>22 beshort >0 - version %d
|
||||
0 beshort 0561 WE32000 COFF executable (TV)
|
||||
>12 belong >0 not stripped
|
||||
#>18 beshort &00020000 - 32100 required
|
||||
#>18 beshort &00040000 and MAU hardware required
|
||||
#>22 beshort >0 - version %ld
|
||||
#>22 beshort >0 - version %d
|
||||
#
|
||||
# core file for 3b2
|
||||
0 string \000\004\036\212\200 3b2 core file
|
@ -1,6 +1,6 @@
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# $File: audio,v 1.64 2012/02/20 16:37:34 christos Exp $
|
||||
# $File: audio,v 1.71 2014/05/14 23:30:28 christos Exp $
|
||||
# audio: file(1) magic for sound formats (see also "iff")
|
||||
#
|
||||
# Jan Nicolai Langfeldt (janl@ifi.uio.no), Dan Quinlan (quinlan@yggdrasil.com),
|
||||
@ -104,7 +104,7 @@
|
||||
|
||||
# first entry is also the string "NTRK"
|
||||
0 belong 0x4e54524b MultiTrack sound data
|
||||
>4 belong x - version %ld
|
||||
>4 belong x - version %d
|
||||
|
||||
# Extended MOD format (*.emd) (Greg Roelofs, newt@uchicago.edu); NOT TESTED
|
||||
# [based on posting 940824 by "Dirk/Elastik", husberg@lehtori.cc.tut.fi]
|
||||
@ -512,7 +512,7 @@
|
||||
>>12 ulelong x \b, sample rate %d
|
||||
|
||||
# adlib sound files
|
||||
# From Gürkan Sengün <gurkan@linuks.mine.nu>, http://www.linuks.mine.nu
|
||||
# From Gurkan Sengun <gurkan@linuks.mine.nu>, http://www.linuks.mine.nu
|
||||
0 string RAWADATA RdosPlay RAW
|
||||
|
||||
1068 string RoR AMUSIC Adlib Tracker
|
||||
@ -571,6 +571,7 @@
|
||||
|
||||
# musepak support From: "Jiri Pejchal" <jiri.pejchal@gmail.com>
|
||||
0 string MP+ Musepack audio
|
||||
!:mime audio/x-musepack
|
||||
>3 byte 255 \b, SV pre8
|
||||
>3 byte&0xF 0x6 \b, SV 6
|
||||
>3 byte&0xF 0x8 \b, SV 8
|
||||
@ -636,3 +637,66 @@
|
||||
# URL: http://wiki.multimedia.cx/index.php?title=WavPack
|
||||
# From: Mike Melanson <mike@multimedia.cx>
|
||||
0 string wvpk WavPack Lossless Audio
|
||||
|
||||
# From Fabio R. Schmidlin <frs@pop.com.br>
|
||||
# VGM music file
|
||||
0 string Vgm\
|
||||
>9 ubyte >0 VGM Video Game Music dump v
|
||||
>>9 ubyte/16 >0 \b%d
|
||||
>>9 ubyte&0x0F x \b%d
|
||||
>>8 ubyte/16 x \b.%d
|
||||
>>8 ubyte&0x0F >0 \b%d
|
||||
#Get soundchips
|
||||
>>8 ubyte x \b, soundchip(s)=
|
||||
>>0x0C ulelong >0 SN76489,
|
||||
>>0x10 ulelong >0 YM2413,
|
||||
>>0x2C ulelong >0 YM2612,
|
||||
>>0x30 ulelong >0 YM2151,
|
||||
>>0x38 ulelong >0 Sega PCM,
|
||||
>>0x34 ulelong >0xC
|
||||
>>>0x40 ulelong >0 RF5C68,
|
||||
>>0x34 ulelong >0x10
|
||||
>>>0x44 ulelong >0 YM2203,
|
||||
>>0x34 ulelong >0x14
|
||||
>>>0x48 ulelong >0 YM2608,
|
||||
>>0x34 ulelong >0x18
|
||||
>>>0x4C lelong >0 YM2610,
|
||||
>>>0x4C lelong <0 YM2610B,
|
||||
>>0x34 ulelong >0x1C
|
||||
>>>0x50 ulelong >0 YM3812,
|
||||
>>0x34 ulelong >0x20
|
||||
>>>0x54 ulelong >0 YM3526,
|
||||
>>0x34 ulelong >0x24
|
||||
>>>0x58 ulelong >0 Y8950,
|
||||
>>0x34 ulelong >0x28
|
||||
>>>0x5C ulelong >0 YMF262,
|
||||
>>0x34 ulelong >0x2C
|
||||
>>>0x60 ulelong >0 YMF278B,
|
||||
>>0x34 ulelong >0x30
|
||||
>>>0x64 ulelong >0 YMF271,
|
||||
>>0x34 ulelong >0x34
|
||||
>>>0x68 ulelong >0 YMZ280B,
|
||||
>>0x34 ulelong >0x38
|
||||
>>>0x6C ulelong >0 RF5C164,
|
||||
>>0x34 ulelong >0x3C
|
||||
>>>0x70 ulelong >0 PWM,
|
||||
>>0x34 ulelong >0x40
|
||||
>>>0x74 ulelong >0
|
||||
>>>>0x78 ubyte 0x00 AY-3-8910,
|
||||
>>>>0x78 ubyte 0x01 AY-3-8912,
|
||||
>>>>0x78 ubyte 0x02 AY-3-8913,
|
||||
>>>>0x78 ubyte 0x03 AY-3-8930,
|
||||
>>>>0x78 ubyte 0x10 YM2149,
|
||||
>>>>0x78 ubyte 0x11 YM3439,
|
||||
|
||||
# GVOX Encore file format
|
||||
# Since this is a proprietary file format and there is no publicly available
|
||||
# format specification, this is just based on induction
|
||||
#
|
||||
0 string SCOW
|
||||
>4 byte 0xc4 GVOX Encore music, version 5.0 or above
|
||||
>4 byte 0xc2 GVOX Encore music, version < 5.0
|
||||
|
||||
0 string ZBOT
|
||||
>4 byte 0xc5 GVOX Encore music, version < 5.0
|
||||
|
@ -1,12 +1,12 @@
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# $File: bflt,v 1.4 2009/09/19 16:28:08 christos Exp $
|
||||
# $File: bflt,v 1.5 2014/04/30 21:41:02 christos Exp $
|
||||
# bFLT: file(1) magic for BFLT uclinux binary files
|
||||
#
|
||||
# From Philippe De Muyter <phdm@macqel.be>
|
||||
#
|
||||
0 string bFLT BFLT executable
|
||||
>4 belong x - version %ld
|
||||
>4 belong x - version %d
|
||||
>4 belong 4
|
||||
>>36 belong&0x1 0x1 ram
|
||||
>>36 belong&0x2 0x2 gotpic
|
8
magic/Magdir/blackberry
Normal file
8
magic/Magdir/blackberry
Normal file
@ -0,0 +1,8 @@
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# $File: blackberry,v 1.1 2014/01/31 01:51:32 christos Exp $
|
||||
# blackberry: file(1) magic for BlackBerry file formats
|
||||
#
|
||||
5 belong 0
|
||||
>8 belong 010010010 BlackBerry RIM ETP file
|
||||
>>22 string x \b for %s
|
@ -1,27 +1,17 @@
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# $File: bsdi,v 1.5 2009/09/19 16:28:08 christos Exp $
|
||||
# $File: bsdi,v 1.7 2014/03/29 15:40:34 christos Exp $
|
||||
# bsdi: file(1) magic for BSD/OS (from BSDI) objects
|
||||
# Some object/executable formats use the same magic numbers as are used
|
||||
# in other OSes; those are handled by entries in aout.
|
||||
#
|
||||
|
||||
0 lelong 0314 386 compact demand paged pure executable
|
||||
>16 lelong >0 not stripped
|
||||
>32 byte 0x6a (uses shared libs)
|
||||
|
||||
0 lelong 0407 386 executable
|
||||
>16 lelong >0 not stripped
|
||||
>32 byte 0x6a (uses shared libs)
|
||||
|
||||
0 lelong 0410 386 pure executable
|
||||
>16 lelong >0 not stripped
|
||||
>32 byte 0x6a (uses shared libs)
|
||||
|
||||
0 lelong 0413 386 demand paged pure executable
|
||||
>16 lelong >0 not stripped
|
||||
>32 byte 0x6a (uses shared libs)
|
||||
|
||||
# same as in SunOS 4.x, except for static shared libraries
|
||||
0 belong&077777777 0600413 sparc demand paged
|
||||
0 belong&077777777 0600413 SPARC demand paged
|
||||
>0 byte &0x80
|
||||
>>20 belong <4096 shared library
|
||||
>>20 belong =4096 dynamically linked executable
|
||||
@ -30,13 +20,13 @@
|
||||
>16 belong >0 not stripped
|
||||
>36 belong 0xb4100001 (uses shared libs)
|
||||
|
||||
0 belong&077777777 0600410 sparc pure
|
||||
0 belong&077777777 0600410 SPARC pure
|
||||
>0 byte &0x80 dynamically linked executable
|
||||
>0 byte ^0x80 executable
|
||||
>16 belong >0 not stripped
|
||||
>36 belong 0xb4100001 (uses shared libs)
|
||||
|
||||
0 belong&077777777 0600407 sparc
|
||||
0 belong&077777777 0600407 SPARC
|
||||
>0 byte &0x80 dynamically linked executable
|
||||
>0 byte ^0x80 executable
|
||||
>16 belong >0 not stripped
|
@ -1,5 +1,5 @@
|
||||
#------------------------------------------------------------------------------
|
||||
# $File: c-lang,v 1.16 2011/12/09 08:02:16 rrt Exp $
|
||||
# $File: c-lang,v 1.19 2014/06/03 19:17:27 christos Exp $
|
||||
# c-lang: file(1) magic for C and related languages programs
|
||||
#
|
||||
|
||||
@ -12,37 +12,37 @@
|
||||
# C
|
||||
0 regex \^#include C source text
|
||||
!:mime text/x-c
|
||||
0 regex \^char C source text
|
||||
0 regex \^char[\ \t\n]+ C source text
|
||||
!:mime text/x-c
|
||||
0 regex \^double C source text
|
||||
0 regex \^double[\ \t\n]+ C source text
|
||||
!:mime text/x-c
|
||||
0 regex \^extern C source text
|
||||
0 regex \^extern[\ \t\n]+ C source text
|
||||
!:mime text/x-c
|
||||
0 regex \^float C source text
|
||||
0 regex \^float[\ \t\n]+ C source text
|
||||
!:mime text/x-c
|
||||
0 regex \^struct C source text
|
||||
0 regex \^struct[\ \t\n]+ C source text
|
||||
!:mime text/x-c
|
||||
0 regex \^union C source text
|
||||
0 regex \^union[\ \t\n]+ C source text
|
||||
!:mime text/x-c
|
||||
0 search/8192 main( C source text
|
||||
!:mime text/x-c
|
||||
|
||||
# C++
|
||||
# The strength of these rules is increased so they beat the C rules above
|
||||
0 regex \^template C++ source text
|
||||
!:strength + 10
|
||||
0 regex \^template[\ \t\n]+ C++ source text
|
||||
!:strength + 5
|
||||
!:mime text/x-c++
|
||||
0 regex \^virtual C++ source text
|
||||
!:strength + 10
|
||||
0 regex \^virtual[\ \t\n]+ C++ source text
|
||||
!:strength + 5
|
||||
!:mime text/x-c++
|
||||
0 regex \^class C++ source text
|
||||
!:strength + 10
|
||||
0 regex \^class[\ \t\n]+ C++ source text
|
||||
!:strength + 5
|
||||
!:mime text/x-c++
|
||||
0 regex \^public: C++ source text
|
||||
!:strength + 10
|
||||
!:strength + 5
|
||||
!:mime text/x-c++
|
||||
0 regex \^private: C++ source text
|
||||
!:strength + 10
|
||||
!:strength + 5
|
||||
!:mime text/x-c++
|
||||
|
||||
# From: Mikhail Teterin <mi@aldan.algebra.com>
|
||||
@ -50,7 +50,7 @@
|
||||
>7 string x version %.2s
|
||||
# We skip the path here, because it is often long (so file will
|
||||
# truncate it) and mostly redundant.
|
||||
# The inverted index functionality was added some time betwen
|
||||
# The inverted index functionality was added some time between
|
||||
# versions 11 and 15, so look for -q if version is above 14:
|
||||
>7 string >14
|
||||
>>10 search/100 \ -q\ with inverted index
|
@ -1,16 +1,9 @@
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# $File: cad,v 1.11 2011/12/08 12:12:46 rrt Exp $
|
||||
# $File: cad,v 1.13 2014/03/23 18:05:38 christos Exp $
|
||||
# autocad: file(1) magic for cad files
|
||||
#
|
||||
|
||||
# AutoCAD DWG versions R13/R14 (www.autodesk.com)
|
||||
# Written December 01, 2003 by Lester Hightower
|
||||
# Based on the DWG File Format Specifications at http://www.opendwg.org/
|
||||
0 string \101\103\061\060\061 AutoCAD
|
||||
>5 string \062\000\000\000\000 DWG ver. R13
|
||||
>5 string \064\000\000\000\000 DWG ver. R14
|
||||
|
||||
# Microstation DGN/CIT Files (www.bentley.com)
|
||||
# Last updated July 29, 2005 by Lester Hightower
|
||||
# DGN is the default file extension of Microstation/Intergraph CAD files.
|
||||
@ -49,19 +42,62 @@
|
||||
>4 string \030\000\000 CITFile
|
||||
>4 string \030\000\003 CITFile
|
||||
|
||||
# AutoCAD
|
||||
# Merge of the different contributions and updates from http://en.wikipedia.org/wiki/Dwg
|
||||
# and http://www.iana.org/assignments/media-types/image/vnd.dwg
|
||||
0 string MC0.0 DWG AutoDesk AutoCAD Release 1.0
|
||||
!:mime image/vnd.dwg
|
||||
0 string AC1.2 DWG AutoDesk AutoCAD Release 1.2
|
||||
!:mime image/vnd.dwg
|
||||
0 string AC1.3 DWG AutoDesk AutoCAD Release 1.3
|
||||
!:mime image/vnd.dwg
|
||||
0 string AC1.40 DWG AutoDesk AutoCAD Release 1.40
|
||||
!:mime image/vnd.dwg
|
||||
0 string AC1.50 DWG AutoDesk AutoCAD Release 2.05
|
||||
!:mime image/vnd.dwg
|
||||
0 string AC2.10 DWG AutoDesk AutoCAD Release 2.10
|
||||
!:mime image/vnd.dwg
|
||||
0 string AC2.21 DWG AutoDesk AutoCAD Release 2.21
|
||||
!:mime image/vnd.dwg
|
||||
0 string AC2.22 DWG AutoDesk AutoCAD Release 2.22
|
||||
!:mime image/vnd.dwg
|
||||
0 string AC1001 DWG AutoDesk AutoCAD Release 2.22
|
||||
!:mime image/vnd.dwg
|
||||
0 string AC1002 DWG AutoDesk AutoCAD Release 2.50
|
||||
!:mime image/vnd.dwg
|
||||
0 string AC1003 DWG AutoDesk AutoCAD Release 2.60
|
||||
!:mime image/vnd.dwg
|
||||
0 string AC1004 DWG AutoDesk AutoCAD Release 9
|
||||
!:mime image/vnd.dwg
|
||||
0 string AC1006 DWG AutoDesk AutoCAD Release 10
|
||||
!:mime image/vnd.dwg
|
||||
0 string AC1009 DWG AutoDesk AutoCAD Release 11/12
|
||||
!:mime image/vnd.dwg
|
||||
# AutoCAD DWG versions R13/R14 (www.autodesk.com)
|
||||
# Written December 01, 2003 by Lester Hightower
|
||||
# Based on the DWG File Format Specifications at http://www.opendwg.org/
|
||||
# AutoCad, from Nahuel Greco
|
||||
# AutoCAD DWG versions R12/R13/R14 (www.autodesk.com)
|
||||
0 string AC1012 DWG AutoDesk AutoCad (release 12)
|
||||
0 string AC1013 DWG AutoDesk AutoCad (release 13)
|
||||
0 string AC1014 DWG AutoDesk AutoCad (release 14)
|
||||
0 string AC1012 DWG AutoDesk AutoCAD Release 13
|
||||
!:mime image/vnd.dwg
|
||||
0 string AC1014 DWG AutoDesk AutoCAD Release 14
|
||||
!:mime image/vnd.dwg
|
||||
0 string AC1015 DWG AutoDesk AutoCAD 2000/2002
|
||||
!:mime image/vnd.dwg
|
||||
|
||||
# A new version of AutoCAD DWG
|
||||
# Sergey Zaykov (mail_of_sergey@mail.ru, sergey_zaikov@rambler.ru,
|
||||
# ICQ 358572321)
|
||||
# From various sources like:
|
||||
# http://autodesk.blogs.com/between_the_lines/autocad-release-history.html
|
||||
0 string AC1018 DWG AutoDesk AutoCAD 2004/2005/2006
|
||||
0 string AC1021 DWG AutoDesk AutoCAD 2007/2008/2009
|
||||
0 string AC1024 DWG AutoDesk AutoCAD 2010/2011
|
||||
0 string AC1018 DWG AutoDesk AutoCAD 2004/2005/2006
|
||||
!:mime image/vnd.dwg
|
||||
0 string AC1021 DWG AutoDesk AutoCAD 2007/2008/2009
|
||||
!:mime image/vnd.dwg
|
||||
0 string AC1024 DWG AutoDesk AutoCAD 2010/2011/2012
|
||||
!:mime image/vnd.dwg
|
||||
0 string AC1027 DWG AutoDesk AutoCAD 2013/2014
|
||||
!:mime image/vnd.dwg
|
||||
|
||||
# KOMPAS 2D drawing from ASCON
|
||||
# This is KOMPAS 2D drawing or fragment of drawing but is not detailed nor
|
||||
@ -110,9 +146,11 @@
|
||||
0 beshort 0x0809 Bentley/Intergraph MicroStation
|
||||
>0x02 byte 0xfe
|
||||
>>0x04 beshort 0x1800 CIT raster CAD
|
||||
0 string AC1012 AutoDesk AutoCAD R13
|
||||
0 string AC1014 AutoDesk AutoCAD R14
|
||||
0 string AC1015 AutoDesk AutoCAD R2000
|
||||
|
||||
# 3DS (3d Studio files) Conflicts with diff output 0x3d '='
|
||||
#16 beshort 0x3d3d image/x-3ds
|
||||
|
||||
# MegaCAD 2D/3D drawing (.prt)
|
||||
# http://megacad.de/
|
||||
# From: Markus Heidelberg <markus.heidelberg@web.de>
|
||||
0 string MegaCad23\0 MegaCAD 2D/3D drawing
|
63
magic/Magdir/cafebabe
Normal file
63
magic/Magdir/cafebabe
Normal file
@ -0,0 +1,63 @@
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# $File: cafebabe,v 1.16 2014/04/30 21:41:02 christos Exp $
|
||||
# Cafe Babes unite!
|
||||
#
|
||||
# Since Java bytecode and Mach-O universal binaries have the same magic number,
|
||||
# the test must be performed in the same "magic" sequence to get both right.
|
||||
# The long at offset 4 in a Mach-O universal binary tells the number of
|
||||
# architectures; the short at offset 4 in a Java bytecode file is the JVM minor
|
||||
# version and the short at offset 6 is the JVM major version. Since there are only
|
||||
# only 18 labeled Mach-O architectures at current, and the first released
|
||||
# Java class format was version 43.0, we can safely choose any number
|
||||
# between 18 and 39 to test the number of architectures against
|
||||
# (and use as a hack). Let's not use 18, because the Mach-O people
|
||||
# might add another one or two as time goes by...
|
||||
#
|
||||
### JAVA START ###
|
||||
0 belong 0xcafebabe
|
||||
>4 belong >30 compiled Java class data,
|
||||
!:mime application/x-java-applet
|
||||
>>6 beshort x version %d.
|
||||
>>4 beshort x \b%d
|
||||
# Which is which?
|
||||
#>>4 belong 0x032d (Java 1.0)
|
||||
#>>4 belong 0x032d (Java 1.1)
|
||||
>>4 belong 0x002e (Java 1.2)
|
||||
>>4 belong 0x002f (Java 1.3)
|
||||
>>4 belong 0x0030 (Java 1.4)
|
||||
>>4 belong 0x0031 (Java 1.5)
|
||||
>>4 belong 0x0032 (Java 1.6)
|
||||
|
||||
0 belong 0xcafed00d JAR compressed with pack200,
|
||||
>5 byte x version %d.
|
||||
>4 byte x \b%d
|
||||
!:mime application/x-java-pack200
|
||||
|
||||
|
||||
0 belong 0xcafed00d JAR compressed with pack200,
|
||||
>5 byte x version %d.
|
||||
>4 byte x \b%d
|
||||
!:mime application/x-java-pack200
|
||||
|
||||
### JAVA END ###
|
||||
### MACH-O START ###
|
||||
|
||||
0 name mach-o \b [
|
||||
>0 use mach-o-cpu \b
|
||||
>&(8.L) indirect \b:
|
||||
>0 belong x \b]
|
||||
|
||||
0 belong 0xcafebabe
|
||||
>4 belong 1 Mach-O universal binary with 1 architecture:
|
||||
>>8 use mach-o \b
|
||||
>4 belong >1
|
||||
>>4 belong <20 Mach-O universal binary with %d architectures:
|
||||
>>>8 use mach-o \b
|
||||
>>>28 use mach-o \b
|
||||
>>4 belong >2
|
||||
>>>48 use mach-o \b
|
||||
>>4 belong >3
|
||||
>>>68 use mach-o \b
|
||||
|
||||
### MACH-O END ###
|
@ -1,6 +1,6 @@
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# $File: clarion,v 1.4 2009/09/19 16:28:08 christos Exp $
|
||||
# $File: clarion,v 1.5 2014/04/30 21:41:02 christos Exp $
|
||||
# clarion: file(1) magic for # Clarion Personal/Professional Developer
|
||||
# (v2 and above)
|
||||
# From: Julien Blache <jb@jblache.org>
|
||||
@ -15,7 +15,7 @@
|
||||
>2 leshort &0x0010 \b, compressed
|
||||
>2 leshort &0x0040 \b, read only
|
||||
# number of records
|
||||
>5 lelong x \b, %ld records
|
||||
>5 lelong x \b, %d records
|
||||
|
||||
# Memo files
|
||||
0 leshort 0x334d Clarion Developer (v2 and above) memo data
|
@ -1,6 +1,6 @@
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# $File: claris,v 1.5 2009/09/19 16:28:08 christos Exp $
|
||||
# $File: claris,v 1.7 2014/06/03 19:17:27 christos Exp $
|
||||
# claris: file(1) magic for claris
|
||||
# "H. Nanosecond" <aldomel@ix.netcom.com>
|
||||
# Claris Works a word processor, etc.
|
||||
@ -11,16 +11,16 @@
|
||||
#*
|
||||
#0001000 #010 250 377 377 377 377 000 213 000 230 000 021 002 377 014 000
|
||||
#null to byte 1000 octal
|
||||
514 string \377\377\377\377\000 Claris clip art?
|
||||
>0 string \0\0\0\0\0\0\0\0\0\0\0\0\0 yes.
|
||||
514 string \377\377\377\377\001 Claris clip art?
|
||||
>0 string \0\0\0\0\0\0\0\0\0\0\0\0\0 yes.
|
||||
514 string \377\377\377\377\000
|
||||
>0 string \0\0\0\0\0\0\0\0\0\0\0\0\0 Claris clip art
|
||||
514 string \377\377\377\377\001
|
||||
>0 string \0\0\0\0\0\0\0\0\0\0\0\0\0 Claris clip art
|
||||
|
||||
# Claris works files
|
||||
# .cwk
|
||||
0 string \002\000\210\003\102\117\102\117\000\001\206 Claris works document
|
||||
# .plt
|
||||
0 string \020\341\000\000\010\010 Claris Works pallete files .plt
|
||||
0 string \020\341\000\000\010\010 Claris Works palette files .plt
|
||||
|
||||
# .msp a dictionary file I am not sure about this I have only one .msp file
|
||||
0 string \002\271\262\000\040\002\000\164 Claris works dictionary
|
@ -1,6 +1,6 @@
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# $File: clipper,v 1.6 2009/09/19 16:28:08 christos Exp $
|
||||
# $File: clipper,v 1.7 2014/04/30 21:41:02 christos Exp $
|
||||
# clipper: file(1) magic for Intergraph (formerly Fairchild) Clipper.
|
||||
#
|
||||
# XXX - what byte order does the Clipper use?
|
||||
@ -35,7 +35,7 @@
|
||||
>20 short 0413 (demand paged)
|
||||
>20 short 0443 (target shared library)
|
||||
>12 long >0 not stripped
|
||||
>22 short >0 - version %ld
|
||||
>22 short >0 - version %d
|
||||
0 short 0577 CLIPPER COFF executable
|
||||
>18 short&074000 000000 C1 R1
|
||||
>18 short&074000 004000 C2 R1
|
||||
@ -47,7 +47,7 @@
|
||||
>20 short 0413 (paged)
|
||||
>20 short 0443 (target shared library)
|
||||
>12 long >0 not stripped
|
||||
>22 short >0 - version %ld
|
||||
>22 short >0 - version %d
|
||||
>48 long&01 01 alignment trap enabled
|
||||
>52 byte 1 -Ctnc
|
||||
>52 byte 2 -Ctsw
|
@ -1,16 +1,23 @@
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# $File: commands,v 1.42 2011/12/05 23:14:02 rrt Exp $
|
||||
# $File: commands,v 1.50 2014/05/30 16:48:44 christos Exp $
|
||||
# commands: file(1) magic for various shells and interpreters
|
||||
#
|
||||
#0 string/w : shell archive or script for antique kernel text
|
||||
0 string/wt #!\ /bin/sh POSIX shell script text executable
|
||||
!:mime text/x-shellscript
|
||||
0 string/wb #!\ /bin/sh POSIX shell script executable (binary data)
|
||||
!:mime text/x-shellscript
|
||||
|
||||
0 string/wt #!\ /bin/csh C shell script text executable
|
||||
!:mime text/x-shellscript
|
||||
|
||||
# korn shell magic, sent by George Wu, gwu@clyde.att.com
|
||||
0 string/wt #!\ /bin/ksh Korn shell script text executable
|
||||
!:mime text/x-shellscript
|
||||
0 string/wb #!\ /bin/ksh Korn shell script executable (binary data)
|
||||
!:mime text/x-shellscript
|
||||
|
||||
0 string/wt #!\ /bin/tcsh Tenex C shell script text executable
|
||||
!:mime text/x-shellscript
|
||||
0 string/wt #!\ /usr/bin/tcsh Tenex C shell script text executable
|
||||
@ -49,7 +56,7 @@
|
||||
!:mime text/x-awk
|
||||
0 string/wt #!\ /usr/bin/awk awk script text executable
|
||||
!:mime text/x-awk
|
||||
0 regex =^\\s*BEGIN\\s*[{] awk script text
|
||||
0 regex/4096 =^\\s{0,100}BEGIN\\s{0,100}[{] awk script text
|
||||
|
||||
# AT&T Bell Labs' Plan 9 shell
|
||||
0 string/wt #!\ /bin/rc Plan 9 rc shell script text executable
|
||||
@ -57,27 +64,38 @@
|
||||
# bash shell magic, from Peter Tobias (tobias@server.et-inf.fho-emden.de)
|
||||
0 string/wt #!\ /bin/bash Bourne-Again shell script text executable
|
||||
!:mime text/x-shellscript
|
||||
0 string/wb #!\ /bin/bash Bourne-Again shell script executable (binary data)
|
||||
!:mime text/x-shellscript
|
||||
0 string/wt #!\ /usr/bin/bash Bourne-Again shell script text executable
|
||||
!:mime text/x-shellscript
|
||||
0 string/wb #!\ /usr/bin/bash Bourne-Again shell script executable (binary data)
|
||||
!:mime text/x-shellscript
|
||||
0 string/wt #!\ /usr/local/bash Bourne-Again shell script text executable
|
||||
!:mime text/x-shellscript
|
||||
0 string/wb #!\ /usr/local/bash Bourne-Again shell script executable (binary data)
|
||||
!:mime text/x-shellscript
|
||||
0 string/wt #!\ /usr/local/bin/bash Bourne-Again shell script text executable
|
||||
!:mime text/x-shellscript
|
||||
0 string/wb #!\ /usr/local/bin/bash Bourne-Again shell script executable (binary data)
|
||||
!:mime text/x-shellscript
|
||||
|
||||
# PHP scripts
|
||||
# Ulf Harnhammar <ulfh@update.uu.se>
|
||||
0 search/1/c =<?php PHP script text
|
||||
!:strength + 10
|
||||
!:mime text/x-php
|
||||
0 search/1 =<?\n PHP script text
|
||||
!:mime text/x-php
|
||||
0 search/1 =<?\r PHP script text
|
||||
!:mime text/x-php
|
||||
0 search/1/w #!\ /usr/local/bin/php PHP script text executable
|
||||
!:strength + 10
|
||||
!:mime text/x-php
|
||||
0 search/1/w #!\ /usr/bin/php PHP script text executable
|
||||
!:strength + 10
|
||||
!:mime text/x-php
|
||||
# Smarty compiled template, http://www.smarty.net/
|
||||
# Elan Ruusamäe <glen@delfi.ee>
|
||||
# Elan Ruusamae <glen@delfi.ee>
|
||||
0 string =<?php\ /*\ Smarty\ version Smarty compiled template
|
||||
>24 regex [0-9.]+ \b, version %s
|
||||
!:mime text/x-php
|
@ -1,5 +1,5 @@
|
||||
#------------------------------------------------------------------------------
|
||||
# $File: compress,v 1.49 2011/12/07 22:04:27 christos Exp $
|
||||
# $File: compress,v 1.58 2014/05/07 19:36:59 christos Exp $
|
||||
# compress: file(1) magic for pure-compression formats (no archives)
|
||||
#
|
||||
# compress, gzip, pack, compact, huf, squeeze, crunch, freeze, yabba, etc.
|
||||
@ -22,6 +22,7 @@
|
||||
# other than 8 ("deflate", the only method defined in RFC 1952).
|
||||
0 string \037\213 gzip compressed data
|
||||
!:mime application/x-gzip
|
||||
!:strength * 2
|
||||
>2 byte <8 \b, reserved method
|
||||
>2 byte >8 \b, unknown method
|
||||
>3 byte &0x01 \b, ASCII
|
||||
@ -30,6 +31,10 @@
|
||||
>3 byte&0xC =0x08
|
||||
>>10 string x \b, was "%s"
|
||||
>3 byte &0x10 \b, has comment
|
||||
>3 byte &0x20 \b, encrypted
|
||||
>4 ledate >0 \b, last modified: %s
|
||||
>8 byte 2 \b, max compression
|
||||
>8 byte 4 \b, max speed
|
||||
>9 byte =0x00 \b, from FAT filesystem (MS-DOS, OS/2, NT)
|
||||
>9 byte =0x01 \b, from Amiga
|
||||
>9 byte =0x02 \b, from VMS
|
||||
@ -44,11 +49,6 @@
|
||||
>9 byte =0x0B \b, from NTFS filesystem (NT)
|
||||
>9 byte =0x0C \b, from QDOS
|
||||
>9 byte =0x0D \b, from Acorn RISCOS
|
||||
>3 byte &0x10 \b, comment
|
||||
>3 byte &0x20 \b, encrypted
|
||||
>4 ledate >0 \b, last modified: %s
|
||||
>8 byte 2 \b, max compression
|
||||
>8 byte 4 \b, max speed
|
||||
|
||||
# packed data, Huffman (minimum redundancy) codes on a byte-by-byte basis
|
||||
0 string \037\036 packed data
|
||||
@ -191,10 +191,13 @@
|
||||
|
||||
# Type: LZMA
|
||||
0 lelong&0xffffff =0x5d
|
||||
>12 leshort =0xff LZMA compressed data,
|
||||
>12 leshort 0xff LZMA compressed data,
|
||||
!:mime application/x-lzma
|
||||
>>5 lequad =0xffffffffffffffff streamed
|
||||
>>5 lequad !0xffffffffffffffff non-streamed, size %lld
|
||||
>12 leshort 0 LZMA compressed data,
|
||||
>>5 lequad =0xffffffffffffffff streamed
|
||||
>>5 lequad !0xffffffffffffffff non-streamed, size %lld
|
||||
!:mime application/x-lzma
|
||||
|
||||
# http://tukaani.org/xz/xz-file-format.txt
|
||||
0 ustring \xFD7zXZ\x00 XZ compressed data
|
||||
@ -206,6 +209,15 @@
|
||||
>5 byte x \b.%d
|
||||
!:mime application/x-lrzip
|
||||
|
||||
# http://fastcompression.blogspot.fi/2013/04/lz4-streaming-format-final.html
|
||||
0 lelong 0x184d2204 LZ4 compressed data (v1.4+)
|
||||
!:mime application/x-lz4
|
||||
# Added by osm0sis@xda-developers.com
|
||||
0 lelong 0x184c2103 LZ4 compressed data (v1.0-v1.3)
|
||||
!:mime application/x-lz4
|
||||
0 lelong 0x184c2102 LZ4 compressed data (v0.1-v0.9)
|
||||
!:mime application/x-lz4
|
||||
|
||||
# AFX compressed files (Wolfram Kleff)
|
||||
2 string -afx- AFX compressed file data
|
||||
|
||||
@ -229,3 +241,13 @@
|
||||
>6 byte >-1 %i)
|
||||
>7 long >0 , original size: %i bytes
|
||||
>15 long >30 , block size: %i bytes
|
||||
|
||||
# Valve Pack (VPK) files
|
||||
0 lelong 0x55aa1234 Valve Pak file
|
||||
>0x4 lelong x \b, version %u
|
||||
>0x8 lelong x \b, %u entries
|
||||
|
||||
# Snappy framing format
|
||||
# http://code.google.com/p/snappy/source/browse/trunk/framing_format.txt
|
||||
0 string \377\006\0\0sNaPpY snappy framed data
|
||||
!:mime application/x-snappy-framed
|
@ -1,6 +1,6 @@
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# $File: console,v 1.18 2010/09/20 19:19:17 rrt Exp $
|
||||
# $File: console,v 1.19 2013/02/06 14:18:52 christos Exp $
|
||||
# Console game magic
|
||||
# Toby Deshane <hac@shoelace.digivill.net>
|
||||
# ines: file(1) magic for Marat's iNES Nintendo Entertainment System
|
||||
@ -137,7 +137,7 @@
|
||||
>113 string x (%s)
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# Microsoft Xbox executables .xbe (Esa Hyytiä <ehyytia@cc.hut.fi>)
|
||||
# Microsoft Xbox executables .xbe (Esa Hyytia <ehyytia@cc.hut.fi>)
|
||||
0 string XBEH XBE, Microsoft Xbox executable
|
||||
# probabilistic checks whether signed or not
|
||||
>0x0004 ulelong =0x0
|
||||
@ -177,7 +177,7 @@
|
||||
# From: Serge van den Boom <svdb@stack.nl>
|
||||
0 string \x01ZZZZZ\x01 3DO "Opera" file system
|
||||
|
||||
# From Gürkan Sengün <gurkan@linuks.mine.nu>, www.linuks.mine.nu
|
||||
# From Gurkan Sengun <gurkan@linuks.mine.nu>, www.linuks.mine.nu
|
||||
0 string GBS Nintendo Gameboy Music/Audio Data
|
||||
12 string GameBoy\ Music\ Module Nintendo Gameboy Music Module
|
||||
|
@ -1,6 +1,6 @@
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# $File: convex,v 1.7 2009/09/19 16:28:08 christos Exp $
|
||||
# $File: convex,v 1.8 2012/10/03 23:44:43 christos Exp $
|
||||
# convex: file(1) magic for Convex boxes
|
||||
#
|
||||
# Convexes are big-endian.
|
||||
@ -30,8 +30,6 @@
|
||||
# The restore program uses these number to determine how the data is
|
||||
# to be extracted.
|
||||
#
|
||||
24 belong =60011 dump format, 4.1 BSD or earlier
|
||||
24 belong =60012 dump format, 4.2 or 4.3 BSD without IDC
|
||||
24 belong =60013 dump format, 4.2 or 4.3 BSD (IDC compatible)
|
||||
24 belong =60014 dump format, Convex Storage Manager by-reference dump
|
||||
#
|
23
magic/Magdir/ctf
Normal file
23
magic/Magdir/ctf
Normal file
@ -0,0 +1,23 @@
|
||||
|
||||
#--------------------------------------------------------------
|
||||
# ctf: file(1) magic for CTF (Common Trace Format) trace files
|
||||
#
|
||||
# Specs. available here: <http://www.efficios.com/ctf>
|
||||
#--------------------------------------------------------------
|
||||
|
||||
# CTF trace data
|
||||
0 lelong 0xc1fc1fc1 Common Trace Format (CTF) trace data (LE)
|
||||
0 belong 0xc1fc1fc1 Common Trace Format (CTF) trace data (BE)
|
||||
|
||||
# CTF metadata (packetized)
|
||||
0 lelong 0x75d11d57 Common Trace Format (CTF) packetized metadata (LE)
|
||||
>35 byte x \b, v%d
|
||||
>36 byte x \b.%d
|
||||
0 belong 0x75d11d57 Common Trace Format (CTF) packetized metadata (BE)
|
||||
>35 byte x \b, v%d
|
||||
>36 byte x \b.%d
|
||||
|
||||
# CTF metadata (plain text)
|
||||
0 string /*\x20CTF\x20 Common Trace Format (CTF) plain text metadata
|
||||
!:strength + 5 # this is to make sure we beat C
|
||||
>&0 regex [0-9]+\.[0-9]+ \b, v%s
|
8
magic/Magdir/cubemap
Normal file
8
magic/Magdir/cubemap
Normal file
@ -0,0 +1,8 @@
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# $File: cubemap,v 1.1 2012/06/06 13:03:20 christos Exp $
|
||||
# file(1) magic(5) data for cubemaps Martin Erik Werner <martinerikwerner@gmail.com>
|
||||
#
|
||||
0 string ACMP Map file for the AssaultCube FPS game
|
||||
0 string CUBE Map file for cube and cube2 engine games
|
||||
0 string MAPZ) Map file for the Blood Frontier/Red Eclipse FPS games
|
@ -1,55 +1,12 @@
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# $File: cups,v 1.1 2011/11/10 18:59:54 christos Exp $
|
||||
# $File: cups,v 1.3 2014/05/28 19:50:41 christos Exp $
|
||||
# Cups: file(1) magic for the cups raster file format
|
||||
# From: Laurent Martelli <martellilaurent@gmail.com>
|
||||
# http://www.cups.org/documentation.php/spec-raster.html
|
||||
#
|
||||
|
||||
# Cups Raster image format, Big Endian
|
||||
0 string RaS
|
||||
!:mime application/vnd.cups-raster
|
||||
>3 string t Cups Raster version 1, Big Endian
|
||||
>3 string 2 Cups Raster version 2, Big Endian
|
||||
>3 string 3 Cups Raster version 3, Big Endian
|
||||
>280 belong x \b, %d
|
||||
>284 belong x \bx%d dpi
|
||||
>376 belong x \b, %dx
|
||||
>380 belong x \b%d pixels
|
||||
>388 belong x %d bits/color
|
||||
>392 belong x %d bits/pixel
|
||||
>400 belong 0 ColorOrder=Chunky
|
||||
>400 belong 1 ColorOrder=Banded
|
||||
>400 belong 2 ColorOrder=Planar
|
||||
>404 belong 0 ColorSpace=gray
|
||||
>404 belong 1 ColorSpace=RGB
|
||||
>404 belong 2 ColorSpace=RGBA
|
||||
>404 belong 3 ColorSpace=black
|
||||
>404 belong 4 ColorSpace=CMY
|
||||
>404 belong 5 ColorSpace=YMC
|
||||
>404 belong 6 ColorSpace=CMYK
|
||||
>404 belong 7 ColorSpace=YMCK
|
||||
>404 belong 8 ColorSpace=KCMY
|
||||
>404 belong 9 ColorSpace=KCMYcm
|
||||
>404 belong 10 ColorSpace=GMCK
|
||||
>404 belong 11 ColorSpace=GMCS
|
||||
>404 belong 12 ColorSpace=WHITE
|
||||
>404 belong 13 ColorSpace=GOLD
|
||||
>404 belong 14 ColorSpace=SILVER
|
||||
>404 belong 15 ColorSpace=CIE XYZ
|
||||
>404 belong 16 ColorSpace=CIE Lab
|
||||
>404 belong 17 ColorSpace=RGBW
|
||||
>404 belong 18 ColorSpace=sGray
|
||||
>404 belong 19 ColorSpace=sRGB
|
||||
>404 belong 20 ColorSpace=AdobeRGB
|
||||
|
||||
|
||||
# Cups Raster image format, Little Endian
|
||||
1 string SaR
|
||||
>0 string t Cups Raster version 1, Little Endian
|
||||
>0 string 2 Cups Raster version 2, Little Endian
|
||||
>0 string 3 Cups Raster version 3, Little Endian
|
||||
!:mime application/vnd.cups-raster
|
||||
0 name cups-le
|
||||
>280 lelong x \b, %d
|
||||
>284 lelong x \bx%d dpi
|
||||
>376 lelong x \b, %dx
|
||||
@ -80,3 +37,20 @@
|
||||
>404 lelong 18 ColorSpace=sGray
|
||||
>404 lelong 19 ColorSpace=sRGB
|
||||
>404 lelong 20 ColorSpace=AdobeRGB
|
||||
|
||||
# Cups Raster image format, Big Endian
|
||||
0 string RaS
|
||||
>3 string t Cups Raster version 1, Big Endian
|
||||
>3 string 2 Cups Raster version 2, Big Endian
|
||||
>3 string 3 Cups Raster version 3, Big Endian
|
||||
!:mime application/vnd.cups-raster
|
||||
>0 use ^cups-le
|
||||
|
||||
|
||||
# Cups Raster image format, Little Endian
|
||||
1 string SaR
|
||||
>0 string t Cups Raster version 1, Little Endian
|
||||
>0 string 2 Cups Raster version 2, Little Endian
|
||||
>0 string 3 Cups Raster version 3, Little Endian
|
||||
!:mime application/vnd.cups-raster
|
||||
>0 use cups-le
|
490
magic/Magdir/database
Normal file
490
magic/Magdir/database
Normal file
@ -0,0 +1,490 @@
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# $File: database,v 1.41 2014/06/03 19:17:27 christos Exp $
|
||||
# database: file(1) magic for various databases
|
||||
#
|
||||
# extracted from header/code files by Graeme Wilford (eep2gw@ee.surrey.ac.uk)
|
||||
#
|
||||
#
|
||||
# GDBM magic numbers
|
||||
# Will be maintained as part of the GDBM distribution in the future.
|
||||
# <downsj@teeny.org>
|
||||
0 belong 0x13579ace GNU dbm 1.x or ndbm database, big endian
|
||||
!:mime application/x-gdbm
|
||||
0 lelong 0x13579ace GNU dbm 1.x or ndbm database, little endian
|
||||
!:mime application/x-gdbm
|
||||
0 string GDBM GNU dbm 2.x database
|
||||
!:mime application/x-gdbm
|
||||
#
|
||||
# Berkeley DB
|
||||
#
|
||||
# Ian Darwin's file /etc/magic files: big/little-endian version.
|
||||
#
|
||||
# Hash 1.85/1.86 databases store metadata in network byte order.
|
||||
# Btree 1.85/1.86 databases store the metadata in host byte order.
|
||||
# Hash and Btree 2.X and later databases store the metadata in host byte order.
|
||||
|
||||
0 long 0x00061561 Berkeley DB
|
||||
!:mime application/x-dbm
|
||||
>8 belong 4321
|
||||
>>4 belong >2 1.86
|
||||
>>4 belong <3 1.85
|
||||
>>4 belong >0 (Hash, version %d, native byte-order)
|
||||
>8 belong 1234
|
||||
>>4 belong >2 1.86
|
||||
>>4 belong <3 1.85
|
||||
>>4 belong >0 (Hash, version %d, little-endian)
|
||||
|
||||
0 belong 0x00061561 Berkeley DB
|
||||
>8 belong 4321
|
||||
>>4 belong >2 1.86
|
||||
>>4 belong <3 1.85
|
||||
>>4 belong >0 (Hash, version %d, big-endian)
|
||||
>8 belong 1234
|
||||
>>4 belong >2 1.86
|
||||
>>4 belong <3 1.85
|
||||
>>4 belong >0 (Hash, version %d, native byte-order)
|
||||
|
||||
0 long 0x00053162 Berkeley DB 1.85/1.86
|
||||
>4 long >0 (Btree, version %d, native byte-order)
|
||||
0 belong 0x00053162 Berkeley DB 1.85/1.86
|
||||
>4 belong >0 (Btree, version %d, big-endian)
|
||||
0 lelong 0x00053162 Berkeley DB 1.85/1.86
|
||||
>4 lelong >0 (Btree, version %d, little-endian)
|
||||
|
||||
12 long 0x00061561 Berkeley DB
|
||||
>16 long >0 (Hash, version %d, native byte-order)
|
||||
12 belong 0x00061561 Berkeley DB
|
||||
>16 belong >0 (Hash, version %d, big-endian)
|
||||
12 lelong 0x00061561 Berkeley DB
|
||||
>16 lelong >0 (Hash, version %d, little-endian)
|
||||
|
||||
12 long 0x00053162 Berkeley DB
|
||||
>16 long >0 (Btree, version %d, native byte-order)
|
||||
12 belong 0x00053162 Berkeley DB
|
||||
>16 belong >0 (Btree, version %d, big-endian)
|
||||
12 lelong 0x00053162 Berkeley DB
|
||||
>16 lelong >0 (Btree, version %d, little-endian)
|
||||
|
||||
12 long 0x00042253 Berkeley DB
|
||||
>16 long >0 (Queue, version %d, native byte-order)
|
||||
12 belong 0x00042253 Berkeley DB
|
||||
>16 belong >0 (Queue, version %d, big-endian)
|
||||
12 lelong 0x00042253 Berkeley DB
|
||||
>16 lelong >0 (Queue, version %d, little-endian)
|
||||
|
||||
# From Max Bowsher.
|
||||
12 long 0x00040988 Berkeley DB
|
||||
>16 long >0 (Log, version %d, native byte-order)
|
||||
12 belong 0x00040988 Berkeley DB
|
||||
>16 belong >0 (Log, version %d, big-endian)
|
||||
12 lelong 0x00040988 Berkeley DB
|
||||
>16 lelong >0 (Log, version %d, little-endian)
|
||||
|
||||
#
|
||||
#
|
||||
# Round Robin Database Tool by Tobias Oetiker <oetiker@ee.ethz.ch>
|
||||
0 string/b RRD\0 RRDTool DB
|
||||
>4 string/b x version %s
|
||||
|
||||
>>10 short !0 16bit aligned
|
||||
>>>10 bedouble 8.642135e+130 big-endian
|
||||
>>>>18 short x 32bit long (m68k)
|
||||
|
||||
>>10 short 0
|
||||
>>>12 long !0 32bit aligned
|
||||
>>>>12 bedouble 8.642135e+130 big-endian
|
||||
>>>>>20 long 0 64bit long
|
||||
>>>>>20 long !0 32bit long
|
||||
>>>>12 ledouble 8.642135e+130 little-endian
|
||||
>>>>>24 long 0 64bit long
|
||||
>>>>>24 long !0 32bit long (i386)
|
||||
>>>>12 string \x43\x2b\x1f\x5b\x2f\x25\xc0\xc7 middle-endian
|
||||
>>>>>24 short !0 32bit long (arm)
|
||||
|
||||
>>8 quad 0 64bit aligned
|
||||
>>>16 bedouble 8.642135e+130 big-endian
|
||||
>>>>24 long 0 64bit long (s390x)
|
||||
>>>>24 long !0 32bit long (hppa/mips/ppc/s390/SPARC)
|
||||
>>>16 ledouble 8.642135e+130 little-endian
|
||||
>>>>28 long 0 64bit long (alpha/amd64/ia64)
|
||||
>>>>28 long !0 32bit long (armel/mipsel)
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
# ROOT: file(1) magic for ROOT databases
|
||||
#
|
||||
0 string root\0 ROOT file
|
||||
>4 belong x Version %d
|
||||
>33 belong x (Compression: %d)
|
||||
|
||||
# XXX: Weak magic.
|
||||
# Alex Ott <ott@jet.msk.su>
|
||||
## Paradox file formats
|
||||
#2 leshort 0x0800 Paradox
|
||||
#>0x39 byte 3 v. 3.0
|
||||
#>0x39 byte 4 v. 3.5
|
||||
#>0x39 byte 9 v. 4.x
|
||||
#>0x39 byte 10 v. 5.x
|
||||
#>0x39 byte 11 v. 5.x
|
||||
#>0x39 byte 12 v. 7.x
|
||||
#>>0x04 byte 0 indexed .DB data file
|
||||
#>>0x04 byte 1 primary index .PX file
|
||||
#>>0x04 byte 2 non-indexed .DB data file
|
||||
#>>0x04 byte 3 non-incrementing secondary index .Xnn file
|
||||
#>>0x04 byte 4 secondary index .Ynn file
|
||||
#>>0x04 byte 5 incrementing secondary index .Xnn file
|
||||
#>>0x04 byte 6 non-incrementing secondary index .XGn file
|
||||
#>>0x04 byte 7 secondary index .YGn file
|
||||
#>>>0x04 byte 8 incrementing secondary index .XGn file
|
||||
|
||||
## XBase database files
|
||||
# updated by Joerg Jenderek at Feb 2013
|
||||
# http://www.dbase.com/Knowledgebase/INT/db7_file_fmt.htm
|
||||
# http://www.clicketyclick.dk/databases/xbase/format/dbf.html
|
||||
# http://home.f1.htw-berlin.de/scheibl/db/intern/dBase.htm
|
||||
# inspect VVYYMMDD , where 1<= MM <= 12 and 1<= DD <= 31
|
||||
0 ubelong&0x0000FFFF <0x00000C20
|
||||
# skip Infocom game Z-machine
|
||||
>2 ubyte >0
|
||||
# skip Androids *.xml
|
||||
>>3 ubyte >0
|
||||
>>>3 ubyte <32
|
||||
# 1 < version VV
|
||||
>>>>0 ubyte >1
|
||||
# skip HELP.CA3 by test for reserved byte ( NULL )
|
||||
>>>>>27 ubyte 0
|
||||
# reserved bytes not always 0 ; also found 0x3901 (T4.DBF) ,0x7101 (T5.DBF,T6.DBF)
|
||||
#>>>>>30 ubeshort x 30NULL?%x
|
||||
# possible production flag,tag numbers(<=0x30),tag length(<=0x20), reserved (NULL)
|
||||
>>>>>>24 ubelong&0xffFFFFff >0x01302000
|
||||
# .DBF or .MDX
|
||||
>>>>>>24 ubelong&0xffFFFFff <0x01302001
|
||||
# for Xbase Database file (*.DBF) reserved (NULL) for multi-user
|
||||
>>>>>>>24 ubelong&0xffFFFFff =0
|
||||
# test for 2 reserved NULL bytes,transaction and encryption byte flag
|
||||
>>>>>>>>12 ubelong&0xFFFFfEfE 0
|
||||
# test for MDX flag
|
||||
>>>>>>>>>28 ubyte x
|
||||
>>>>>>>>>28 ubyte&0xf8 0
|
||||
# header size >= 32
|
||||
>>>>>>>>>>8 uleshort >31
|
||||
# skip PIC15736.PCX by test for language driver name or field name
|
||||
>>>>>>>>>>>32 ubyte >0
|
||||
#!:mime application/x-dbf; charset=unknown-8bit ??
|
||||
#!:mime application/x-dbase
|
||||
>>>>>>>>>>>>0 use xbase-type
|
||||
# database file
|
||||
>>>>>>>>>>>>0 ubyte x \b DBF
|
||||
>>>>>>>>>>>>4 lelong 0 \b, no records
|
||||
>>>>>>>>>>>>4 lelong >0 \b, %d record
|
||||
# plural s appended
|
||||
>>>>>>>>>>>>>4 lelong >1 \bs
|
||||
# http://www.clicketyclick.dk/databases/xbase/format/dbf_check.html#CHECK_DBF
|
||||
# 1 <= record size <= 4000 (dBase 3,4) or 32 * KB (=0x8000)
|
||||
>>>>>>>>>>>>10 uleshort x * %d
|
||||
# file size = records * record size + header size
|
||||
>>>>>>>>>>>>1 ubyte x \b, update-date
|
||||
>>>>>>>>>>>>1 use xbase-date
|
||||
# http://msdn.microsoft.com/de-de/library/cc483186(v=vs.71).aspx
|
||||
#>>>>>>>>>>>>29 ubyte =0 \b, codepage ID=0x%x
|
||||
# 2~cp850 , 3~cp1252 , 0x1b~?? ; what code page is 0x1b ?
|
||||
>>>>>>>>>>>>29 ubyte >0 \b, codepage ID=0x%x
|
||||
#>>>>>>>>>>>>28 ubyte&0x01 0 \b, no index file
|
||||
>>>>>>>>>>>>28 ubyte&0x01 1 \b, with index file .MDX
|
||||
>>>>>>>>>>>>28 ubyte&0x02 2 \b, with memo .FPT
|
||||
>>>>>>>>>>>>28 ubyte&0x04 4 \b, DataBaseContainer
|
||||
# 1st record offset + 1 = header size
|
||||
>>>>>>>>>>>>8 uleshort >0
|
||||
>>>>>>>>>>>>(8.s+1) ubyte >0
|
||||
>>>>>>>>>>>>>8 uleshort >0 \b, at offset %d
|
||||
>>>>>>>>>>>>>(8.s+1) ubyte >0
|
||||
>>>>>>>>>>>>>>&-1 string >\0 1st record "%s"
|
||||
# for multiple index files (*.MDX) Production flag,tag numbers(<=0x30),tag length(<=0x20), reserverd (NULL)
|
||||
>>>>>>>24 ubelong&0x0133f7ff >0
|
||||
# test for reserved NULL byte
|
||||
>>>>>>>>47 ubyte x
|
||||
# test for valid TAG key format (0x10 or 0)
|
||||
>>>>>>>>>559 ubyte&0xeF 0
|
||||
# test MM <= 12
|
||||
>>>>>>>>>45 ubeshort <0x0C20
|
||||
>>>>>>>>>>45 ubyte >0
|
||||
>>>>>>>>>>>46 ubyte <32
|
||||
>>>>>>>>>>>>46 ubyte >0
|
||||
#!:mime application/x-mdx
|
||||
>>>>>>>>>>>>>0 use xbase-type
|
||||
>>>>>>>>>>>>>0 ubyte x \b MDX
|
||||
>>>>>>>>>>>>>1 ubyte x \b, creation-date
|
||||
>>>>>>>>>>>>>1 use xbase-date
|
||||
>>>>>>>>>>>>>44 ubyte x \b, update-date
|
||||
>>>>>>>>>>>>>44 use xbase-date
|
||||
# No.of tags in use (1,2,5,12)
|
||||
>>>>>>>>>>>>>28 uleshort x \b, %d
|
||||
# No. of entries in tag (0x30)
|
||||
>>>>>>>>>>>>>25 ubyte x \b/%d tags
|
||||
# Length of tag
|
||||
>>>>>>>>>>>>>26 ubyte x * %d
|
||||
# 1st tag name_
|
||||
>>>>>>>>>>>>>548 string x \b, 1st tag "%.11s"
|
||||
# 2nd tag name
|
||||
#>>>>>>>>>>>>(26.b+548) string x \b, 2nd tag "%.11s"
|
||||
#
|
||||
# Print the xBase names of different version variants
|
||||
0 name xbase-type
|
||||
>0 ubyte <2
|
||||
# 1 < version
|
||||
>0 ubyte >1
|
||||
>>0 ubyte 0x02 FoxBase
|
||||
# FoxBase+/dBaseIII+, no memo
|
||||
>>0 ubyte 0x03 FoxBase+/dBase III
|
||||
!:mime application/x-dbf
|
||||
# dBASE IV no memo file
|
||||
>>0 ubyte 0x04 dBase IV
|
||||
!:mime application/x-dbf
|
||||
# dBASE V no memo file
|
||||
>>0 ubyte 0x05 dBase V
|
||||
!:mime application/x-dbf
|
||||
>>0 ubyte 0x30 Visual FoxPro
|
||||
!:mime application/x-dbf
|
||||
>>0 ubyte 0x31 Visual FoxPro, autoincrement
|
||||
!:mime application/x-dbf
|
||||
# Visual FoxPro, with field type Varchar or Varbinary
|
||||
>>0 ubyte 0x32 Visual FoxPro, with field type Varchar
|
||||
!:mime application/x-dbf
|
||||
# dBASE IV SQL, no memo;dbv memo var size (Flagship)
|
||||
>>0 ubyte 0x43 dBase IV, with SQL table
|
||||
!:mime application/x-dbf
|
||||
# http://msdn.microsoft.com/en-US/library/st4a0s68(v=vs.80).aspx
|
||||
#>>0 ubyte 0x62 dBase IV, with SQL table
|
||||
#!:mime application/x-dbf
|
||||
# dBASE IV, with memo!!
|
||||
>>0 ubyte 0x7b dBase IV, with memo
|
||||
!:mime application/x-dbf
|
||||
# http://msdn.microsoft.com/en-US/library/st4a0s68(v=vs.80).aspx
|
||||
#>>0 ubyte 0x82 dBase IV, with SQL system
|
||||
#!:mime application/x-dbf
|
||||
# FoxBase+/dBaseIII+ with memo .DBT!
|
||||
>>0 ubyte 0x83 FoxBase+/dBase III, with memo .DBT
|
||||
!:mime application/x-dbf
|
||||
# VISUAL OBJECTS (first 1.0 versions) for the Dbase III files (NTX clipper driver); memo file
|
||||
>>0 ubyte 0x87 VISUAL OBJECTS, with memo file
|
||||
!:mime application/x-dbf
|
||||
# http://msdn.microsoft.com/en-US/library/st4a0s68(v=vs.80).aspx
|
||||
#>>0 ubyte 0x8A FoxBase+/dBase III, with memo .DBT
|
||||
#!:mime application/x-dbf
|
||||
# dBASE IV with memo!
|
||||
>>0 ubyte 0x8B dBase IV, with memo .DBT
|
||||
!:mime application/x-dbf
|
||||
# dBase IV with SQL Table,no memo?
|
||||
>>0 ubyte 0x8E dBase IV, with SQL table
|
||||
!:mime application/x-dbf
|
||||
# .dbv and .dbt memo (Flagship)?
|
||||
>>0 ubyte 0xB3 Flagship
|
||||
# http://msdn.microsoft.com/en-US/library/st4a0s68(v=vs.80).aspx
|
||||
#>>0 ubyte 0xCA dBase IV with memo .DBT
|
||||
#!:mime application/x-dbf
|
||||
# dBASE IV with SQL table, with memo .DBT
|
||||
>>0 ubyte 0xCB dBase IV with SQL table, with memo .DBT
|
||||
!:mime application/x-dbf
|
||||
# HiPer-Six format;Clipper SIX, with SMT memo file
|
||||
>>0 ubyte 0xE5 Clipper SIX with memo
|
||||
!:mime application/x-dbf
|
||||
# http://msdn.microsoft.com/en-US/library/st4a0s68(v=vs.80).aspx
|
||||
#>>0 ubyte 0xF4 dBase IV, with SQL table, with memo
|
||||
#!:mime application/x-dbf
|
||||
>>0 ubyte 0xF5 FoxPro with memo
|
||||
!:mime application/x-dbf
|
||||
# http://msdn.microsoft.com/en-US/library/st4a0s68(v=vs.80).aspx
|
||||
#>>0 ubyte 0xFA FoxPro 2.x, with memo
|
||||
#!:mime application/x-dbf
|
||||
# unknown version (should not happen)
|
||||
>>0 default x xBase
|
||||
!:mime application/x-dbf
|
||||
>>>0 ubyte x (0x%x)
|
||||
# flags in version byte
|
||||
# DBT flag (with dBASE III memo .DBT)!!
|
||||
# >>0 ubyte&0x80 >0 DBT_FLAG=%x
|
||||
# memo flag ??
|
||||
# >>0 ubyte&0x08 >0 MEMO_FLAG=%x
|
||||
# SQL flag ??
|
||||
# >>0 ubyte&0x70 >0 SQL_FLAG=%x
|
||||
# test and print the date of xBase .DBF .MDX
|
||||
0 name xbase-date
|
||||
# inspect YYMMDD , where 1<= MM <= 12 and 1<= DD <= 31
|
||||
>0 ubelong x
|
||||
>1 ubyte <13
|
||||
>>1 ubyte >0
|
||||
>>>2 ubyte >0
|
||||
>>>>2 ubyte <32
|
||||
>>>>>0 ubyte x
|
||||
# YY is interpreted as 20YY or 19YY
|
||||
>>>>>>0 ubyte <100 \b %.2d
|
||||
# YY is interpreted 1900+YY; TODO: display yy or 20yy instead 1YY
|
||||
>>>>>>0 ubyte >99 \b %d
|
||||
>>>>>1 ubyte x \b-%d
|
||||
>>>>>2 ubyte x \b-%d
|
||||
|
||||
# dBase memo files .DBT or .FPT
|
||||
# http://msdn.microsoft.com/en-us/library/8599s21w(v=vs.80).aspx
|
||||
16 ubyte <4
|
||||
>16 ubyte !2
|
||||
>>16 ubyte !1
|
||||
# next free block index is positive
|
||||
>>>0 ulelong >0
|
||||
# skip many JPG. ZIP, BZ2 by test for reserved bytes NULL , 0|2 , 0|1 , low byte of block size
|
||||
>>>>17 ubelong&0xFFfdFE00 0x00000000
|
||||
# skip many RAR by test for low byte 0 ,high byte 0|2|even of block size, 0|a|e|d7 , 0|64h
|
||||
>>>>>20 ubelong&0xFF01209B 0x00000000
|
||||
# dBASE III
|
||||
>>>>>>16 ubyte 3
|
||||
# dBASE III DBT
|
||||
>>>>>>>0 use xbase-memo-print
|
||||
# dBASE IV DBT , FoxPro FPT or many PNG , ZIP , DBF garbage
|
||||
>>>>>>16 ubyte 0
|
||||
# dBASE IV DBT with DBF name or DBF garbage
|
||||
>>>>>>>8 ubelong >0x40000000
|
||||
# skip DBF and catch dBASE IV DBT with DBF name and with non big index of next free block
|
||||
>>>>>>>>0 ulelong <0x01010002
|
||||
>>>>>>>>>0 use xbase-memo-print
|
||||
>>>>>>>8 ubelong 0
|
||||
# skip MM*DD*.bin by test for for reserved NULL byte
|
||||
>>>>>>>>508 ubelong 0
|
||||
# real memo files should contain text here
|
||||
>>>>>>>>>520 ubelong >0x20202019
|
||||
>>>>>>>>>>520 ubelong <0xFEFEFEFF
|
||||
>>>>>>>>>>>0 use xbase-memo-print
|
||||
# garbage PCX , ZIP , JAR , XPI
|
||||
>>>>>>>8 default x
|
||||
|
||||
# Print the information of dBase DBT or FoxPro FPT memo files
|
||||
0 name xbase-memo-print
|
||||
>0 ubyte x
|
||||
# test version
|
||||
# memo file
|
||||
>>16 ubyte 3 dBase III DBT
|
||||
>>16 ubyte 0
|
||||
>>>512 ubelong <0x00000003 FoxPro FPT
|
||||
# Size of blocks for FoxPro
|
||||
>>>>6 ubeshort x \b, blocks size %u
|
||||
# Number of next available block for appending data for FoxPro
|
||||
>>>>0 ubelong =0 \b, next free block index %u
|
||||
>>>>0 ubelong !0 \b, next free block index %u
|
||||
>>>512 default x dBase IV DBT
|
||||
# DBF file name without extension
|
||||
>>>>8 string >\0 \b of %-.8s.DBF
|
||||
# size of blocks ; not reliable 0x2020204C
|
||||
#>>>>4 ulelong =0 \b, blocks size %u
|
||||
>>>>4 ulelong !0 \b, blocks size %u
|
||||
# Block length found 0 , 512
|
||||
#>>>>20 uleshort =0 \b, block length %u
|
||||
>>>>20 uleshort !0 \b, block length %u
|
||||
# Number of next available block for appending data
|
||||
>>>>0 ulelong =0 \b, next free block index %u
|
||||
>>>>0 ulelong !0 \b, next free block index %u
|
||||
>>512 ubelong x
|
||||
>>>512 ubelong =0xFFFF0800
|
||||
>>>>520 string >\0 \b, 1st used item "%s"
|
||||
# FoxPro
|
||||
>>>512 ubelong <3
|
||||
# FoxPro memo
|
||||
>>>>512 ubelong =1
|
||||
>>>>520 string >\0 \b, 1st used item "%s"
|
||||
>>>512 default x
|
||||
# may be deleted memo field
|
||||
>>>>512 string >\0 \b, 1st item "%s"
|
||||
|
||||
# TODO:
|
||||
# DBASE index file *.NDX
|
||||
# DBASE Compound Index file *.CDX
|
||||
# dBASE IV Printer Driver *.PRF
|
||||
## End of XBase database stuff
|
||||
|
||||
# MS Access database
|
||||
4 string Standard\ Jet\ DB Microsoft Access Database
|
||||
!:mime application/x-msaccess
|
||||
4 string Standard\ ACE\ DB Microsoft Access Database
|
||||
!:mime application/x-msaccess
|
||||
|
||||
# TDB database from Samba et al - Martin Pool <mbp@samba.org>
|
||||
0 string TDB\ file TDB database
|
||||
>32 lelong 0x2601196D version 6, little-endian
|
||||
>>36 lelong x hash size %d bytes
|
||||
|
||||
# SE Linux policy database
|
||||
0 lelong 0xf97cff8c SE Linux policy
|
||||
>16 lelong x v%d
|
||||
>20 lelong 1 MLS
|
||||
>24 lelong x %d symbols
|
||||
>28 lelong x %d ocons
|
||||
|
||||
# ICE authority file data (Wolfram Kleff)
|
||||
2 string ICE ICE authority data
|
||||
|
||||
# X11 Xauthority file (Wolfram Kleff)
|
||||
10 string MIT-MAGIC-COOKIE-1 X11 Xauthority data
|
||||
11 string MIT-MAGIC-COOKIE-1 X11 Xauthority data
|
||||
12 string MIT-MAGIC-COOKIE-1 X11 Xauthority data
|
||||
13 string MIT-MAGIC-COOKIE-1 X11 Xauthority data
|
||||
14 string MIT-MAGIC-COOKIE-1 X11 Xauthority data
|
||||
15 string MIT-MAGIC-COOKIE-1 X11 Xauthority data
|
||||
16 string MIT-MAGIC-COOKIE-1 X11 Xauthority data
|
||||
17 string MIT-MAGIC-COOKIE-1 X11 Xauthority data
|
||||
18 string MIT-MAGIC-COOKIE-1 X11 Xauthority data
|
||||
|
||||
# From: Maxime Henrion <mux@FreeBSD.org>
|
||||
# PostgreSQL's custom dump format, Maxime Henrion <mux@FreeBSD.org>
|
||||
0 string PGDMP PostgreSQL custom database dump
|
||||
>5 byte x - v%d
|
||||
>6 byte x \b.%d
|
||||
>5 beshort <0x101 \b-0
|
||||
>5 beshort >0x100
|
||||
>>7 byte x \b-%d
|
||||
|
||||
# Type: Advanced Data Format (ADF) database
|
||||
# URL: http://www.grc.nasa.gov/WWW/cgns/adf/
|
||||
# From: Nicolas Chauvat <nicolas.chauvat@logilab.fr>
|
||||
0 string @(#)ADF\ Database CGNS Advanced Data Format
|
||||
|
||||
# Tokyo Cabinet magic data
|
||||
# http://tokyocabinet.sourceforge.net/index.html
|
||||
0 string ToKyO\ CaBiNeT\n Tokyo Cabinet
|
||||
>14 string x \b (%s)
|
||||
>32 byte 0 \b, Hash
|
||||
!:mime application/x-tokyocabinet-hash
|
||||
>32 byte 1 \b, B+ tree
|
||||
!:mime application/x-tokyocabinet-btree
|
||||
>32 byte 2 \b, Fixed-length
|
||||
!:mime application/x-tokyocabinet-fixed
|
||||
>32 byte 3 \b, Table
|
||||
!:mime application/x-tokyocabinet-table
|
||||
>33 byte &1 \b, [open]
|
||||
>33 byte &2 \b, [fatal]
|
||||
>34 byte x \b, apow=%d
|
||||
>35 byte x \b, fpow=%d
|
||||
>36 byte &0x01 \b, [large]
|
||||
>36 byte &0x02 \b, [deflate]
|
||||
>36 byte &0x04 \b, [bzip]
|
||||
>36 byte &0x08 \b, [tcbs]
|
||||
>36 byte &0x10 \b, [excodec]
|
||||
>40 lequad x \b, bnum=%lld
|
||||
>48 lequad x \b, rnum=%lld
|
||||
>56 lequad x \b, fsiz=%lld
|
||||
|
||||
# Type: QDBM Quick Database Manager
|
||||
# From: Benoit Sibaud <bsibaud@april.org>
|
||||
0 string \\[depot\\]\n\f Quick Database Manager, little endian
|
||||
0 string \\[DEPOT\\]\n\f Quick Database Manager, big endian
|
||||
|
||||
# Type: TokyoCabinet database
|
||||
# URL: http://tokyocabinet.sourceforge.net/
|
||||
# From: Benoit Sibaud <bsibaud@april.org>
|
||||
0 string ToKyO\ CaBiNeT\n TokyoCabinet database
|
||||
>14 string x (version %s)
|
||||
|
||||
# From: Stephane Blondon http://www.yaal.fr
|
||||
# Database file for Zope (done by FileStorage)
|
||||
0 string FS21 Zope Object Database File Storage (data)
|
||||
# Cache file for the database of Zope (done by ClientStorage)
|
||||
0 string ZEC3 Zope Object Database Client Cache File (data)
|
||||
|
||||
# IDA (Interactive Disassembler) database
|
||||
0 string IDA1 IDA (Interactive Disassembler) database
|
@ -1,6 +1,6 @@
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# $File: diff,v 1.12 2010/12/07 16:52:52 christos Exp $
|
||||
# $File: diff,v 1.14 2012/09/16 23:08:54 christos Exp $
|
||||
# diff: file(1) magic for diff(1) output
|
||||
#
|
||||
0 search/1 diff\ diff output text
|
||||
@ -16,7 +16,7 @@
|
||||
!:mime text/x-diff
|
||||
|
||||
# bsdiff: file(1) magic for bsdiff(1) output
|
||||
0 string/t BSDIFF40 bsdiff(1) patch file
|
||||
0 string/b BSDIFF40 bsdiff(1) patch file
|
||||
|
||||
|
||||
# unified diff
|
||||
@ -27,3 +27,14 @@
|
||||
>>>>&0 search/1 @@ unified diff output text
|
||||
!:mime text/x-diff
|
||||
!:strength + 90
|
||||
|
||||
# librsync -- the library for network deltas
|
||||
#
|
||||
# Copyright (C) 2001 by Martin Pool. You may do whatever you want with
|
||||
# this file.
|
||||
#
|
||||
0 belong 0x72730236 rdiff network-delta data
|
||||
|
||||
0 belong 0x72730136 rdiff network-delta signature data
|
||||
>4 belong x (block length=%d,
|
||||
>8 belong x signature strength=%d)
|
@ -1,6 +1,6 @@
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# $File: digital,v 1.10 2011/05/03 01:44:17 christos Exp $
|
||||
# $File: digital,v 1.11 2013/01/11 16:45:23 christos Exp $
|
||||
# Digital UNIX - Info
|
||||
#
|
||||
0 string =!<arch>\n________64E Alpha archive
|
||||
@ -8,20 +8,20 @@
|
||||
#
|
||||
|
||||
0 leshort 0603
|
||||
>>24 leshort 0410 COFF format alpha pure
|
||||
>>24 leshort 0413 COFF format alpha demand paged
|
||||
>>>22 leshort&030000 !020000 executable
|
||||
>>>22 leshort&020000 !0 dynamically linked
|
||||
>>>16 lelong !0 not stripped
|
||||
>>>16 lelong 0 stripped
|
||||
>>>27 byte x - version %d
|
||||
>>>26 byte x \b.%d
|
||||
>>>28 byte x \b-%d
|
||||
>>24 leshort 0407 COFF format alpha object
|
||||
>>>22 leshort&030000 020000 shared library
|
||||
>>>27 byte x - version %d
|
||||
>>>26 byte x \b.%d
|
||||
>>>28 byte x \b-%d
|
||||
>24 leshort 0410 COFF format alpha pure
|
||||
>24 leshort 0413 COFF format alpha demand paged
|
||||
>>22 leshort&030000 !020000 executable
|
||||
>>22 leshort&020000 !0 dynamically linked
|
||||
>>16 lelong !0 not stripped
|
||||
>>16 lelong 0 stripped
|
||||
>>27 byte x - version %d
|
||||
>>26 byte x \b.%d
|
||||
>>28 byte x \b-%d
|
||||
>24 leshort 0407 COFF format alpha object
|
||||
>>22 leshort&030000 020000 shared library
|
||||
>>27 byte x - version %d
|
||||
>>26 byte x \b.%d
|
||||
>>28 byte x \b-%d
|
||||
|
||||
# Basic recognition of Digital UNIX core dumps - Mike Bremford <mike@opac.bl.uk>
|
||||
#
|
69
magic/Magdir/dolby
Normal file
69
magic/Magdir/dolby
Normal file
@ -0,0 +1,69 @@
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# $File: dolby,v 1.7 2014/01/08 22:37:23 christos Exp $
|
||||
# ATSC A/53 aka AC-3 aka Dolby Digital <ashitaka@gmx.at>
|
||||
# from http://www.atsc.org/standards/a_52a.pdf
|
||||
# corrections, additions, etc. are always welcome!
|
||||
#
|
||||
# syncword
|
||||
0 beshort 0x0b77 ATSC A/52 aka AC-3 aka Dolby Digital stream,
|
||||
# Proposed audio/ac3 RFC/4184
|
||||
!:mime audio/vnd.dolby.dd-raw
|
||||
# fscod
|
||||
>4 byte&0xc0 = 0x00 48 kHz,
|
||||
>4 byte&0xc0 = 0x40 44.1 kHz,
|
||||
>4 byte&0xc0 = 0x80 32 kHz,
|
||||
# is this one used for 96 kHz?
|
||||
>4 byte&0xc0 = 0xc0 reserved frequency,
|
||||
#
|
||||
>5 byte&0x07 = 0x00 \b, complete main (CM)
|
||||
>5 byte&0x07 = 0x01 \b, music and effects (ME)
|
||||
>5 byte&0x07 = 0x02 \b, visually impaired (VI)
|
||||
>5 byte&0x07 = 0x03 \b, hearing impaired (HI)
|
||||
>5 byte&0x07 = 0x04 \b, dialogue (D)
|
||||
>5 byte&0x07 = 0x05 \b, commentary (C)
|
||||
>5 byte&0x07 = 0x06 \b, emergency (E)
|
||||
>5 beshort&0x07e0 0x0720 \b, voiceover (VO)
|
||||
>5 beshort&0x07e0 >0x0720 \b, karaoke
|
||||
# acmod
|
||||
>6 byte&0xe0 = 0x00 1+1 front,
|
||||
>>6 byte&0x10 = 0x10 LFE on,
|
||||
>6 byte&0xe0 = 0x20 1 front/0 rear,
|
||||
>>6 byte&0x10 = 0x10 LFE on,
|
||||
>6 byte&0xe0 = 0x40 2 front/0 rear,
|
||||
# dsurmod (for stereo only)
|
||||
>>6 byte&0x18 = 0x00 Dolby Surround not indicated
|
||||
>>6 byte&0x18 = 0x08 not Dolby Surround encoded
|
||||
>>6 byte&0x18 = 0x10 Dolby Surround encoded
|
||||
>>6 byte&0x18 = 0x18 reserved Dolby Surround mode
|
||||
>>6 byte&0x04 = 0x04 LFE on,
|
||||
>6 byte&0xe0 = 0x60 3 front/0 rear,
|
||||
>>6 byte&0x04 = 0x04 LFE on,
|
||||
>6 byte&0xe0 = 0x80 2 front/1 rear,
|
||||
>>6 byte&0x04 = 0x04 LFE on,
|
||||
>6 byte&0xe0 = 0xa0 3 front/1 rear,
|
||||
>>6 byte&0x01 = 0x01 LFE on,
|
||||
>6 byte&0xe0 = 0xc0 2 front/2 rear,
|
||||
>>6 byte&0x04 = 0x04 LFE on,
|
||||
>6 byte&0xe0 = 0xe0 3 front/2 rear,
|
||||
>>6 byte&0x01 = 0x01 LFE on,
|
||||
#
|
||||
>4 byte&0x3e = 0x00 \b, 32 kbit/s
|
||||
>4 byte&0x3e = 0x02 \b, 40 kbit/s
|
||||
>4 byte&0x3e = 0x04 \b, 48 kbit/s
|
||||
>4 byte&0x3e = 0x06 \b, 56 kbit/s
|
||||
>4 byte&0x3e = 0x08 \b, 64 kbit/s
|
||||
>4 byte&0x3e = 0x0a \b, 80 kbit/s
|
||||
>4 byte&0x3e = 0x0c \b, 96 kbit/s
|
||||
>4 byte&0x3e = 0x0e \b, 112 kbit/s
|
||||
>4 byte&0x3e = 0x10 \b, 128 kbit/s
|
||||
>4 byte&0x3e = 0x12 \b, 160 kbit/s
|
||||
>4 byte&0x3e = 0x14 \b, 192 kbit/s
|
||||
>4 byte&0x3e = 0x16 \b, 224 kbit/s
|
||||
>4 byte&0x3e = 0x18 \b, 256 kbit/s
|
||||
>4 byte&0x3e = 0x1a \b, 320 kbit/s
|
||||
>4 byte&0x3e = 0x1c \b, 384 kbit/s
|
||||
>4 byte&0x3e = 0x1e \b, 448 kbit/s
|
||||
>4 byte&0x3e = 0x20 \b, 512 kbit/s
|
||||
>4 byte&0x3e = 0x22 \b, 576 kbit/s
|
||||
>4 byte&0x3e = 0x24 \b, 640 kbit/s
|
@ -1,14 +1,14 @@
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# $File: dump,v 1.11 2009/09/19 16:28:09 christos Exp $
|
||||
# $File: dump,v 1.13 2014/04/30 21:41:02 christos Exp $
|
||||
# dump: file(1) magic for dump file format--for new and old dump filesystems
|
||||
#
|
||||
# We specify both byte orders in order to recognize byte-swapped dumps.
|
||||
#
|
||||
24 belong 60012 new-fs dump file (big endian),
|
||||
0 name new-dump-be
|
||||
>4 bedate x Previous dump %s,
|
||||
>8 bedate x This dump %s,
|
||||
>12 belong >0 Volume %ld,
|
||||
>12 belong >0 Volume %d,
|
||||
>692 belong 0 Level zero, type:
|
||||
>692 belong >0 Level %d, type:
|
||||
>0 belong 1 tape header,
|
||||
@ -24,10 +24,10 @@
|
||||
>824 string >\0 Host %s,
|
||||
>888 belong >0 Flags %x
|
||||
|
||||
24 belong 60011 old-fs dump file (big endian),
|
||||
0 name old-dump-be
|
||||
#>4 bedate x Previous dump %s,
|
||||
#>8 bedate x This dump %s,
|
||||
>12 belong >0 Volume %ld,
|
||||
>12 belong >0 Volume %d,
|
||||
>692 belong 0 Level zero, type:
|
||||
>692 belong >0 Level %d, type:
|
||||
>0 belong 1 tape header,
|
||||
@ -43,48 +43,48 @@
|
||||
>824 string >\0 Host %s,
|
||||
>888 belong >0 Flags %x
|
||||
|
||||
24 lelong 60012 new-fs dump file (little endian),
|
||||
>4 ledate x This dump %s,
|
||||
>8 ledate x Previous dump %s,
|
||||
>12 lelong >0 Volume %ld,
|
||||
>692 lelong 0 Level zero, type:
|
||||
>692 lelong >0 Level %d, type:
|
||||
>0 lelong 1 tape header,
|
||||
>0 lelong 2 beginning of file record,
|
||||
>0 lelong 3 map of inodes on tape,
|
||||
>0 lelong 4 continuation of file record,
|
||||
>0 lelong 5 end of volume,
|
||||
>0 lelong 6 map of inodes deleted,
|
||||
>0 lelong 7 end of medium (for floppy),
|
||||
0 name ufs2-dump-be
|
||||
>896 beqdate x Previous dump %s,
|
||||
>904 beqdate x This dump %s,
|
||||
>12 belong >0 Volume %d,
|
||||
>692 belong 0 Level zero, type:
|
||||
>692 belong >0 Level %d, type:
|
||||
>0 belong 1 tape header,
|
||||
>0 belong 2 beginning of file record,
|
||||
>0 belong 3 map of inodes on tape,
|
||||
>0 belong 4 continuation of file record,
|
||||
>0 belong 5 end of volume,
|
||||
>0 belong 6 map of inodes deleted,
|
||||
>0 belong 7 end of medium (for floppy),
|
||||
>676 string >\0 Label %s,
|
||||
>696 string >\0 Filesystem %s,
|
||||
>760 string >\0 Device %s,
|
||||
>824 string >\0 Host %s,
|
||||
>888 lelong >0 Flags %x
|
||||
>888 belong >0 Flags %x
|
||||
|
||||
24 lelong 60011 old-fs dump file (little endian),
|
||||
#>4 ledate x Previous dump %s,
|
||||
#>8 ledate x This dump %s,
|
||||
>12 lelong >0 Volume %ld,
|
||||
>692 lelong 0 Level zero, type:
|
||||
>692 lelong >0 Level %d, type:
|
||||
>0 lelong 1 tape header,
|
||||
>0 lelong 2 beginning of file record,
|
||||
>0 lelong 3 map of inodes on tape,
|
||||
>0 lelong 4 continuation of file record,
|
||||
>0 lelong 5 end of volume,
|
||||
>0 lelong 6 map of inodes deleted,
|
||||
>0 lelong 7 end of medium (for floppy),
|
||||
>676 string >\0 Label %s,
|
||||
>696 string >\0 Filesystem %s,
|
||||
>760 string >\0 Device %s,
|
||||
>824 string >\0 Host %s,
|
||||
>888 lelong >0 Flags %x
|
||||
24 belong 60012 new-fs dump file (big endian),
|
||||
>0 use new-dump-be
|
||||
|
||||
24 belong 60011 old-fs dump file (big endian),
|
||||
>0 use old-dump-be
|
||||
|
||||
24 lelong 60012 new-fs dump file (little endian),
|
||||
>0 use \^new-dump-be
|
||||
|
||||
24 lelong 60011 old-fs dump file (little endian),
|
||||
>0 use \^old-dump-be
|
||||
|
||||
|
||||
24 belong 0x19540119 new-fs dump file (ufs2, big endian),
|
||||
>0 use ufs2-dump-be
|
||||
|
||||
24 lelong 0x19540119 new-fs dump file (ufs2, little endian),
|
||||
>0 use \^ufs2-dump-be
|
||||
|
||||
18 leshort 60011 old-fs dump file (16-bit, assuming PDP-11 endianness),
|
||||
>2 medate x Previous dump %s,
|
||||
>6 medate x This dump %s,
|
||||
>10 leshort >0 Volume %ld,
|
||||
>10 leshort >0 Volume %d,
|
||||
>0 leshort 1 tape header.
|
||||
>0 leshort 2 beginning of file record.
|
||||
>0 leshort 3 map of inodes on tape.
|
||||
@ -92,41 +92,3 @@
|
||||
>0 leshort 5 end of volume.
|
||||
>0 leshort 6 map of inodes deleted.
|
||||
>0 leshort 7 end of medium (for floppy).
|
||||
|
||||
24 belong 0x19540119 new-fs dump file (ufs2, big endian),
|
||||
>896 beqdate x Previous dump %s,
|
||||
>904 beqdate x This dump %s,
|
||||
>12 belong >0 Volume %ld,
|
||||
>692 belong 0 Level zero, type:
|
||||
>692 belong >0 Level %d, type:
|
||||
>0 belong 1 tape header,
|
||||
>0 belong 2 beginning of file record,
|
||||
>0 belong 3 map of inodes on tape,
|
||||
>0 belong 4 continuation of file record,
|
||||
>0 belong 5 end of volume,
|
||||
>0 belong 6 map of inodes deleted,
|
||||
>0 belong 7 end of medium (for floppy),
|
||||
>676 string >\0 Label %s,
|
||||
>696 string >\0 Filesystem %s,
|
||||
>760 string >\0 Device %s,
|
||||
>824 string >\0 Host %s,
|
||||
>888 belong >0 Flags %x
|
||||
|
||||
24 lelong 0x19540119 new-fs dump file (ufs2, little endian),
|
||||
>896 leqdate x This dump %s,
|
||||
>904 leqdate x Previous dump %s,
|
||||
>12 lelong >0 Volume %ld,
|
||||
>692 lelong 0 Level zero, type:
|
||||
>692 lelong >0 Level %d, type:
|
||||
>0 lelong 1 tape header,
|
||||
>0 lelong 2 beginning of file record,
|
||||
>0 lelong 3 map of inodes on tape,
|
||||
>0 lelong 4 continuation of file record,
|
||||
>0 lelong 5 end of volume,
|
||||
>0 lelong 6 map of inodes deleted,
|
||||
>0 lelong 7 end of medium (for floppy),
|
||||
>676 string >\0 Label %s,
|
||||
>696 string >\0 Filesystem %s,
|
||||
>760 string >\0 Device %s,
|
||||
>824 string >\0 Host %s,
|
||||
>888 lelong >0 Flags %x
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user