Upgrade to file-4.09.

CVS patchset: 7388
CVS date: 2004/08/03 20:16:18
This commit is contained in:
jbj 2004-08-03 20:16:18 +00:00
parent 2b86cac35f
commit 311c1c7274
133 changed files with 34162 additions and 5044 deletions

View File

@ -1,20 +1 @@
Makefile
Makefile.in
aclocal.m4
autom4te*
config.cache
config.guess
config.h
config.h.in
config.log
config.status
config.sub
configure
depcomp
install-sh
libtool
ltconfig
ltmain.sh
missing
stamp-h*
file-*.tar.gz
autom4te.cache

View File

@ -1,47 +0,0 @@
-I. -I../zlib -DHAVE_CONFIG_H -DSTDC -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGFILE_SOURCE -D__STDC__=1 -DHAVE_STRUCT_STAT_ST_RDEV -DSIZEOF_UINT64_T=8
#+partial
+forcehints
-warnunixlib
-warnposix
+unixlib
-unrecogcomments # XXX ignore doxygen markings
+strict # lclint level
# --- in progress
+bounds
-fielduse
-exportfcn
-exportheader # 50
-exporttype
# --- not-yet at strict level
-bitwisesigned # 86
-elseifcomplete # 2
-forblock # 6
-ifblock # 231
-incondefs # 64
-namechecks # tedious ANSI compliance checks
-ptrarith # tedious
-mustdefine # 25
-shiftimplementation # 148 ctype.h
-strictops # 37
-whileblock # 16
# --- not-yet at checks level
-mustfree # 26
-usedef # 31
# --- not-yet at standard level
+boolint # 38
+charint # 147
+ignorequals # 49
+matchanyintegral # 77

149
file/ChangeLog Normal file
View File

@ -0,0 +1,149 @@
2004-04-06 20:36 Christos Zoulas <christos@zoulas.com>
* detect present of mbstate_t Petter Reinholdtsen <pere@hungry.com>
* magic fixes
2004-03-22 15:25 Christos Zoulas <christos@zoulas.com>
* Lots of mime fixes
(Joerg Ostertag) <ostertag@rechengilde.de>
* FreeBSD ELF version handling
(Edwin Groothuis) <edwin@mavetju.org>
* correct cleanup in all cases; don't just close the file.
(Christos Zoulas) <christos@zoulas.com>
* add gettext message catalogue support
(Michael Piefel) <piefel@debian.org>
* better printout for unreadable files
(Michael Piefel) <piefel@debian.org>
* compensate for missing MAXPATHLEN
(Michael Piefel) <piefel@debian.org>
* add wide character string length computation
(Michael Piefel) <piefel@debian.org>
* Avoid infinite loops caused by bad elf alignments
or name and description note sizes. Reported by
(Mikael Magnusson) <mmikael@comhem.se>
2004-03-09 13:55 Christos Zoulas <christos@zoulas.com>
* Fix possible memory leak on error and add missing regfree
(Dmitry V. Levin) <ldv@altlinux.org>
2003-12-23 12:12 Christos Zoulas <christos@zoulas.com>
* fix -k flag (Maciej W. Rozycki)
2003-11-18 14:10 Christos Zoulas <christos@zoulas.com>
* Try to give us much info as possible on corrupt elf files.
(Willy Tarreau) <willy@w.ods.org>
* Updated python bindings (Brett Funderburg)
<brettf@deepfile.com>
2003-11-11 15:03 Christos Zoulas <christos@zoulas.com>
* Include file.h first, because it includes config.h
breaks largefile test macros otherwise.
(Paul Eggert <eggert@CS.UCLA.EDU> via
Lars Hecking <lhecking@nmrc.ie>)
2003-10-14 21:39 Christos Zoulas <christos@zoulas.com>
* Python bindings (Brett Funderburg) <brettf@deepfile.com>
* Don't lookup past the end of the buffer
(Chad Hanson) <chanson@tcs-sec.com>
* Add MAGIC_ERROR and api on magic_errno()
2003-10-08 12:40 Christos Zoulas <christos@zoulas.com>
* handle error conditions from compile as fatal
(Antti Kantee) <pooka@netbsd.org>
* handle magic filename parsing sanely
* more magic fixes.
* fix a memory leak (Illes Marton) <illes.marton@balabit.hu>
* describe magic file handling
(Bryan Henderson) <bryanh@giraffe-data.com>
2003-09-12 15:09 Christos Zoulas <christos@zoulas.com>
* update magic files.
* remove largefile support from file.h; it breaks things on most OS's
2003-08-10 10:25 Christos Zoulas <christos@zoulas.com>
* fix unmapping'ing of mmaped files.
2003-07-10 12:03 Christos Zoulas <christos@zoulas.com>
* don't exit with -1 on error; always exit 1 (Marty Leisner)
* restore utimes code.
2003-06-10 17:03 Christos Zoulas <christos@zoulas.com>
* make sure we don't access uninitialized memory.
* pass lint
* #ifdef __cplusplus in magic.h
2003-05-25 19:23 Christos Zoulas <christos@zoulas.com>
* rename cvs magic file to revision to deal with
case insensitive filesystems.
2003-05-23 17:03 Christos Zoulas <christos@zoulas.com>
* documentation fixes from Michael Piefel <piefel@debian.org>
* magic fixes (various)
* revert basename magic in .mgc name determination
* buffer protection in uncompress,
signness issues,
close files
Maciej W. Rozycki <macro@ds2.pg.gda.pl
2003-04-21 20:12 Christos Zoulas <christos@zoulas.com>
* fix zsh magic
2003-04-04 16:59 Christos Zoulas <christos@zoulas.com>
* fix operand sort order in string.
2003-04-02 17:30 Christos Zoulas <christos@zoulas.com>
* cleanup namespace in magic.h
2003-04-02 13:50 Christos Zoulas <christos@zoulas.com>
* Magic additions (Alex Ott)
* Fix bug that broke VPATH compilation (Peter Breitenlohner)
2003-03-28 16:03 Christos Zoulas <christos@zoulas.com>
* remove packed attribute from magic struct.
* make the magic struct properly aligned.
* bump version number of compiled files to 2.
2003-03-27 13:10 Christos Zoulas <christos@zoulas.com>
* separate tar detection and run it before softmagic.
* fix reversed symlink test.
* fix version printing.
* make separator a string instead of a char.
* update manual page and sort options.
2003-03-26 11:00 Christos Zoulas <christos@zoulas.com>
* Pass lint
* make NULL in magic_file mean stdin
* Fix "-" argument to file to pass NULL to magic_file
* avoid pointer casts by using memcpy
* rename magic_buf -> magic_buffer
* keep only the first error
* manual page: new sentence, new line
* fix typo in api function (magic_buf -> magic_buffer)

View File

@ -1,7 +1,7 @@
Id: LEGAL.NOTICE,v 1.11 1999/01/14 16:30:12 christos Exp
$Id: LEGAL.NOTICE,v 1.13 2003/03/23 22:23:30 christos Exp $
Copyright (c) Ian F. Darwin 1986, 1987, 1989, 1990, 1991, 1992, 1994, 1995.
Software written by Ian F. Darwin and others;
maintained 1994-1999 Christos Zoulas.
maintained 1994-2003 Christos Zoulas.
This software is not subject to any export provision of the United States
Department of Commerce, and may be exported to any country or planet.

View File

@ -1,4 +1,4 @@
Id: MAINT,v 1.4 2000/04/11 02:43:51 christos Exp
$Id: MAINT,v 1.5 2003/03/23 04:36:37 christos Exp $
Maintenance notes:

View File

@ -1,3 +1,6 @@
EXTRA_DIST = LEGAL.NOTICE MAINT Makefile.std
# don't enforce GNU packaging standards
AUTOMAKE_OPTIONS = foreign no-dependencies
EXTRA_DIST = LEGAL.NOTICE MAINT PORTING
SUBDIRS = src magic doc

548
file/Makefile.in Normal file
View File

@ -0,0 +1,548 @@
# Makefile.in generated by automake 1.7.9 from Makefile.am.
# @configure_input@
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
# 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@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = .
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
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 = :
host_triplet = @host@
ACLOCAL = @ACLOCAL@
AMDEP_FALSE = @AMDEP_FALSE@
AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FSECT5_FALSE = @FSECT5_FALSE@
FSECT5_TRUE = @FSECT5_TRUE@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
MAKEINFO = @MAKEINFO@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
RANLIB = @RANLIB@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
ac_ct_CC = @ac_ct_CC@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
datadir = @datadir@
exec_prefix = @exec_prefix@
fsect = @fsect@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localstatedir = @localstatedir@
mandir = @mandir@
oldincludedir = @oldincludedir@
prefix = @prefix@
program_transform_name = @program_transform_name@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
# don't enforce GNU packaging standards
AUTOMAKE_OPTIONS = foreign no-dependencies
EXTRA_DIST = LEGAL.NOTICE MAINT PORTING
SUBDIRS = src magic doc
subdir = .
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = config.h
CONFIG_CLEAN_FILES =
depcomp =
am__depfiles_maybe =
DIST_SOURCES =
RECURSIVE_TARGETS = info-recursive dvi-recursive pdf-recursive \
ps-recursive install-info-recursive uninstall-info-recursive \
all-recursive install-data-recursive install-exec-recursive \
installdirs-recursive install-recursive uninstall-recursive \
check-recursive installcheck-recursive
DIST_COMMON = README $(srcdir)/Makefile.in $(srcdir)/configure \
ChangeLog Makefile.am acconfig.h acinclude.m4 aclocal.m4 \
config.guess config.h.in config.sub configure configure.in \
depcomp install-sh ltcf-c.sh ltconfig ltmain.sh missing \
mkinstalldirs
DIST_SUBDIRS = $(SUBDIRS)
all: config.h
$(MAKE) $(AM_MAKEFLAGS) all-recursive
.SUFFIXES:
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
configure.lineno
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
cd $(top_srcdir) && \
$(AUTOMAKE) --foreign Makefile
Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in $(top_builddir)/config.status
cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)
$(top_builddir)/config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
$(SHELL) ./config.status --recheck
$(srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
cd $(srcdir) && $(AUTOCONF)
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ configure.in acinclude.m4
cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
config.h: stamp-h1
@if test ! -f $@; then \
rm -f stamp-h1; \
$(MAKE) stamp-h1; \
else :; fi
stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
@rm -f stamp-h1
cd $(top_builddir) && $(SHELL) ./config.status config.h
$(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(top_srcdir)/configure.in $(ACLOCAL_M4) $(top_srcdir)/acconfig.h
cd $(top_srcdir) && $(AUTOHEADER)
touch $(srcdir)/config.h.in
distclean-hdr:
-rm -f config.h stamp-h1
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
distclean-libtool:
-rm -f libtool
uninstall-info-am:
# This directory's subdirectories are mostly independent; you can cd
# into them and run `make' without going through this Makefile.
# To change the values of `make' variables: instead of editing Makefiles,
# (1) if the variable is set in `config.status', edit `config.status'
# (which will cause the Makefiles to be regenerated when you run `make');
# (2) otherwise, pass the desired values on the `make' command line.
$(RECURSIVE_TARGETS):
@set fnord $$MAKEFLAGS; amf=$$2; \
dot_seen=no; \
target=`echo $@ | sed s/-recursive//`; \
list='$(SUBDIRS)'; for subdir in $$list; do \
echo "Making $$target in $$subdir"; \
if test "$$subdir" = "."; then \
dot_seen=yes; \
local_target="$$target-am"; \
else \
local_target="$$target"; \
fi; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
done; \
if test "$$dot_seen" = "no"; then \
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
fi; test -z "$$fail"
mostlyclean-recursive clean-recursive distclean-recursive \
maintainer-clean-recursive:
@set fnord $$MAKEFLAGS; amf=$$2; \
dot_seen=no; \
case "$@" in \
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
*) list='$(SUBDIRS)' ;; \
esac; \
rev=''; for subdir in $$list; do \
if test "$$subdir" = "."; then :; else \
rev="$$subdir $$rev"; \
fi; \
done; \
rev="$$rev ."; \
target=`echo $@ | sed s/-recursive//`; \
for subdir in $$rev; do \
echo "Making $$target in $$subdir"; \
if test "$$subdir" = "."; then \
local_target="$$target-am"; \
else \
local_target="$$target"; \
fi; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
done && test -z "$$fail"
tags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
done
ctags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
done
ETAGS = etags
ETAGSFLAGS =
CTAGS = ctags
CTAGSFLAGS =
tags: TAGS
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
mkid -fID $$unique
TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
if (etags --etags-include --version) >/dev/null 2>&1; then \
include_option=--etags-include; \
else \
include_option=--include; \
fi; \
list='$(SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
test -f $$subdir/TAGS && \
tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
fi; \
done; \
list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
test -z "$(ETAGS_ARGS)$$tags$$unique" \
|| $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$tags $$unique
ctags: CTAGS
CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$tags $$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& cd $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) $$here
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
top_distdir = .
distdir = $(PACKAGE)-$(VERSION)
am__remove_distdir = \
{ test ! -d $(distdir) \
|| { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \
&& rm -fr $(distdir); }; }
GZIP_ENV = --best
distuninstallcheck_listfiles = find . -type f -print
distcleancheck_listfiles = find . -type f -print
distdir: $(DISTFILES)
$(am__remove_distdir)
mkdir $(distdir)
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
list='$(DISTFILES)'; for file in $$list; do \
case $$file in \
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
esac; \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
dir="/$$dir"; \
$(mkinstalldirs) "$(distdir)$$dir"; \
else \
dir=''; \
fi; \
if test -d $$d/$$file; then \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
fi; \
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
else \
test -f $(distdir)/$$file \
|| cp -p $$d/$$file $(distdir)/$$file \
|| exit 1; \
fi; \
done
list='$(SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
test -d $(distdir)/$$subdir \
|| mkdir $(distdir)/$$subdir \
|| exit 1; \
(cd $$subdir && \
$(MAKE) $(AM_MAKEFLAGS) \
top_distdir="$(top_distdir)" \
distdir=../$(distdir)/$$subdir \
distdir) \
|| exit 1; \
fi; \
done
-find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
! -type d ! -perm -400 -exec chmod a+r {} \; -o \
! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \
|| chmod -R a+r $(distdir)
dist-gzip: distdir
$(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
$(am__remove_distdir)
dist dist-all: distdir
$(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
$(am__remove_distdir)
# This target untars the dist file and tries a VPATH configuration. Then
# it guarantees that the distribution is self-contained by making another
# tarfile.
distcheck: dist
$(am__remove_distdir)
GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(AMTAR) xf -
chmod -R a-w $(distdir); chmod a+w $(distdir)
mkdir $(distdir)/_build
mkdir $(distdir)/_inst
chmod a-w $(distdir)
dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
&& dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
&& cd $(distdir)/_build \
&& ../configure --srcdir=.. --prefix="$$dc_install_base" \
$(DISTCHECK_CONFIGURE_FLAGS) \
&& $(MAKE) $(AM_MAKEFLAGS) \
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
&& $(MAKE) $(AM_MAKEFLAGS) check \
&& $(MAKE) $(AM_MAKEFLAGS) install \
&& $(MAKE) $(AM_MAKEFLAGS) installcheck \
&& $(MAKE) $(AM_MAKEFLAGS) uninstall \
&& $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
distuninstallcheck \
&& chmod -R a-w "$$dc_install_base" \
&& ({ \
(cd ../.. && $(mkinstalldirs) "$$dc_destdir") \
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
} || { rm -rf "$$dc_destdir"; exit 1; }) \
&& rm -rf "$$dc_destdir" \
&& $(MAKE) $(AM_MAKEFLAGS) dist-gzip \
&& rm -f $(distdir).tar.gz \
&& $(MAKE) $(AM_MAKEFLAGS) distcleancheck
$(am__remove_distdir)
@echo "$(distdir).tar.gz is ready for distribution" | \
sed 'h;s/./=/g;p;x;p;x'
distuninstallcheck:
@cd $(distuninstallcheck_dir) \
&& test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
|| { echo "ERROR: files left after uninstall:" ; \
if test -n "$(DESTDIR)"; then \
echo " (check DESTDIR support)"; \
fi ; \
$(distuninstallcheck_listfiles) ; \
exit 1; } >&2
distcleancheck: distclean
@if test '$(srcdir)' = . ; then \
echo "ERROR: distcleancheck can only run from a VPATH build" ; \
exit 1 ; \
fi
@test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
|| { echo "ERROR: files left in build directory after distclean:" ; \
$(distcleancheck_listfiles) ; \
exit 1; } >&2
check-am: all-am
check: check-recursive
all-am: Makefile config.h
installdirs: installdirs-recursive
installdirs-am:
install: install-recursive
install-exec: install-exec-recursive
install-data: install-data-recursive
uninstall: uninstall-recursive
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-recursive
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
distclean-generic:
-rm -f $(CONFIG_CLEAN_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-recursive
clean-am: clean-generic clean-libtool mostlyclean-am
distclean: distclean-recursive
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
-rm -f Makefile
distclean-am: clean-am distclean-generic distclean-hdr distclean-libtool \
distclean-tags
dvi: dvi-recursive
dvi-am:
info: info-recursive
info-am:
install-data-am:
install-exec-am:
install-info: install-info-recursive
install-man:
installcheck-am:
maintainer-clean: maintainer-clean-recursive
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
-rm -rf $(top_srcdir)/autom4te.cache
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-recursive
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
pdf: pdf-recursive
pdf-am:
ps: ps-recursive
ps-am:
uninstall-am: uninstall-info-am
uninstall-info: uninstall-info-recursive
.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am clean \
clean-generic clean-libtool clean-recursive ctags \
ctags-recursive dist dist-all dist-gzip distcheck distclean \
distclean-generic distclean-hdr distclean-libtool \
distclean-recursive distclean-tags distcleancheck distdir \
distuninstallcheck dvi dvi-am dvi-recursive info info-am \
info-recursive install install-am install-data install-data-am \
install-data-recursive install-exec install-exec-am \
install-exec-recursive install-info install-info-am \
install-info-recursive install-man install-recursive \
install-strip installcheck installcheck-am installdirs \
installdirs-am installdirs-recursive maintainer-clean \
maintainer-clean-generic maintainer-clean-recursive mostlyclean \
mostlyclean-generic mostlyclean-libtool mostlyclean-recursive \
pdf pdf-am pdf-recursive ps ps-am ps-recursive tags \
tags-recursive uninstall uninstall-am uninstall-info-am \
uninstall-info-recursive uninstall-recursive
# 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:

View File

@ -1,167 +0,0 @@
# Makefile for file(1) cmd.
# Copyright (c) Ian F. Darwin 86/09/01 - see LEGAL.NOTICE.
# @(#)Id: Makefile.std,v 1.12 2001/09/03 14:44:21 christos Exp
#
# This software is not subject to any license of the American Telephone
# and Telegraph Company or of the Regents of the University of California.
#
# Permission is granted to anyone to use this software for any purpose on
# any computer system, and to alter it and redistribute it freely, subject
# to the following restrictions:
#
# 1. The author is not responsible for the consequences of use of this
# software, no matter how awful, even if they arise from flaws in it.
#
# 2. The origin of this software must not be misrepresented, either by
# explicit claim or by omission. Since few users ever read sources,
# credits must appear in the documentation.
#
# 3. Altered versions must be plainly marked as such, and must not be
# misrepresented as being the original software. Since few users
# ever read sources, credits must appear in the documentation.
#
# 4. This notice may not be removed or altered.
#
VERSION = 3.37
SHELL = /bin/sh
#MAGIC = /etc/magic
MAGIC = /usr/local/etc/magic
DEFS = -DMAGIC='"$(MAGIC)"' -DBUILTIN_ELF # -Dvoid=int
CC = cc
COPTS = -O -g # newer compilers allow both; else drop -O
# For truly antique environments, use this for (dummy) include files:
COPTS = -O # -Ilocalinc
CFLAGS = $(COPTS) $(DEFS)
LDFLAGS = $(COPTS) # -Bstatic # older gdb couldn't handle shared libs
SHAR = bundle
OFILE = /usr/bin/file # old or distributed version, for comparison
# Where new binary lives; typically /usr/local (BSD), /usr/lbin (USG).
BINDIR = /usr/local/bin
# For installing our man pages;
# MANCxxx is manual section for Commands, MANFxxx is section for file formats.
# MANxDIR is directory names; MANxEXT is the filename extention. Usual values:
# Variable V7 4BSD Sys V
# MANCDIR /usr/man/man1 /usr/man/man1 /usr/man/u_man/man1
# MANFDIR /usr/man/man5 /usr/man/man5 /usr/man/u_man/man4
# MANCEXT 1 1 1
# MANFEXT 5 5 4
# --- possible alternative for 4BSD ---
# MANCDIR /usr/local/man/man1
# MANCEXT 1
# or
# MANCDIR /usr/man/manl
# MANCEXT l
# --- possible alternative for USG ---
# MANCDIR /usr/man/local/man1
# MANCEXT 1
MANCDIR = /usr/local/man/man1
MANCEXT = 1
MANFDIR = /usr/local/man/man4
MANFEXT = 4
# There are no system-dependant configuration options (except maybe CFLAGS).
# Uncomment any of these that is missing from your "standard" library.
LOCALSRCS = # localsrc/getopt.c localsrc/strtol.c \
# localsrc/strtok.c localsrc/strchr.c
LOCALOBJS = # localsrc/getopt.o localsrc/strtol.o \
# localsrc/strtok.o localsrc/strchr.o
# These are not compiled in unless you use -Ilocalinc, but
# are not commented out as "make dist" &c use them.
LOCALINC = # localinc/*.h localinc/sys/*.h
SRCS = file.c apprentice.c fsmagic.c softmagic.c ascmagic.c \
compress.c is_tar.c readelf.c internat.c \
print.c $(LOCALSRCS) $(LOCALINC)
OBJS = file.o apprentice.o fsmagic.o softmagic.o ascmagic.o \
compress.o is_tar.o readelf.o internat.o \
print.o $(LOCALOBJS)
HDRS = file.h names.h patchlevel.h readelf.h tar.h
AUTOSRC=configure configure.in install-sh config.h.in Makefile.in
ALLSRC = LEGAL.NOTICE README MAINT PORTING $(SRCS) $(HDRS) \
Makefile.std file.man magic.man magic2mime $(AUTOSRC) \
Localstuff Header
ALLMAGIC = Magdir/[a-z]*
all: file magic file.${MANCEXT} magic.${MANFEXT}
TESTFILES = * tst/*
try: all $(OFILE)
cd tst; $(MAKE)
time $(OFILE) $(TESTFILES) >/tmp/t1 # can't use ./magic
time ./file -m ./magic $(TESTFILES) >/tmp/t2
-diff -b /tmp/t[12]
what ./file >lastnocore
file: $(OBJS)
$(CC) $(CFLAGS) $(LDFLAGS) $(OBJS) -o $@
lint: $(SRCS)
lint -ha $(DEFS) $(SRCS) | tee $@
magic: Localstuff Header Magdir
cat Header Localstuff Magdir/[a-z] > $@
ascmagic.o: names.h
compress.o apprentice.o ascmagic.o file.o fsmagic.o print.o softmagic.o: file.h
install: file magic
cp file $(BINDIR)/file
cp magic $(MAGIC)
install.man: file.${MANCEXT} magic.${MANFEXT}
cp file.${MANCEXT} $(MANCDIR)/file.$(MANCEXT)
cp magic.${MANFEXT} $(MANFDIR)/magic.$(MANFEXT)
clean:
rm -f *.o core file magic lint dist.* MANIFEST \
magic.${MANFEXT} file.${MANCEXT} \
config.h config.status config.cache config.log
clobber:
cd tst; $(MAKE) clean
magic.${MANFEXT} : Makefile magic.man
@rm -f $@
sed -e s@__CSECTION__@${MANCEXT}@g \
-e s@__FSECTION__@${MANFEXT}@g \
-e s@__VERSION__@${VERSION}@g \
-e s@__MAGIC__@${MAGIC}@g magic.man > $@
file.${MANCEXT} : Makefile file.man
@rm -f $@
sed -e s@__CSECTION__@${MANCEXT}@g \
-e s@__FSECTION__@${MANFEXT}@g \
-e s@__VERSION__@${VERSION}@g \
-e s@__MAGIC__@${MAGIC}@g file.man > $@
send: dist
ftp ftp.cs
dist: dist.src dist.magic
@echo Now check this patchlevel!
ident patchlevel.h
dist.src: $(ALLSRC) MANIFEST
# Some versions of shar can't handle a single file from
# a subdirectory, so we manually insert mkdir as needed.
# The point is to exclude all the generable targets in tst.
(echo mkdir localinc localinc/sys localsrc tst; \
$(SHAR) $(ALLSRC) MANIFEST) > $@
rcsdiff: $(ALLSRC)
rcsdiff -q RCS/*
MANIFEST: $(ALLSRC)
ident $(ALLSRC) > MANIFEST
dist.magic: Magdir
# As above, but to exclude Magdir/RCS from being shipped.
(echo mkdir Magdir; $(SHAR) $(ALLMAGIC)) >$@
tar: $(ALLSRC) $(ALLMAGIC)
-rm -fr file-${VERSION}
-mkdir file-${VERSION} file-${VERSION}/Magdir
ln $(ALLSRC) file-${VERSION}
ln ${ALLMAGIC} file-${VERSION}/Magdir
tar cvf file-${VERSION}.tar file-${VERSION}
-rm -fr file-${VERSION}

View File

@ -1,14 +1,20 @@
** README for file(1) Command **
@(#) Id: README,v 1.25 2001/07/23 21:30:22 christos Exp
@(#) $Id: README,v 1.33 2003/05/23 21:31:56 christos Exp $
This is Release 3.x of Ian Darwin's (copyright but distributable)
This is Release 4.x of Ian Darwin's (copyright but distributable)
file(1) command. This version is the standard "file" command for Linux,
*BSD, and other systems. (See "patchlevel.h" for the exact release number).
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.
UNIX is a trademark of UNIX System Laboratories.
The prime contributor to Release 3.8 was Guy Harris, who put in megachanges
including byte-order independance.
including byte-order independence.
The prime contributor to Release 3.0 was Christos Zoulas, who put
in hundreds of lines of source code changes, including his own
@ -33,7 +39,7 @@ In addition, the /etc/magic file is built from a subdirectory
for easier(?) maintenance. I will act as a clearinghouse for
magic numbers assigned to all sorts of data files that
are in reasonable circulation. Send your magic numbers,
in magic(4) format please, to the maintainer, Christos Zoulas.
in magic(5) format please, to the maintainer, Christos Zoulas.
LEGAL.NOTICE - read this first.
README - read this second (you are currently reading this file).
@ -43,7 +49,7 @@ Makefile - read this next, adapt it as needed (particularly
the man page layouts), type "make" to compile,
"make try" to try it out against your old version.
Expect some diffs, particularly since your original
file(1) may not grok the imbedded-space ("\ ") in
file(1) may not grok the embedded-space ("\ ") in
the current magic file, or may even not use the
magic file.
apprentice.c - parses /etc/magic to learn magic
@ -61,9 +67,8 @@ magdir - directory of /etc/magic pieces
magdir/Makefile - ADJUST THIS FOR YOUR CONFIGURATION
names.h - header file for ascmagic.c
softmagic.c - 2nd set of tests, based on /etc/magic
readelf.[ch] - Standalone elf parsing code.
readelf.[ch] - Stand-alone elf parsing code.
compress.c - on-the-fly decompression.
internat.c - recognize international `text' files.
print.c - print results, errors, warnings.
If your gzip sometimes fails to decompress things complaining about a short
@ -84,11 +89,10 @@ E-mail: christos@astron.com
Phone: Do not even think of telephoning me about this program. Send cash first!
Parts of this software were developed at SoftQuad Inc., 56 Aberfoyle
Cres, # 810, Toronto, Ontario CANADA M8X 2W4. Phone: 416-239-4801 or
800-387-2777. Email: mail@sq.com. Call for information on SGML editing
and browsing, Unix text processing, and customised products on Unix,
DOS and Mac.
Parts of this software were developed at SoftQuad Inc., developers
of SGML/HTML/XML publishing software, in Toronto, Canada.
SoftQuad was swallowed up by Corel in 2002
and does not exist any longer.
From: Kees Zeelenberg

60
file/acconfig.h Normal file
View File

@ -0,0 +1,60 @@
/* Autoheader needs me */
#undef PACKAGE
/* Autoheader needs me */
#undef VERSION
/* Define if builtin ELF support is enabled. */
#undef BUILTIN_ELF
/* Define if ELF core file support is enabled. */
#undef ELFCORE
/* Define if the `long long' type works. */
#undef HAVE_LONG_LONG
/* Define if we have "tm_zone" in "struct tm". */
#undef HAVE_TM_ZONE
/* Define if we have a global "char * []" "tzname" variable. */
#undef HAVE_TZNAME
/* Define if we have "tm_isdst" in "struct tm". */
#undef HAVE_TM_ISDST
/* Define if we have a global "int" variable "daylight". */
#undef HAVE_DAYLIGHT
/* Define if we have a mkstemp */
#undef HAVE_MKSTEMP
/* Define to `unsigned char' if standard headers don't define. */
#undef uint8_t
/* Define to `unsigned short' if standard headers don't define. */
#undef uint16_t
/* Define to `unsigned int' if standard headers don't define. */
#undef uint32_t
/* Define to `unsigned long long', if available, or `unsigned long', if
standard headers don't define. */
#undef uint64_t
/* Define to `int' if standard headers don't define. */
#undef int32_t
/* FIXME: These have to be added manually because autoheader doesn't know
about AC_CHECK_SIZEOF_INCLUDES. */
/* The number of bytes in a uint8_t. */
#define SIZEOF_UINT8_T 0
/* The number of bytes in a uint16_t. */
#define SIZEOF_UINT16_T 0
/* The number of bytes in a uint32_t. */
#define SIZEOF_UINT32_T 0
/* The number of bytes in a uint64_t. */
#define SIZEOF_UINT64_T 0

View File

@ -10,7 +10,7 @@ exit(sizeof(long long) < sizeof(long)); }],
ac_cv_c_long_long=yes, ac_cv_c_long_long=no)
fi])
if test $ac_cv_c_long_long = yes; then
AC_DEFINE(HAVE_LONG_LONG,1,[Define if the `long long' type works.])
AC_DEFINE(HAVE_LONG_LONG)
fi
])
@ -43,7 +43,7 @@ AC_CACHE_CHECK([for tm_isdst in struct tm], ac_cv_struct_tm_isdst,
#include <$ac_cv_struct_tm>], [struct tm tm; tm.tm_isdst;],
ac_cv_struct_tm_isdst=yes, ac_cv_struct_tm_isdst=no)])
if test "$ac_cv_struct_tm_isdst" = yes; then
AC_DEFINE(HAVE_TM_ISDST,1,[Define if we have "tm_isdst" in "struct tm".])
AC_DEFINE(HAVE_TM_ISDST)
fi
AC_CACHE_CHECK(for daylight, ac_cv_var_daylight,
[AC_TRY_LINK(
@ -55,7 +55,7 @@ extern int daylight;
changequote([, ])dnl
[atoi(daylight);], ac_cv_var_daylight=yes, ac_cv_var_daylight=no)])
if test $ac_cv_var_daylight = yes; then
AC_DEFINE(HAVE_DAYLIGHT,1,[Define if we have a global "int" variable "daylight".])
AC_DEFINE(HAVE_DAYLIGHT)
fi
])
@ -88,7 +88,7 @@ if eval "test \"`echo '$ac_cv_type_'$1`\" = yes"; then
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
AC_DEFINE_UNQUOTED($1, $2, $1)
AC_DEFINE_UNQUOTED($1, $2)
fi
])
@ -111,7 +111,7 @@ main()
exit(0);
}], AC_CV_NAME=`cat conftestval`, AC_CV_NAME=0, ifelse([$2], , , AC_CV_NAME=$2))])dnl
AC_MSG_RESULT($AC_CV_NAME)
AC_DEFINE_UNQUOTED(AC_TYPE_NAME, $AC_CV_NAME, AC_TYPE_NAME)
AC_DEFINE_UNQUOTED(AC_TYPE_NAME, $AC_CV_NAME)
undefine([AC_TYPE_NAME])dnl
undefine([AC_CV_NAME])dnl
])
@ -150,7 +150,7 @@ AC_CACHE_VAL(ac_cv_type_$1,
#endif], ac_cv_type_$1=yes, ac_cv_type_$1=no)])dnl
AC_MSG_RESULT($ac_cv_type_$1)
if test $ac_cv_type_$1 = no; then
AC_DEFINE($1, $2, $1)
AC_DEFINE($1, $2)
fi
])
@ -204,7 +204,8 @@ AC_DEFUN([AC_SYS_LARGEFILE],
[ --disable-largefile omit support for large files])
if test "$enable_largefile" != no; then
AC_CACHE_CHECK([for special C compiler options needed for large files],
AC_CACHE_CHECK([for special C compiler options needed for large files=
],
ac_cv_sys_largefile_CC,
[ac_cv_sys_largefile_CC=no
if test "$GCC" != yes; then
@ -251,3 +252,33 @@ AC_DEFUN([AC_FUNC_FSEEKO],
[Define if fseeko (and presumably ftello) exists and is declared.])
fi])
# serial 9
# From Paul Eggert.
# BeOS 5 has <wchar.h> but does not define mbstate_t,
# so you can't declare an object of that type.
# Check for this incompatibility with Standard C.
# Include stdlib.h first, because otherwise this test would fail on Linux
# (at least glibc-2.1.3) because the "_XOPEN_SOURCE 500" definition elicits
# a syntax error in wchar.h due to the use of undefined __int32_t.
AC_DEFUN([AC_MBSTATE_T],
[
AC_CHECK_HEADERS(stdlib.h)
AC_CACHE_CHECK([for mbstate_t], ac_cv_type_mbstate_t,
[AC_TRY_COMPILE([
#if HAVE_STDLIB_H
# include <stdlib.h>
#endif
#include <wchar.h>],
[mbstate_t x; return sizeof x;],
ac_cv_type_mbstate_t=yes,
ac_cv_type_mbstate_t=no)])
if test $ac_cv_type_mbstate_t = no; then
AC_DEFINE(mbstate_t, int,
[Define to a type if <wchar.h> does not define.])
fi])

2017
file/aclocal.m4 vendored Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1,44 +0,0 @@
#!/bin/sh
export CFLAGS
export LDFLAGS
LTV="libtoolize (GNU libtool) 1.5.6"
ACV="autoconf (GNU Autoconf) 2.59"
AMV="automake (GNU automake) 1.9"
USAGE="
This script documents the versions of the tools I'm using to build rpm:
libtool-1.5.6
autoconf-2.59
automake-1.9
Simply edit this script to change the libtool/autoconf/automake versions
checked if you need to, as rpm should build (and has built) with all
recent versions of libtool/autoconf/automake.
"
[ "`libtoolize --version | head -1`" != "$LTV" ] && echo "$USAGE" && exit 1
[ "`autoconf --version | head -1`" != "$ACV" ] && echo "$USAGE" && exit 1
[ "`automake --version | head -1 | sed -e 's/1\.4[a-z]/1.4/'`" != "$AMV" ] && echo "$USAGE" && exit 1
libtoolize --copy --force
aclocal
autoheader
automake -a -c
autoconf
if [ "$1" = "--noconfigure" ]; then
exit 0;
fi
if [ X"$@" = X -a "X`uname -s`" = "XLinux" ]; then
if [ -d /usr/share/man ]; then
mandir=/usr/share/man
infodir=/usr/share/info
else
mandir=/usr/man
infodir=/usr/info
fi
./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --infodir=${infodir} --mandir=${mandir} --enable-static "$@"
else
./configure "$@"
fi

1351
file/config.guess vendored Executable file

File diff suppressed because it is too large Load Diff

202
file/config.h.in Normal file
View File

@ -0,0 +1,202 @@
/* config.h.in. Generated from configure.in by autoheader. */
/* Autoheader needs me */
#undef PACKAGE
/* Autoheader needs me */
#undef VERSION
/* Define if builtin ELF support is enabled. */
#undef BUILTIN_ELF
/* Define if ELF core file support is enabled. */
#undef ELFCORE
/* Define if the `long long' type works. */
#undef HAVE_LONG_LONG
/* Define if we have "tm_zone" in "struct tm". */
#undef HAVE_TM_ZONE
/* Define if we have a global "char * []" "tzname" variable. */
#undef HAVE_TZNAME
/* Define if we have "tm_isdst" in "struct tm". */
#undef HAVE_TM_ISDST
/* Define if we have a global "int" variable "daylight". */
#undef HAVE_DAYLIGHT
/* Define if we have a mkstemp */
#undef HAVE_MKSTEMP
/* Define to `unsigned char' if standard headers don't define. */
#undef uint8_t
/* Define to `unsigned short' if standard headers don't define. */
#undef uint16_t
/* Define to `unsigned int' if standard headers don't define. */
#undef uint32_t
/* Define to `unsigned long long', if available, or `unsigned long', if
standard headers don't define. */
#undef uint64_t
/* Define to `int' if standard headers don't define. */
#undef int32_t
/* FIXME: These have to be added manually because autoheader doesn't know
about AC_CHECK_SIZEOF_INCLUDES. */
/* The number of bytes in a uint8_t. */
#define SIZEOF_UINT8_T 0
/* The number of bytes in a uint16_t. */
#define SIZEOF_UINT16_T 0
/* The number of bytes in a uint32_t. */
#define SIZEOF_UINT32_T 0
/* The number of bytes in a uint64_t. */
#define SIZEOF_UINT64_T 0
/* Define to 1 if you have the <fcntl.h> header file. */
#undef HAVE_FCNTL_H
/* Define to 1 if you have the <getopt.h> header file. */
#undef HAVE_GETOPT_H
/* Define to 1 if you have the `getopt_long' function. */
#undef HAVE_GETOPT_LONG
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
/* Define to 1 if you have the `z' library (-lz). */
#undef HAVE_LIBZ
/* Define to 1 if you have the <locale.h> header file. */
#undef HAVE_LOCALE_H
/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H
/* Define to 1 if you have the `mkstemp' function. */
#undef HAVE_MKSTEMP
/* Define to 1 if you have the `mmap' function. */
#undef HAVE_MMAP
/* Define to 1 if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H
/* Define to 1 if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H
/* Define to 1 if you have the `strerror' function. */
#undef HAVE_STRERROR
/* Define to 1 if you have the <strings.h> header file. */
#undef HAVE_STRINGS_H
/* Define to 1 if you have the <string.h> header file. */
#undef HAVE_STRING_H
/* Define to 1 if you have the `strtoul' function. */
#undef HAVE_STRTOUL
/* Define to 1 if `st_rdev' is member of `struct stat'. */
#undef HAVE_STRUCT_STAT_ST_RDEV
/* Define to 1 if your `struct stat' has `st_rdev'. Deprecated, use
`HAVE_STRUCT_STAT_ST_RDEV' instead. */
#undef HAVE_ST_RDEV
/* 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/stat.h> header file. */
#undef HAVE_SYS_STAT_H
/* Define to 1 if you have the <sys/types.h> header file. */
#undef HAVE_SYS_TYPES_H
/* Define to 1 if you have the <sys/utime.h> header file. */
#undef HAVE_SYS_UTIME_H
/* Define to 1 if you have <sys/wait.h> that is POSIX.1 compatible. */
#undef HAVE_SYS_WAIT_H
/* HAVE_TM_ZONE */
#undef HAVE_TM_ZONE
/* HAVE_TZNAME */
#undef HAVE_TZNAME
/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
/* Define to 1 if you have the `utime' function. */
#undef HAVE_UTIME
/* Define to 1 if you have the `utimes' function. */
#undef HAVE_UTIMES
/* Define to 1 if you have the <utime.h> header file. */
#undef HAVE_UTIME_H
/* Define to 1 if you have the <wchar.h> header file. */
#undef HAVE_WCHAR_H
/* Define to 1 if `major', `minor', and `makedev' are declared in <mkdev.h>.
*/
#undef MAJOR_IN_MKDEV
/* Define to 1 if `major', `minor', and `makedev' are declared in
<sysmacros.h>. */
#undef MAJOR_IN_SYSMACROS
/* Name of package */
#undef PACKAGE
/* Define to the address where bug reports for this package should be sent. */
#undef PACKAGE_BUGREPORT
/* Define to the full name of this package. */
#undef PACKAGE_NAME
/* Define to the full name and version of this package. */
#undef PACKAGE_STRING
/* Define to the one symbol short name of this package. */
#undef PACKAGE_TARNAME
/* Define to the version of this package. */
#undef PACKAGE_VERSION
/* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS
/* Define to 1 if your <sys/time.h> declares `struct tm'. */
#undef TM_IN_SYS_TIME
/* Version number of package */
#undef VERSION
/* Number of bits in a file offset, on hosts where this is settable. */
#undef _FILE_OFFSET_BITS
/* Define for large files, on AIX-style hosts. */
#undef _LARGE_FILES
/* Define to empty if `const' does not conform to ANSI C. */
#undef const
/* Define to a type if <wchar.h> does not define. */
#undef mbstate_t
/* Define to `long' if <sys/types.h> does not define. */
#undef off_t
/* Define to `unsigned' if <sys/types.h> does not define. */
#undef size_t

1460
file/config.sub vendored Executable file

File diff suppressed because it is too large Load Diff

9302
file/configure vendored Executable file

File diff suppressed because it is too large Load Diff

View File

@ -1,41 +1,35 @@
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.59)
AC_INIT([file],[4.02])
AC_CANONICAL_TARGET
AC_CONFIG_HEADERS([config.h])
AM_INIT_AUTOMAKE([foreign])
dnl Process this file with autoconf to produce a configure script.
AC_INIT(src/file.c)
AM_INIT_AUTOMAKE(file, 4.09)
AM_CONFIG_HEADER(config.h)
AM_MAINTAINER_MODE
AC_MSG_CHECKING(for builtin ELF support)
AC_ARG_ENABLE(elf,
[ --disable-elf disable builtin ELF support],
AH_TEMPLATE([BUILTIN_ELF], [Define if builtin ELF support is enabled.])
[if test "${enableval}" = yes; then
AC_MSG_RESULT(yes)
AC_DEFINE([BUILTIN_ELF],1)
AC_DEFINE(BUILTIN_ELF)
else
AC_MSG_RESULT(no)
fi], [
# enable by default
AC_MSG_RESULT(yes)
AC_DEFINE([BUILTIN_ELF], 1)
AC_DEFINE(BUILTIN_ELF)
])
AC_MSG_CHECKING(for ELF core file support)
AC_ARG_ENABLE(elf-core,
[ --disable-elf-core disable ELF core file support],
AH_TEMPLATE([ELFCORE], [Define if ELF core file support is enabled.])
[if test "${enableval}" = yes; then
AC_MSG_RESULT(yes)
AC_DEFINE([ELFCORE], 1)
AC_DEFINE(ELFCORE)
else
AC_MSG_RESULT(no)
fi], [
# enable by default
AC_MSG_RESULT(yes)
AC_DEFINE([ELFCORE], 1)
AC_DEFINE(ELFCORE)
])
AC_MSG_CHECKING(for file formats in man section 5)
@ -53,48 +47,42 @@ fi], [
fsect=4
])
AC_SUBST(fsect)
AM_CONDITIONAL(FSECT5, test x$fsect = x5)
# Checks for programs.
dnl Checks for programs.
AC_PROG_CC
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_LIBTOOL
if test "$ac_cv_c_compiler_gnu" = yes; then
CFLAGS="$CFLAGS -D_GNU_SOURCE -D_REENTRANT -Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wno-char-subscripts"
fi
export CFLAGS
# Checks for libraries
AC_CHECK_LIB(z, gzopen)
dnl AC_CHECK_LIB(bz2, BZ2_bzReadOpen)
# Checks for header files.
dnl Checks for headers
AC_HEADER_STDC
AC_HEADER_STDINT
AC_HEADER_MAJOR
AC_HEADER_SYS_WAIT
AC_HEADER_STDINT
AC_CHECK_HEADERS(fcntl.h locale.h)
AC_CHECK_HEADERS(sys/mman.h sys/stat.h sys/types.h)
AC_CHECK_HEADERS(error.h)
AC_CHECK_HEADERS(fcntl.h)
AC_CHECK_HEADERS(stdint.h inttypes.h)
AC_CHECK_HEADERS(unistd.h)
AC_CHECK_HEADERS(getopt.h)
AC_CHECK_HEADERS(locale.h)
AC_CHECK_HEADERS(mcheck.h)
AC_CHECK_HEADERS(regex.h)
AC_CHECK_HEADERS(unistd.h)
AC_CHECK_HEADERS(utime.h)
AC_CHECK_HEADERS(sys/utime.h)
AC_CHECK_HEADERS(wchar.h)
# Checks for typedefs, structures, and compiler characteristics.
dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_TYPE_OFF_T
AC_TYPE_PID_T
AC_TYPE_SIZE_T
AC_STRUCT_ST_RDEV
AC_STRUCT_TIMEZONE_DAYLIGHT
AC_SYS_LARGEFILE
AC_MBSTATE_T
AC_CHECK_TYPE_STDC(uint8_t, unsigned char)
AC_CHECK_TYPE_STDC(uint16_t, unsigned short)
AC_CHECK_TYPE_STDC(uint32_t, unsigned int)
AC_CHECK_TYPE_STDC(int32_t, int)
AC_C_LONG_LONG
if test $ac_cv_c_long_long = yes; then
long64='unsigned long long';
@ -109,15 +97,10 @@ AC_CHECK_SIZEOF_STDC_HEADERS(uint16_t, 0)
AC_CHECK_SIZEOF_STDC_HEADERS(uint32_t, 0)
AC_CHECK_SIZEOF_STDC_HEADERS(uint64_t, 0)
# Checks for library functions.
AC_CHECK_FUNCS(error mtrace mkstemp mmap strdup strerror strtoul)
dnl Checks for functions
AC_CHECK_FUNCS(mmap strerror strtoul mkstemp getopt_long utimes utime)
# XXX Choose /usr/lib or /usr/lib64 for library installs.
MARK64=
case "${target_cpu}" in
x86_64*|powerpc64*|ppc64*|sparc64*|s390x*) MARK64=64 ;;
esac
AC_SUBST(MARK64)
dnl Checks for libraries
AC_CHECK_LIB(z,gzopen)
AC_CONFIG_FILES([Makefile src/Makefile magic/Makefile doc/Makefile])
AC_OUTPUT
AC_OUTPUT(Makefile src/Makefile magic/Makefile doc/Makefile)

464
file/depcomp Executable file
View File

@ -0,0 +1,464 @@
#! /bin/sh
# depcomp - compile a program generating dependencies as side-effects
# Copyright 1999, 2000 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, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
# 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>.
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
# `libtool' can also be set to `yes' or `no'.
if test -z "$depfile"; then
base=`echo "$object" | sed -e 's,^.*/,,' -e 's,\.\([^.]*\)$,.P\1,'`
dir=`echo "$object" | sed 's,/.*$,/,'`
if test "$dir" = "$object"; then
dir=
fi
# FIXME: should be _deps on DOS.
depfile="$dir.deps/$base"
fi
tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
rm -f "$tmpdepfile"
# 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
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.
"$@" -MT "$object" -MD -MP -MF "$tmpdepfile"
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile"
exit $stat
fi
mv "$tmpdepfile" "$depfile"
;;
gcc)
## 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).
## - 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 -eq 0; then :
else
rm -f "$tmpdepfile"
exit $stat
fi
rm -f "$depfile"
echo "$object : \\" > "$depfile"
alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
## 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.
tr ' ' '
' < "$tmpdepfile" |
## 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.
## Some versions of the HPUX 10.20 sed can't process this invocation
## correctly. Breaking it into two sed invocations is a workaround.
sed -e 's/^\\$//' -e '/^$/d' -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 -eq 0; then :
else
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 ' ' '
' < "$tmpdepfile" \
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
tr '
' ' ' >> $depfile
echo >> $depfile
# The second pass generates a dummy entry for each header file.
tr ' ' '
' < "$tmpdepfile" \
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
>> $depfile
else
# The sourcefile does not contain any dependencies, so just
# store a dummy comment line, to avoid errors with the Makefile
# "include basename.Plo" scheme.
echo "#dummy" > "$depfile"
fi
rm -f "$tmpdepfile"
;;
aix)
# The C for AIX Compiler uses -M and outputs the dependencies
# in a .u file. 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.
stripped=`echo "$object" | sed -e 's,^.*/,,' -e 's/\(.*\)\..*$/\1/'`
tmpdepfile="$stripped.u"
outname="$stripped.o"
if test "$libtool" = yes; then
"$@" -Wc,-M
else
"$@" -M
fi
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile"
exit $stat
fi
if test -f "$tmpdepfile"; then
# Each line is of the form `foo.o: dependent.h'.
# Do two passes, one to just change these to
# `$object: dependent.h' and one to simply `dependent.h:'.
sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile"
sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile"
else
# The sourcefile does not contain any dependencies, so just
# store a dummy comment line, to avoid errors with the Makefile
# "include basename.Plo" scheme.
echo "#dummy" > "$depfile"
fi
rm -f "$tmpdepfile"
;;
icc)
# Must come before tru64.
# Intel's C compiler understands `-MD -MF file'. However
# icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
# will fill foo.d with something like
# foo.o: sub/foo.c
# foo.o: sub/foo.h
# which is wrong. We want:
# sub/foo.o: sub/foo.c
# sub/foo.o: sub/foo.h
# sub/foo.c:
# sub/foo.h:
"$@" -MD -MF "$tmpdepfile"
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile"
exit $stat
fi
rm -f "$depfile"
# Each line is of the form `foo.o: dependent.h'.
# Do two passes, one to just change these to
# `$object: dependent.h' and one to simply `dependent.h:'.
sed -e "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
sed -e "s,^[^:]*: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile"
rm -f "$tmpdepfile"
;;
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.
dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
test "x$dir" = "x$object" && dir=
base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
if test "$libtool" = yes; then
tmpdepfile1="$dir.libs/$base.lo.d"
tmpdepfile2="$dir.libs/$base.d"
"$@" -Wc,-MD
else
tmpdepfile1="$dir$base.o.d"
tmpdepfile2="$dir$base.d"
"$@" -MD
fi
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile1" "$tmpdepfile2"
exit $stat
fi
if test -f "$tmpdepfile1"; then
tmpdepfile="$tmpdepfile1"
else
tmpdepfile="$tmpdepfile2"
fi
if test -f "$tmpdepfile"; then
sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
# That's a space and a tab in the [].
sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
else
echo "#dummy" > "$depfile"
fi
rm -f "$tmpdepfile"
;;
#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 proprocessed file to stdout, regardless of -o.
"$@" || exit $?
# Remove the call to Libtool.
if test "$libtool" = yes; then
while test $1 != '--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:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile"
rm -f "$depfile"
cat < "$tmpdepfile" > "$depfile"
tr ' ' '
' < "$tmpdepfile" | \
## Some versions of the HPUX 10.20 sed can't process this invocation
## correctly. Breaking it into two sed invocations is a workaround.
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 $1 != '--mode=compile'; do
shift
done
shift
fi
# X makedepend
shift
cleared=no
for arg in "$@"; do
case $cleared in
no)
set ""; shift
cleared=yes ;;
esac
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.
-*|$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"
cat < "$tmpdepfile" > "$depfile"
sed '1,2d' "$tmpdepfile" | tr ' ' '
' | \
## Some versions of the HPUX 10.20 sed can't process this invocation
## correctly. Breaking it into two sed invocations is a workaround.
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 proprocessed file to stdout.
"$@" || exit $?
# Remove the call to Libtool.
if test "$libtool" = yes; then
while test $1 != '--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 '/^# [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 proprocessed file to stdout, regardless of -o,
# because we must use -o when running libtool.
"$@" || exit $?
IFS=" "
for arg
do
case "$arg" in
"-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
set fnord "$@"
shift
shift
;;
*)
set fnord "$@" "$arg"
shift
shift
;;
esac
done
"$@" -E |
sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile"
rm -f "$depfile"
echo "$object : \\" > "$depfile"
. "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile"
echo " " >> "$depfile"
. "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile"
rm -f "$tmpdepfile"
;;
none)
exec "$@"
;;
*)
echo "Unknown depmode $depmode" 1>&2
exit 1
;;
esac
exit 0

View File

@ -1,4 +0,0 @@
Makefile
Makefile.in
file.1
magic.4

View File

@ -1,12 +1,13 @@
#MAGIC = $(pkgdatadir)/magic
MAGIC = $(pkglibdir)/magic
man_MAGIC = magic.@fsect@
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
noinst_MANS = file.1 $(man_MAGIC) # libmagic.3
man_MANS = file.1 $(man_MAGIC) libmagic.3
EXTRA_DIST = file.man magic.man # libmagic.man
EXTRA_DIST = file.man magic.man libmagic.man
CLEANFILES = $(man_MANS)
file.1: Makefile file.man
@ -23,9 +24,9 @@ magic.${fsect}: Makefile magic.man
-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 > $@
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 > $@

499
file/doc/Makefile.in Normal file
View File

@ -0,0 +1,499 @@
# Makefile.in generated by automake 1.7.9 from Makefile.am.
# @configure_input@
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
# 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@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = ..
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
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 = :
host_triplet = @host@
ACLOCAL = @ACLOCAL@
AMDEP_FALSE = @AMDEP_FALSE@
AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FSECT5_FALSE = @FSECT5_FALSE@
FSECT5_TRUE = @FSECT5_TRUE@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
MAKEINFO = @MAKEINFO@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
RANLIB = @RANLIB@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
ac_ct_CC = @ac_ct_CC@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
datadir = @datadir@
exec_prefix = @exec_prefix@
fsect = @fsect@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localstatedir = @localstatedir@
mandir = @mandir@
oldincludedir = @oldincludedir@
prefix = @prefix@
program_transform_name = @program_transform_name@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
MAGIC = $(pkgdatadir)/magic
@FSECT5_TRUE@man_MAGIC = magic.5
@FSECT5_FALSE@man_MAGIC = magic.4
man_MANS = file.1 $(man_MAGIC) libmagic.3
EXTRA_DIST = file.man magic.man libmagic.man
CLEANFILES = $(man_MANS)
subdir = doc
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
DIST_SOURCES =
NROFF = nroff
MANS = $(man_MANS)
DIST_COMMON = $(srcdir)/Makefile.in Makefile.am
all: all-am
.SUFFIXES:
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
cd $(top_srcdir) && \
$(AUTOMAKE) --gnu doc/Makefile
Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in $(top_builddir)/config.status
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
distclean-libtool:
-rm -f libtool
uninstall-info-am:
man1dir = $(mandir)/man1
install-man1: $(man1_MANS) $(man_MANS)
@$(NORMAL_INSTALL)
$(mkinstalldirs) $(DESTDIR)$(man1dir)
@list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \
l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
for i in $$l2; do \
case "$$i" in \
*.1*) list="$$list $$i" ;; \
esac; \
done; \
for i in $$list; do \
if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
else file=$$i; fi; \
ext=`echo $$i | sed -e 's/^.*\\.//'`; \
case "$$ext" in \
1*) ;; \
*) ext='1' ;; \
esac; \
inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
inst=`echo $$inst | sed -e 's/^.*\///'`; \
inst=`echo $$inst | sed '$(transform)'`.$$ext; \
echo " $(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst"; \
$(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst; \
done
uninstall-man1:
@$(NORMAL_UNINSTALL)
@list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \
l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
for i in $$l2; do \
case "$$i" in \
*.1*) list="$$list $$i" ;; \
esac; \
done; \
for i in $$list; do \
ext=`echo $$i | sed -e 's/^.*\\.//'`; \
case "$$ext" in \
1*) ;; \
*) ext='1' ;; \
esac; \
inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
inst=`echo $$inst | sed -e 's/^.*\///'`; \
inst=`echo $$inst | sed '$(transform)'`.$$ext; \
echo " rm -f $(DESTDIR)$(man1dir)/$$inst"; \
rm -f $(DESTDIR)$(man1dir)/$$inst; \
done
man3dir = $(mandir)/man3
install-man3: $(man3_MANS) $(man_MANS)
@$(NORMAL_INSTALL)
$(mkinstalldirs) $(DESTDIR)$(man3dir)
@list='$(man3_MANS) $(dist_man3_MANS) $(nodist_man3_MANS)'; \
l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
for i in $$l2; do \
case "$$i" in \
*.3*) list="$$list $$i" ;; \
esac; \
done; \
for i in $$list; do \
if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
else file=$$i; fi; \
ext=`echo $$i | sed -e 's/^.*\\.//'`; \
case "$$ext" in \
3*) ;; \
*) ext='3' ;; \
esac; \
inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
inst=`echo $$inst | sed -e 's/^.*\///'`; \
inst=`echo $$inst | sed '$(transform)'`.$$ext; \
echo " $(INSTALL_DATA) $$file $(DESTDIR)$(man3dir)/$$inst"; \
$(INSTALL_DATA) $$file $(DESTDIR)$(man3dir)/$$inst; \
done
uninstall-man3:
@$(NORMAL_UNINSTALL)
@list='$(man3_MANS) $(dist_man3_MANS) $(nodist_man3_MANS)'; \
l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
for i in $$l2; do \
case "$$i" in \
*.3*) list="$$list $$i" ;; \
esac; \
done; \
for i in $$list; do \
ext=`echo $$i | sed -e 's/^.*\\.//'`; \
case "$$ext" in \
3*) ;; \
*) ext='3' ;; \
esac; \
inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
inst=`echo $$inst | sed -e 's/^.*\///'`; \
inst=`echo $$inst | sed '$(transform)'`.$$ext; \
echo " rm -f $(DESTDIR)$(man3dir)/$$inst"; \
rm -f $(DESTDIR)$(man3dir)/$$inst; \
done
man4dir = $(mandir)/man4
install-man4: $(man4_MANS) $(man_MANS)
@$(NORMAL_INSTALL)
$(mkinstalldirs) $(DESTDIR)$(man4dir)
@list='$(man4_MANS) $(dist_man4_MANS) $(nodist_man4_MANS)'; \
l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
for i in $$l2; do \
case "$$i" in \
*.4*) list="$$list $$i" ;; \
esac; \
done; \
for i in $$list; do \
if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
else file=$$i; fi; \
ext=`echo $$i | sed -e 's/^.*\\.//'`; \
case "$$ext" in \
4*) ;; \
*) ext='4' ;; \
esac; \
inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
inst=`echo $$inst | sed -e 's/^.*\///'`; \
inst=`echo $$inst | sed '$(transform)'`.$$ext; \
echo " $(INSTALL_DATA) $$file $(DESTDIR)$(man4dir)/$$inst"; \
$(INSTALL_DATA) $$file $(DESTDIR)$(man4dir)/$$inst; \
done
uninstall-man4:
@$(NORMAL_UNINSTALL)
@list='$(man4_MANS) $(dist_man4_MANS) $(nodist_man4_MANS)'; \
l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
for i in $$l2; do \
case "$$i" in \
*.4*) list="$$list $$i" ;; \
esac; \
done; \
for i in $$list; do \
ext=`echo $$i | sed -e 's/^.*\\.//'`; \
case "$$ext" in \
4*) ;; \
*) ext='4' ;; \
esac; \
inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
inst=`echo $$inst | sed -e 's/^.*\///'`; \
inst=`echo $$inst | sed '$(transform)'`.$$ext; \
echo " rm -f $(DESTDIR)$(man4dir)/$$inst"; \
rm -f $(DESTDIR)$(man4dir)/$$inst; \
done
man5dir = $(mandir)/man5
install-man5: $(man5_MANS) $(man_MANS)
@$(NORMAL_INSTALL)
$(mkinstalldirs) $(DESTDIR)$(man5dir)
@list='$(man5_MANS) $(dist_man5_MANS) $(nodist_man5_MANS)'; \
l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
for i in $$l2; do \
case "$$i" in \
*.5*) list="$$list $$i" ;; \
esac; \
done; \
for i in $$list; do \
if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
else file=$$i; fi; \
ext=`echo $$i | sed -e 's/^.*\\.//'`; \
case "$$ext" in \
5*) ;; \
*) ext='5' ;; \
esac; \
inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
inst=`echo $$inst | sed -e 's/^.*\///'`; \
inst=`echo $$inst | sed '$(transform)'`.$$ext; \
echo " $(INSTALL_DATA) $$file $(DESTDIR)$(man5dir)/$$inst"; \
$(INSTALL_DATA) $$file $(DESTDIR)$(man5dir)/$$inst; \
done
uninstall-man5:
@$(NORMAL_UNINSTALL)
@list='$(man5_MANS) $(dist_man5_MANS) $(nodist_man5_MANS)'; \
l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
for i in $$l2; do \
case "$$i" in \
*.5*) list="$$list $$i" ;; \
esac; \
done; \
for i in $$list; do \
ext=`echo $$i | sed -e 's/^.*\\.//'`; \
case "$$ext" in \
5*) ;; \
*) ext='5' ;; \
esac; \
inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
inst=`echo $$inst | sed -e 's/^.*\///'`; \
inst=`echo $$inst | sed '$(transform)'`.$$ext; \
echo " rm -f $(DESTDIR)$(man5dir)/$$inst"; \
rm -f $(DESTDIR)$(man5dir)/$$inst; \
done
tags: TAGS
TAGS:
ctags: CTAGS
CTAGS:
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
top_distdir = ..
distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
list='$(DISTFILES)'; for file in $$list; do \
case $$file in \
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
esac; \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
dir="/$$dir"; \
$(mkinstalldirs) "$(distdir)$$dir"; \
else \
dir=''; \
fi; \
if test -d $$d/$$file; then \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
fi; \
cp -pR $$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:
$(mkinstalldirs) $(DESTDIR)$(man1dir) $(DESTDIR)$(man3dir) $(DESTDIR)$(man4dir) $(DESTDIR)$(man5dir)
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:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
distclean-generic:
-rm -f $(CONFIG_CLEAN_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 distclean-libtool
dvi: dvi-am
dvi-am:
info: info-am
info-am:
install-data-am: install-man
install-exec-am:
install-info: install-info-am
install-man: install-man1 install-man3 install-man4 install-man5
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-info-am uninstall-man
uninstall-man: uninstall-man1 uninstall-man3 uninstall-man4 \
uninstall-man5
.PHONY: all all-am check check-am clean clean-generic clean-libtool \
distclean distclean-generic distclean-libtool distdir dvi \
dvi-am info info-am install install-am install-data \
install-data-am install-exec install-exec-am install-info \
install-info-am install-man install-man1 install-man3 \
install-man4 install-man5 install-strip installcheck \
installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-generic \
mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \
uninstall-info-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:

View File

@ -1,23 +1,27 @@
.TH FILE __CSECTION__ "Copyright but distributable"
.\" Id: file.man,v 1.42 2002/07/03 18:26:37 christos Exp
.\" $Id: file.man,v 1.54 2003/10/27 18:09:08 christos Exp $
.SH NAME
file
\- determine file type
.SH SYNOPSIS
.B file
[
.B \-bciknsvzL
.B \-bcikLnNprsvz
]
[
.B \-f
.I namefile
]
[
.B \-F
.I separator
]
[
.B \-m
.I magicfiles
]
.I file
\*[Am]...
\&...
.br
.B file
.B -C
@ -77,7 +81,7 @@ Any known file types appropriate to the system you are running on
implement them)
are intuited if they are defined in
the system header file
.IR \*[Lt]sys/stat.h\*[Gt] .
.IR <sys/stat.h> .
.PP
The magic number tests are used to check for files with data in
particular fixed formats.
@ -149,20 +153,20 @@ Any file that cannot be identified as having been written
in any of the character sets listed above is simply said to be ``data''.
.SH OPTIONS
.TP 8
.B \-b
.B "\-b, \-\-brief"
Do not prepend filenames to output lines (brief mode).
.TP 8
.B \-c
.B "\-c, \-\-checking\-printout"
Cause a checking printout of the parsed form of the magic file.
This is usually used in conjunction with
.B \-m
to debug a new magic file before installing it.
.TP 8
.B \-C
.B "\-C, \-\-compile"
Write a magic.mgc output file that contains a pre-parsed version of
file.
.TP 8
.BI \-f " namefile"
.BI "\-f, \-\-files\-from" " namefile"
Read the names of the files to be examined from
.I namefile
(one per line)
@ -172,41 +176,60 @@ Either
or at least one filename argument must be present;
to test the standard input, use ``\-'' as a filename argument.
.TP 8
.B \-i
.BI "\-F, \-\-separator" " separator"
Use the specified string as the separator between the filename and the
file result returned. Defaults to ``:''.
.TP 8
.B "\-i, \-\-mime"
Causes the file command to output mime type strings rather than the more
traditional human readable ones. Thus it may say
``text/plain; charset=us-ascii''
rather
than ``ASCII text''. In order for this option to work, file changes the way
than ``ASCII text''.
In order for this option to work, file changes the way
it handles files recognised by the command itself (such as many of the
text file types, directories etc), and makes use of an alternative
``magic'' file.
(See ``FILES'' section, below).
.TP 8
.B \-k
.B "\-k, \-\-keep\-going"
Don't stop at the first match, keep going.
.TP 8
.BI \-m " list"
Specify an alternate list of files containing magic numbers.
This can be a single file, or a colon-separated list of files.
.TP 8
.B \-n
Force stdout to be flushed after checking each file. This is only useful if
checking a list of files. It is intended to be used by programs that want
filetype output from a pipe.
.TP 8
.B \-v
Print the version of the program and exit.
.TP 8
.B \-z
Try to look inside compressed files.
.TP 8
.B \-L
.B "\-L, \-\-dereference"
option causes symlinks to be followed, as the like-named option in
.BR ls (1).
(on systems that support symbolic links).
.TP 8
.B \-s
.BI "\-m, \-\-magic\-file" " list"
Specify an alternate list of files containing magic numbers.
This can be a single file, or a colon-separated list of files.
If a compiled magic file is found alongside, it will be used instead.
With the \-i or \-\-mime option, the program adds ".mime" to each file name.
.TP 8
.B "\-n, \-\-no\-buffer"
Force stdout to be flushed after checking each file.
This is only useful if checking a list of files.
It is intended to be used by programs that want filetype output from a pipe.
.TP 8
.B "\-N, \-\-no\-pad"
Don't pad filenames so that they align in the output.
.TP 8
.B "\-p, \-\-preserve\-date"
On systems that support
.BR utime (2)
or
.BR utimes(2),
attempt to preserve the access time of files analyzed, to pretend that
.BR file (2)
never read them.
.TP 8
.B "\-r, \-\-raw"
Don't translate unprintable characters to \eooo.
Normally
.B file
translates unprintable characters to their octal representation.
.TP 8
.B "\-s, \-\-special\-files"
Normally,
.B file
only attempts to read and determine the type of argument files which
@ -226,21 +249,40 @@ This option also causes
to disregard the file size as reported by
.BR stat (2)
since on some systems it reports a zero size for raw disk partitions.
.TP 8
.B "\-v, \-\-version"
Print the version of the program and exit.
.TP 8
.B "\-z, \-\-uncompress"
Try to look inside compressed files.
.TP 8
.B "\-\-help"
Print a help message and exit.
.SH FILES
.TP
.I __MAGIC__.mgc
\- defaults compiled list of magic numbers
.PP
Default compiled list of magic numbers
.TP
.I __MAGIC__
\- default list of magic numbers
.PP
Default list of magic numbers
.TP
.I __MAGIC__.mime.mgc
Default compiled list of magic numbers, used to output mime types when
the -i option is specified.
.TP
.I __MAGIC__.mime
\- default list of magic numbers, used to output mime types when the -i option
Default list of magic numbers, used to output mime types when the -i option
is specified.
.TP
.I /etc/magic
Local additions to magic wisdom.
.SH ENVIRONMENT
The environment variable
.B MAGIC
can be used to set the default magic number files.
can be used to set the default magic number file name.
.B file
adds ".mime" and/or ".mgc" to the value of this variable as appropriate.
.SH SEE ALSO
.BR magic (__FSECTION__)
\- description of magic file format.
@ -261,14 +303,15 @@ is that this version treats any white space
as a delimiter, so that spaces in pattern strings must be escaped.
For example,
.br
\*[Gt]10 string language impress\ (imPRESS data)
>10 string language impress\ (imPRESS data)
.br
in an existing magic file would have to be changed to
.br
\*[Gt]10 string language\e impress (imPRESS data)
>10 string language\e impress (imPRESS data)
.br
In addition, in this version, if a pattern string contains a backslash,
it must be escaped. For example
it must be escaped.
For example
.br
0 string \ebegindata Andrew Toolkit document
.br
@ -281,10 +324,10 @@ SunOS releases 3.2 and later from Sun Microsystems include a
.BR file (1)
command derived from the System V one, but with some extensions.
My version differs from Sun's only in minor ways.
It includes the extension of the `\*[Am]' operator, used as,
It includes the extension of the `&' operator, used as,
for example,
.br
\*[Gt]16 long\*[Am]0x7fffffff \*[Gt]0 not stripped
>16 long&0x7fffffff >0 not stripped
.SH MAGIC DIRECTORY
The magic file entries have been collected from various sources,
mainly USENET, and contributed by various authors.
@ -344,14 +387,14 @@ the external list of magic number types.
This slowed the program down slightly but made it a lot more flexible.
.PP
This program, based on the System V version,
was written by Ian Darwin \*[Lt]ian@darwinsys.com\*[Gt]
was written by Ian Darwin <ian@darwinsys.com>
without looking at anybody else's source code.
.PP
John Gilmore revised the code extensively, making it better than
the first version.
Geoff Collyer found several inadequacies
and provided some magic file entries.
Contributions by the `\*[Am]' operator by Rob McMahon, cudcv@warwick.ac.uk, 1989.
Contributions by the `&' operator by Rob McMahon, cudcv@warwick.ac.uk, 1989.
.PP
Guy Harris, guy@netapp.com, made many changes from 1993 to the present.
.PP
@ -368,7 +411,8 @@ of non-ASCII files.
.PP
The list of contributors to the "Magdir" directory (source for the
/etc/magic
file) is too long to include here. You know who you are; thank you.
file) is too long to include here.
You know who you are; thank you.
.SH LEGAL NOTICE
Copyright (c) Ian F. Darwin, Toronto, Canada, 1986-1999.
Covered by the standard Berkeley Software Distribution copyright; see the file
@ -383,7 +427,8 @@ were written by John Gilmore from his public-domain
program, and are not covered by the above license.
.SH BUGS
There must be a better way to automate the construction of the Magic
file from all the glop in Magdir. What is it?
file from all the glop in magdir.
What is it?
Better yet, the magic file should be compiled into binary (say,
.BR ndbm (3)
or, better yet, fixed-length
@ -430,7 +475,8 @@ This could be done by using some keyword like `*' for the offset value.
Another optimisation would be to sort
the magic file so that we can just run down all the
tests for the first byte, first word, first long, etc, once we
have fetched it. Complain about conflicts in the magic file entries.
have fetched it.
Complain about conflicts in the magic file entries.
Make a rule that the magic entries sort based on file offset rather
than position within the magic file?
.PP
@ -438,8 +484,9 @@ The program should provide a way to give an estimate
of ``how good'' a guess is.
We end up removing guesses (e.g. ``From '' as first 5 chars of file) because
they are not as good as other guesses (e.g. ``Newsgroups:'' versus
``Return-Path:''). Still, if the others don't pan out, it should be
possible to use the first guess.
``Return-Path:'').
Still, if the others don't pan out, it should be possible to use the
first guess.
.PP
This program is slower than some vendors' file commands.
The new support for multiple character codes makes it even slower.
@ -450,4 +497,4 @@ You can obtain the original author's latest version by anonymous FTP
on
.B ftp.astron.com
in the directory
.I /pub/file/file-X.YY.tar.gz
.I /pub/file/file-X.YZ.tar.gz

228
file/doc/libmagic.man Normal file
View File

@ -0,0 +1,228 @@
.\"
.\" Copyright (c) Christos Zoulas 2003.
.\" All Rights Reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\" notice immediately at the beginning of the file, without modification,
.\" this list of conditions, and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in the
.\" documentation and/or other materials provided with the distribution.
.\" 3. The name of the author may not be used to endorse or promote products
.\" derived from this software without specific prior written permission.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR
.\" ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.Dd March 22, 2003
.Dt MAGIC 3
.Os
.Sh NAME
.Nm magic_open ,
.Nm magic_close ,
.Nm magic_error ,
.Nm magic_file ,
.Nm magic_buffer ,
.Nm magic_setflags ,
.Nm magic_check ,
.Nm magic_compile ,
.Nm magic_load
.Nd Magic number recognition library.
.Sh LIBRARY
.Lb libmagic
.Sh SYNOPSIS
.In magic.h
.Ft magic_t
.Fn magic_open "int flags"
.Ft void
.Fn magic_close "magic_t cookie"
.Ft const char *
.Fn magic_error "magic_t cookie"
.Ft int
.Fn magic_errno "magic_t cookie"
.Ft const char *
.Fn magic_file "magic_t cookie, const char *filename"
.Ft const char *
.Fn magic_buffer "magic_t cookie, const void *buffer, size_t length"
.Ft int
.Fn magic_setflags "magic_t cookie, int flags"
.Ft int
.Fn magic_check "magic_t cookie, const char *filename"
.Ft int
.Fn magic_compile "magic_t cookie, const char *filename"
.Ft int
.Fn magic_load "magic_t cookie, const char *filename"
.Sh DESCRIPTION
These functions
operate on the magic database file
which is described
in
.Xr magic __FSECTION__ .
.Pp
The function
.Fn magic_open
creates a magic cookie pointer and returns it. It returns NULL if
there was an error allocating the magic cookie. The
.Ar flags
argument specifies how the other magic functions should behave:
.Bl -tag -width MAGIC_COMPRESS
.It Dv MAGIC_NONE
No special handling.
.It Dv MAGIC_DEBUG
Print debugging messages to stderr.
.It Dv MAGIC_SYMLINK
If the file queried is a symlink, follow it.
.It Dv MAGIC_COMPRESS
If the file is compressed, unpack it and look at the contents.
.It Dv MAGIC_DEVICES
If the file is a block or character special device, then open the device
and try to look in its contents.
.It Dv MAGIC_MIME
Return a mime string, instead of a textual description.
.It Dv MAGIC_CONTINUE
Return all matches, not just the first.
.It Dv MAGIC_CHECK
Check the magic database for consistency and print warnings to stderr.
.It Dv MAGIC_PRESERVE_ATIME
On systems that support
.Xr utime 2
or
.Xr utimes 2 ,
attempt to preserve the access time of files analyzed.
.It Dv MAGIC_RAW
Don't translate unprintable characters to a \eooo octal representation.
.It Dv MAGIC_ERROR
Treat operating system errors while trying to open files and follow symlinks
as real errors, instead of printing them in the magic buffer.
.El
.Pp
The
.Fn magic_close
function closes the
.Xr magic __FSECTION__
database and deallocates any resources used.
.Pp
The
.Fn magic_error
function returns a textual explanation of the last error, or NULL if there was
no error.
.Pp
The
.Fn magic_errno
function returns the last operating system error number (
.Xr errno 3 )
that was encountered by a system call.
.Pp
The
.Fn magic_file
function returns a textual description of the contents of the
.Ar filename
argument, or NULL if an error occurred.
If the
.Ar filename
is NULL, then stdin is used.
.Pp
The
.Fn magic_buffer
function returns a textual description of the contents of the
.Ar buffer
argument with
.Ar length
bytes size.
.Pp
The
.Fn magic_setflags
function, sets the
.Ar flags
described above.
.Pp
The
.Fn magic_check
function can be used to check the validity of entries in the colon
separated database files passed in as
.Ar filename ,
or NULL for the default database. It returns 0 on success and -1 on
failure.
.Pp
The
.Fn magic_compile
function can be used to compile the the colon
separated list of database files passed in as
.Ar filename ,
or NULL for the default database. It returns 0 on success and -1 on
failure. The compiled files created are named from the
.Xr basename 1
of each file argument with ".mgc" appended to it.
.Pp
The
.Fn magic_load
function must be used to load the the colon
separated list of database files passed in as
.Ar filename ,
or NULL for the default database file
before any magic queries can performed.
.Pp
The default database file is named by the MAGIC environment variable. If
that variable is not set, the default database file name is __MAGIC__.
.Pp
.Fn magic_load
adds ".mime" and/or ".mgc" to the database filename as appropriate.
.Sh RETURN VALUES
The function
.Fn magic_open
returns a magic cookie on success and NULL on failure setting errno to
an appropriate value. It will set errno to EINVAL if an unsupported
value for flags was given.
The
.Fn magic_load ,
.Fn magic_compile ,
and
.Fn magic_check
functions return 0 on success and -1 on failure.
The
.Fn magic_file ,
and
.Fn magic_buffer
functions return a string on success and NULL on failure. The
.Fn magic_error
function returns a textual description of the errors of the above
functions, or NULL if there was no error.
Finally,
.Fn magic_setflags
returns -1 on systems that don't support
.Xr utime 2 ,
or
.Xr utimes 2
when
.Dv MAGIC_PRESERVE_ATIME
is set.
.Sh FILES
.Bl -tag -width __MAGIC__.mime.mgc -compact
.It Pa __MAGIC__.mime
The non-compiled default magic mime database.
.It Pa __MAGIC__.mime.mgc
The compiled default magic mime database.
.It Pa __MAGIC__
The non-compiled default magic database.
.It Pa __MAGIC__.mgc
The compiled default magic database.
.El
.Sh SEE ALSO
.Xr file __CSECTION__ ,
.Xr magic __FSECTION__
.Sh AUTHORS
Måns Rullgård Initial libmagic implementation,
and configuration.
Christos Zoulas API cleanup, error code and allocation handling.

View File

@ -6,7 +6,8 @@ magic \- file command's magic number file
This manual page documents the format of the magic file as
used by the
.BR file (__CSECTION__)
command, version __VERSION__. The
command, version __VERSION__.
The
.BR file
command identifies the type of a file using,
among other tests,
@ -21,13 +22,15 @@ and additional information to extract from the file.
Each line of the file specifies a test to be performed.
A test compares the data starting at a particular offset
in the file with a 1-byte, 2-byte, or 4-byte numeric value or
a string. If the test succeeds, a message is printed.
a string.
If the test succeeds, a message is printed.
The line consists of the following fields:
.IP offset \w'message'u+2n
A number specifying the offset, in bytes, into the file of the data
which is to be tested.
.IP type
The type of the data to be tested. The possible values are:
The type of the data to be tested.
The possible values are:
.RS
.IP byte \w'message'u+2n
A one-byte value.
@ -36,14 +39,21 @@ A two-byte value (on most systems) in this machine's native byte order.
.IP long
A four-byte value (on most systems) in this machine's native byte order.
.IP string
A string of bytes. The string type specification can be optionally followed
by /[Bbc]*. The ``B'' flag compacts whitespace in the target, which must
contain at least one whitespace character. If the magic has "n" consecutive
blanks, the target needs at least "n" consecutive blanks to match. The ``b''
flag treats every blank in the target as an optional blank. Finally the ``c''
flag, specifies case insensitive matching: lowercase characters in the magic
match both lower and upper case characters in the targer, whereas upper case
characters in the magic, only much uppercase characters in the target.
A string of bytes.
The string type specification can be optionally followed
by /[Bbc]*.
The ``B'' flag compacts whitespace in the target, which must
contain at least one whitespace character.
If the magic has
.I n
consecutive blanks, the target needs at least
.I n
consecutive blanks to match.
The ``b'' flag treats every blank in the target as an optional blank.
Finally the ``c'' flag, specifies case insensitive matching: lowercase
characters in the magic match both lower and upper case characters in the
targer, whereas upper case characters in the magic, only much uppercase
characters in the target.
.IP date
A four-byte value interpreted as a UNIX date.
.IP ldate
@ -55,7 +65,7 @@ A two-byte value (on most systems) in big-endian byte order.
A four-byte value (on most systems) in big-endian byte order.
.IP bedate
A four-byte value (on most systems) in big-endian byte order,
interpreted as a unix date.
interpreted as a Unix date.
.IP leshort
A two-byte value (on most systems) in little-endian byte order.
.IP lelong
@ -70,14 +80,16 @@ than UTC.
.RE
.PP
The numeric types may optionally be followed by
.B \*[Am]
.B &
and a numeric value,
to specify that the value is to be AND'ed with the
numeric value before any comparisons are done. Prepending a
numeric value before any comparisons are done.
Prepending a
.B u
to the type indicates that ordered comparisons should be unsigned.
.IP test
The value to be compared with the value from the file. If the type is
The value to be compared with the value from the file.
If the type is
numeric, this value
is specified in C form; if it is a string, it is specified as a C string
with the usual escapes permitted (e.g. \en for new-line).
@ -87,21 +99,21 @@ may be preceded by a character indicating the operation to be performed.
It may be
.BR = ,
to specify that the value from the file must equal the specified value,
.BR \*[Lt] ,
.BR < ,
to specify that the value from the file must be less than the specified
value,
.BR \*[Gt] ,
.BR > ,
to specify that the value from the file must be greater than the specified
value,
.BR \*[Am] ,
.BR & ,
to specify that the value from the file must have set all of the bits
that are set in the specified value,
.BR ^ ,
to specify that the value from the file must have clear any of the bits
that are set in the specified value, or
.BR x ,
to specify that any value will match. If the character is omitted,
it is assumed to be
to specify that any value will match.
If the character is omitted, it is assumed to be
.BR = .
.IP
Numeric values are specified in C form; e.g.
@ -116,16 +128,17 @@ For string values, the byte string from the
file must match the specified byte string.
The operators
.BR = ,
.B \*[Lt]
.B <
and
.B \*[Gt]
.B >
(but not
.BR \*[Am] )
.BR & )
can be applied to strings.
The length used for matching is that of the string argument
in the magic file. This means that a line can match any string, and
in the magic file.
This means that a line can match any string, and
then presumably print that string, by doing
.B \*[Gt]\e0
.B >\e0
(because all strings are greater than the null string).
.IP message
The message to be printed if the comparison succeeds. If the string
@ -135,12 +148,14 @@ format specification, the value from the file (with any specified masking
performed) is printed using the message as the format string.
.PP
Some file formats contain additional information which is to be printed
along with the file type. A line which begins with the character
.B \*[Gt]
indicates additional tests and messages to be printed. The number of
.B \*[Gt]
along with the file type.
A line which begins with the character
.B >
indicates additional tests and messages to be printed.
The number of
.B >
on the line indicates the level of the test; a line with no
.B \*[Gt]
.B >
at the beginning is considered to be at level 0.
Each line at level
.IB n \(pl1
@ -151,38 +166,44 @@ If the test on a line at level
.I n
succeeds, the tests specified in all the subsequent lines at level
.IB n \(pl1
are performed, and the messages printed if the tests succeed. The next
line at level
are performed, and the messages printed if the tests succeed.
The next line at level
.I n
terminates this.
If the first character following the last
.B \*[Gt]
.B >
is a
.B (
then the string after the parenthesis is interpreted as an indirect offset.
That means that the number after the parenthesis is used as an offset in
the file. The value at that offset is read, and is used again as an offset
in the file. Indirect offsets are of the form:
.BI (( x [.[bslBSL]][+-][ y ]).
the file.
The value at that offset is read, and is used again as an offset
in the file.
Indirect offsets are of the form:
.BI (( x [.[bslBSL]][+\-][ y ]).
The value of
.I x
is used as an offset in the file. A byte, short or long is read at that offset
depending on the
.B [bslBSL]
type specifier. The capitalized types interpret the number as a big endian
value, whereas the small letter versions interpet the number as a little
endian value. To that number the value of
type specifier.
The capitalized types interpret the number as a big endian
value, whereas the small letter versions interpret the number as a little
endian value.
To that number the value of
.I y
is added and the result is used as an offset in the file. The default type
if one is not specified is long.
is added and the result is used as an offset in the file.
The default type if one is not specified is long.
.PP
Sometimes you do not know the exact offset as this depends on the length of
preceding fields. You can specify an offset relative to the end of the
preceding fields.
You can specify an offset relative to the end of the
last uplevel field (of course this may only be done for sublevel tests, i.e.
test beginning with
.B \*[Gt]
). Such a relative offset is specified using
.B \*[Am]
.B >
).
Such a relative offset is specified using
.B &
as a prefix to the offset.
.SH BUGS
The formats
@ -210,7 +231,7 @@ indirect offsets.
.\" From: guy@sun.uucp (Guy Harris)
.\" Newsgroups: net.bugs.usg
.\" Subject: /etc/magic's format isn't well documented
.\" Message-ID: \*[Lt]2752@sun.uucp\*[Gt]
.\" Message-ID: <2752@sun.uucp>
.\" Date: 3 Sep 85 08:19:07 GMT
.\" Organization: Sun Microsystems, Inc.
.\" Lines: 136
@ -219,4 +240,4 @@ indirect offsets.
.\" the changes I posted to the S5R2 version.
.\"
.\" Modified for Ian Darwin's version of the file command.
.\" @(#)Id: magic.man,v 1.19 2002/07/03 18:26:38 christos Exp
.\" @(#)$Id: magic.man,v 1.27 2003/09/12 19:43:30 christos Exp $

805
file/ltcf-c.sh Normal file
View File

@ -0,0 +1,805 @@
#### This script is meant to be sourced by ltconfig.
# ltcf-c.sh - Create a C compiler specific configuration
#
# Copyright (C) 1996-2000, 2001 Free Software Foundation, Inc.
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
#
# This file 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 of the License, 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, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
# 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.
# Source file extension for C test sources.
ac_ext=c
# Object file extension for compiled C test sources.
objext=o
# Code to be used in simple compile tests
lt_simple_compile_test_code="int some_variable = 0;"
# Code to be used in simple link tests
lt_simple_link_test_code='main(){return(0);}'
## Linker Characteristics
case $host_os in
cygwin* | mingw*)
# FIXME: the MSVC++ port hasn't been tested in a loooong time
# When not using gcc, we currently assume that we are using
# Microsoft Visual C++.
if test "$with_gcc" != yes; then
with_gnu_ld=no
fi
;;
esac
ld_shlibs=yes
if test "$with_gnu_ld" = yes; then
# If archive_cmds runs LD, not CC, wlarc should be empty
wlarc='${wl}'
# See if GNU ld supports shared libraries.
case $host_os in
aix3* | aix4* | aix5*)
# On AIX, the GNU linker is very broken
ld_shlibs=no
cat <<EOF 1>&2
*** Warning: the GNU linker, at least up to release 2.9.1, is reported
*** to be unable to reliably create shared libraries on AIX.
*** Therefore, libtool is disabling shared libraries support. If you
*** really care for shared libraries, you may want to modify your PATH
*** so that a non-GNU linker is found, and then restart.
EOF
;;
amigaos*)
archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
hardcode_libdir_flag_spec='-L$libdir'
hardcode_minus_L=yes
# Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
# that the semantics of dynamic libraries on AmigaOS, at least up
# to version 4, is to share data among multiple programs linked
# with the same dynamic library. Since this doesn't match the
# behavior of shared libraries on other platforms, we can use
# them.
ld_shlibs=no
;;
beos*)
if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
allow_undefined_flag=unsupported
# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
# support --undefined. This deserves some investigation. FIXME
archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
else
ld_shlibs=no
fi
;;
cygwin* | mingw*)
# hardcode_libdir_flag_spec is actually meaningless, as there is
# no search path for DLLs.
hardcode_libdir_flag_spec='-L$libdir'
allow_undefined_flag=unsupported
always_export_symbols=yes
extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //; p; }" -e d < $0 > $output_objdir/impgen.c~
test -f $output_objdir/impgen.exe || (cd $output_objdir && \
if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
else $CC -o impgen impgen.c ; fi)~
$output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
# cygwin and mingw dlls have different entry points and sets of symbols
# to exclude.
# FIXME: what about values for MSVC?
dll_entry=__cygwin_dll_entry@12
dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
case $host_os in
mingw*)
# mingw values
dll_entry=_DllMainCRTStartup@12
dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
;;
esac
# mingw and cygwin differ, and it's simplest to just exclude the union
# of the two symbol sets.
dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
# recent cygwin and mingw systems supply a stub DllMain which the user
# can override, but on older systems we have to supply one (in ltdll.c)
if test "x$lt_cv_need_dllmain" = "xyes"; then
ltdll_obj='$output_objdir/$soname-ltdll.'"$objext "
ltdll_cmds='test -f $output_objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $0 > $output_objdir/$soname-ltdll.c~
test -f $output_objdir/$soname-ltdll.$objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
else
ltdll_obj=
ltdll_cmds=
fi
# Extract the symbol export list from an `--export-all' def file,
# then regenerate the def file from the symbol export list, so that
# the compiled dll only exports the symbol export list.
# Be careful not to strip the DATA tag left be newer dlltools.
export_symbols_cmds="$ltdll_cmds"'
$DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
# If the export-symbols file already is a .def file (1st line
# is EXPORTS), use it as is.
# If DATA tags from a recent dlltool are present, honour them!
archive_expsym_cmds='if test "x`head -1 $export_symbols`" = xEXPORTS; then
cp $export_symbols $output_objdir/$soname-def;
else
echo EXPORTS > $output_objdir/$soname-def;
_lt_hint=1;
cat $export_symbols | while read symbol; do
set dummy \$symbol;
case \[$]# in
2) echo " \[$]2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
*) echo " \[$]2 @ \$_lt_hint \[$]3 ; " >> $output_objdir/$soname-def;;
esac;
_lt_hint=`expr 1 + \$_lt_hint`;
done;
fi~
'"$ltdll_cmds"'
$CC -Wl,--base-file,$output_objdir/$soname-base '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~
$DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp~
$CC -Wl,--base-file,$output_objdir/$soname-base $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~
$DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp --output-lib $output_objdir/$libname.dll.a~
$CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
;;
netbsd*)
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
wlarc=
else
archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
fi
;;
solaris* | sysv5*)
if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
ld_shlibs=no
cat <<EOF 1>&2
*** Warning: The releases 2.8.* of the GNU linker cannot reliably
*** create shared libraries on Solaris systems. Therefore, libtool
*** is disabling shared libraries support. We urge you to upgrade GNU
*** binutils to release 2.9.1 or newer. Another option is to modify
*** your PATH or compiler configuration so that the native linker is
*** used, and then restart.
EOF
elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
else
ld_shlibs=no
fi
;;
sunos4*)
archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
wlarc=
hardcode_direct=yes
hardcode_shlibpath_var=no
;;
*)
if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
else
ld_shlibs=no
fi
;;
esac
if test "$ld_shlibs" = yes; then
runpath_var=LD_RUN_PATH
hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
export_dynamic_flag_spec='${wl}--export-dynamic'
case $host_os in
cygwin* | mingw*)
# dlltool doesn't understand --whole-archive et. al.
whole_archive_flag_spec=
;;
*)
# ancient GNU ld didn't support --whole-archive et. al.
if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
else
whole_archive_flag_spec=
fi
;;
esac
fi
else
# PORTME fill in a description of your system's linker (not GNU ld)
case $host_os in
aix3*)
allow_undefined_flag=unsupported
always_export_symbols=yes
archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
# Note: this linker hardcodes the directories in LIBPATH if there
# are no directories specified by -L.
hardcode_minus_L=yes
if test "$with_gcc" = yes && test -z "$link_static_flag"; then
# Neither direct hardcoding nor static linking is supported with a
# broken collect2.
hardcode_direct=unsupported
fi
;;
aix4* | aix5*)
hardcode_direct=yes
hardcode_libdir_separator=':'
link_all_deplibs=yes
# When large executables or shared objects are built, AIX ld can
# have problems creating the table of contents. If linking a library
# or program results in "error TOC overflow" add -mminimal-toc to
# CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
# enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
if test "$with_gcc" = yes; then
case $host_os in aix4.[012]|aix4.[012].*)
# We only want to do this on AIX 4.2 and lower, the check
# below for broken collect2 doesn't work under 4.3+
collect2name=`${CC} -print-prog-name=collect2`
if test -f "$collect2name" && \
strings "$collect2name" | grep resolve_lib_name >/dev/null
then
# We have reworked collect2
hardcode_direct=yes
else
# We have old collect2
hardcode_direct=unsupported
# It fails to find uninstalled libraries when the uninstalled
# path is not listed in the libpath. Setting hardcode_minus_L
# to unsupported forces relinking
hardcode_minus_L=yes
hardcode_libdir_flag_spec='-L$libdir'
hardcode_libdir_separator=
fi
esac
shared_flag='-shared'
else
# not using gcc
if test "$host_cpu" = ia64; then
shared_flag='${wl}-G'
else
shared_flag='${wl}-bM:SRE'
fi
fi
if test "$host_cpu" = ia64; then
# On IA64, the linker does run time linking by default, so we don't
# have to do anything special.
aix_use_runtimelinking=no
exp_sym_flag='-Bexport'
no_entry_flag=""
else
# Test if we are trying to use run time linking, or normal AIX style linking.
# If -brtl is somewhere in LDFLAGS, we need to do run time linking.
aix_use_runtimelinking=no
for ld_flag in $LDFLAGS; do
if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl" ); then
aix_use_runtimelinking=yes
break
fi
done
exp_sym_flag='-bexport'
no_entry_flag='-bnoentry'
fi
# -bexpall does not export symbols beginning with underscore (_)
always_export_symbols=yes
if test "$aix_use_runtimelinking" = yes; then
# Warning - without using the other run time loading flags (-brtl), -berok will
# link without error, but may produce a broken library.
allow_undefined_flag=' ${wl}-berok'
hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
else
if test "$host_cpu" = ia64; then
hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
allow_undefined_flag="-z nodefs"
archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
else
allow_undefined_flag=' ${wl}-berok'
# -bexpall does not export symbols beginning with underscore (_)
always_export_symbols=yes
# Exported symbols can be pulled into shared objects from archives
whole_archive_flag_spec=' '
build_libtool_need_lc=yes
hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
# This is similar to how AIX traditionally builds it's shared libraries.
archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
fi
fi
;;
amigaos*)
archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
hardcode_libdir_flag_spec='-L$libdir'
hardcode_minus_L=yes
# see comment about different semantics on the GNU ld section
ld_shlibs=no
;;
cygwin* | mingw*)
# When not using gcc, we currently assume that we are using
# Microsoft Visual C++.
# hardcode_libdir_flag_spec is actually meaningless, as there is
# no search path for DLLs.
hardcode_libdir_flag_spec=' '
allow_undefined_flag=unsupported
# Tell ltmain to make .lib files, not .a files.
libext=lib
# FIXME: Setting linknames here is a bad hack.
archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
# The linker will automatically build a .lib file if we build a DLL.
old_archive_from_new_cmds='true'
# FIXME: Should let the user specify the lib program.
old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
fix_srcfile_path='`cygpath -w "$srcfile"`'
;;
darwin* | rhapsody*)
case "$host_os" in
rhapsody* | darwin1.[012])
allow_undefined_flag='-undefined suppress'
;;
*) # Darwin 1.3 on
allow_undefined_flag='-flat_namespace -undefined suppress'
;;
esac
archive_cmds='$CC $(if test .$module = .yes; then echo -bundle; else echo -dynamiclib; fi) $allow_undefined_flag -o $lib $libobjs $deplibs $linkopts -install_name $rpath/$soname $verstring'
# We need to add '_' to the symbols in $export_symbols first
#archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols $lib'
hardcode_direct=yes
hardcode_shlibpath_var=no
whole_archive_flag_spec='-all_load $convenience'
;;
freebsd1*)
ld_shlibs=no
;;
# FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
# support. Future versions do this automatically, but an explicit c++rt0.o
# does not break anything, and helps significantly (at the cost of a little
# extra space).
freebsd2.2*)
archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
hardcode_libdir_flag_spec='-R$libdir'
hardcode_direct=yes
hardcode_shlibpath_var=no
;;
# Unfortunately, older versions of FreeBSD 2 do not have this feature.
freebsd2*)
archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
hardcode_direct=yes
hardcode_minus_L=yes
hardcode_shlibpath_var=no
;;
# FreeBSD 3 and greater uses gcc -shared to do shared libraries.
freebsd*)
archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
hardcode_libdir_flag_spec='-R$libdir'
hardcode_direct=yes
hardcode_shlibpath_var=no
;;
hpux9* | hpux10* | hpux11*)
case $host_os in
hpux9*) archive_cmds='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' ;;
*) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
esac
hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
hardcode_libdir_separator=:
hardcode_direct=yes
hardcode_minus_L=yes # Not in the search PATH, but as the default
# location of the library.
export_dynamic_flag_spec='${wl}-E'
;;
irix5* | irix6*)
if test "$with_gcc" = yes; then
archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
else
archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
fi
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
hardcode_libdir_separator=:
link_all_deplibs=yes
;;
netbsd*)
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
else
archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
fi
hardcode_libdir_flag_spec='-R$libdir'
hardcode_direct=yes
hardcode_shlibpath_var=no
;;
newsos6)
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts'
hardcode_direct=yes
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
hardcode_libdir_separator=:
hardcode_shlibpath_var=no
;;
openbsd*)
archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
hardcode_libdir_flag_spec='-R$libdir'
hardcode_direct=yes
hardcode_shlibpath_var=no
;;
os2*)
hardcode_libdir_flag_spec='-L$libdir'
hardcode_minus_L=yes
allow_undefined_flag=unsupported
archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
;;
osf3*)
if test "$with_gcc" = yes; then
allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
else
allow_undefined_flag=' -expect_unresolved \*'
archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
fi
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
hardcode_libdir_separator=:
;;
osf4* | osf5*) # as osf3* with the addition of -msym flag
if test "$with_gcc" = yes; then
allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
else
allow_undefined_flag=' -expect_unresolved \*'
archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
$LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp'
# cc supports -rpath directly
hardcode_libdir_flag_spec='-rpath $libdir'
fi
hardcode_libdir_separator=:
;;
sco3.2v5*)
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
hardcode_shlibpath_var=no
runpath_var=LD_RUN_PATH
hardcode_runpath_var=yes
;;
solaris*)
no_undefined_flag=' -z defs'
# $CC -shared without GNU ld will not create a library from C++
# object files and a static libstdc++, better avoid it by now
archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
hardcode_libdir_flag_spec='-R$libdir'
hardcode_shlibpath_var=no
case $host_os in
solaris2.[0-5] | solaris2.[0-5].*) ;;
*) # Supported since Solaris 2.6 (maybe 2.5.1?)
whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
esac
link_all_deplibs=yes
;;
sunos4*)
archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
hardcode_libdir_flag_spec='-L$libdir'
hardcode_direct=yes
hardcode_minus_L=yes
hardcode_shlibpath_var=no
;;
sysv4)
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
runpath_var='LD_RUN_PATH'
hardcode_shlibpath_var=no
hardcode_direct=no #Motorola manual says yes, but my tests say they lie
;;
sysv4.3*)
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
hardcode_shlibpath_var=no
export_dynamic_flag_spec='-Bexport'
;;
sysv5*)
no_undefined_flag=' -z text'
# $CC -shared without GNU ld will not create a library from C++
# object files and a static libstdc++, better avoid it by now
archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
hardcode_libdir_flag_spec=
hardcode_shlibpath_var=no
runpath_var='LD_RUN_PATH'
;;
uts4*)
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
hardcode_libdir_flag_spec='-L$libdir'
hardcode_shlibpath_var=no
;;
dgux*)
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
hardcode_libdir_flag_spec='-L$libdir'
hardcode_shlibpath_var=no
;;
sysv4*MP*)
if test -d /usr/nec; then
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
hardcode_shlibpath_var=no
runpath_var=LD_RUN_PATH
hardcode_runpath_var=yes
ld_shlibs=yes
fi
;;
sysv4.2uw2*)
archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
hardcode_direct=yes
hardcode_minus_L=no
hardcode_shlibpath_var=no
hardcode_runpath_var=yes
runpath_var=LD_RUN_PATH
;;
sysv5uw7* | unixware7*)
no_undefined_flag='${wl}-z ${wl}text'
if test "$GCC" = yes; then
archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
else
archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
fi
runpath_var='LD_RUN_PATH'
hardcode_shlibpath_var=no
;;
*)
ld_shlibs=no
;;
esac
fi
## Compiler Characteristics: PIC flags, static flags, etc
if test "X${ac_cv_prog_cc_pic+set}" = Xset; then
:
else
ac_cv_prog_cc_pic=
ac_cv_prog_cc_shlib=
ac_cv_prog_cc_wl=
ac_cv_prog_cc_static=
ac_cv_prog_cc_no_builtin=
ac_cv_prog_cc_can_build_shared=$can_build_shared
if test "$with_gcc" = yes; then
ac_cv_prog_cc_wl='-Wl,'
ac_cv_prog_cc_static='-static'
case $host_os in
aix*)
# All AIX code is PIC.
if test "$host_cpu" = ia64; then
# AIX 5 now supports IA64 processor
lt_cv_prog_cc_static='-Bstatic'
else
lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
fi
;;
amigaos*)
# FIXME: we need at least 68020 code to build shared libraries, but
# adding the `-m68020' flag to GCC prevents building anything better,
# like `-m68040'.
ac_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
;;
beos* | irix5* | irix6* | osf3* | osf4* | osf5*)
# PIC is the default for these OSes.
;;
cygwin* | mingw* | os2*)
# This hack is so that the source file can tell whether it is being
# built for inclusion in a dll (and should export symbols for example).
ac_cv_prog_cc_pic='-DDLL_EXPORT'
;;
darwin* | rhapsody*)
# PIC is the default on this platform
# Common symbols not allowed in MH_DYLIB files
ac_cv_prog_cc_pic='-fno-common'
;;
*djgpp*)
# DJGPP does not support shared libraries at all
ac_cv_prog_cc_pic=
;;
sysv4*MP*)
if test -d /usr/nec; then
ac_cv_prog_cc_pic=-Kconform_pic
fi
;;
*)
ac_cv_prog_cc_pic='-fPIC'
;;
esac
else
# PORTME Check for PIC flags for the system compiler.
case $host_os in
aix*)
# All AIX code is PIC.
ac_cv_prog_cc_static="$ac_cv_prog_cc_static ${ac_cv_prog_cc_wl}-lC"
;;
hpux9* | hpux10* | hpux11*)
# Is there a better ac_cv_prog_cc_static that works with the bundled CC?
ac_cv_prog_cc_wl='-Wl,'
ac_cv_prog_cc_static="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
ac_cv_prog_cc_pic='+Z'
;;
irix5* | irix6*)
ac_cv_prog_cc_wl='-Wl,'
ac_cv_prog_cc_static='-non_shared'
# PIC (with -KPIC) is the default.
;;
cygwin* | mingw* | os2*)
# This hack is so that the source file can tell whether it is being
# built for inclusion in a dll (and should export symbols for example).
ac_cv_prog_cc_pic='-DDLL_EXPORT'
;;
newsos6)
ac_cv_prog_cc_pic='-KPIC'
ac_cv_prog_cc_static='-Bstatic'
;;
osf3* | osf4* | osf5*)
# All OSF/1 code is PIC.
ac_cv_prog_cc_wl='-Wl,'
ac_cv_prog_cc_static='-non_shared'
;;
sco3.2v5*)
ac_cv_prog_cc_pic='-Kpic'
ac_cv_prog_cc_static='-dn'
ac_cv_prog_cc_shlib='-belf'
;;
solaris*)
ac_cv_prog_cc_pic='-KPIC'
ac_cv_prog_cc_static='-Bstatic'
ac_cv_prog_cc_wl='-Wl,'
;;
sunos4*)
ac_cv_prog_cc_pic='-PIC'
ac_cv_prog_cc_static='-Bstatic'
ac_cv_prog_cc_wl='-Qoption ld '
;;
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
ac_cv_prog_cc_pic='-KPIC'
ac_cv_prog_cc_static='-Bstatic'
ac_cv_prog_cc_wl='-Wl,'
;;
uts4*)
ac_cv_prog_cc_pic='-pic'
ac_cv_prog_cc_static='-Bstatic'
;;
sysv4*MP*)
if test -d /usr/nec ;then
ac_cv_prog_cc_pic='-Kconform_pic'
ac_cv_prog_cc_static='-Bstatic'
fi
;;
*)
ac_cv_prog_cc_can_build_shared=no
;;
esac
fi
case "$host_os" in
# Platforms which do not suport PIC and -DPIC is meaningless
# on them:
*djgpp*)
ac_cv_prog_cc_pic=
;;
*)
ac_cv_prog_cc_pic="$ac_cv_prog_cc_pic -DPIC"
;;
esac
fi
need_lc=yes
if test "$enable_shared" = yes && test "$with_gcc" = yes; then
case $archive_cmds in
*'~'*)
# FIXME: we may have to deal with multi-command sequences.
;;
'$CC '*)
# Test whether the compiler implicitly links with -lc since on some
# systems, -lgcc has to come before -lc. If gcc already passes -lc
# to ld, don't add -lc before -lgcc.
echo $ac_n "checking whether -lc should be explicitly linked in... $ac_c" 1>&6
if eval "test \"`echo '$''{'ac_cv_archive_cmds_needs_lc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
need_lc=$ac_cv_archive_cmds_needs_lc
else
$rm conftest*
echo "static int dummy;" > conftest.$ac_ext
if { (eval echo ltcf-c.sh:need_lc: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; }; then
# Append any warnings to the config.log.
cat conftest.err 1>&5
soname=conftest
lib=conftest
libobjs=conftest.$ac_objext
deplibs=
wl=$ac_cv_prog_cc_wl
compiler_flags=-v
linker_flags=-v
verstring=
output_objdir=.
libname=conftest
save_allow_undefined_flag=$allow_undefined_flag
allow_undefined_flag=
if { (eval echo ltcf-c.sh:need_lc: \"$archive_cmds\") 1>&5; (eval $archive_cmds) 2>&1 | grep " -lc " 1>&5 ; }; then
need_lc=no
fi
allow_undefined_flag=$save_allow_undefined_flag
else
cat conftest.err 1>&5
fi
fi
$rm conftest*
echo "$ac_t$need_lc" 1>&6
;;
esac
fi
ac_cv_archive_cmds_needs_lc=$need_lc

2797
file/ltconfig Executable file

File diff suppressed because it is too large Load Diff

5500
file/ltmain.sh Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +0,0 @@
Makefile
Makefile.in
magic
*.mgc

View File

@ -2,15 +2,6 @@
#------------------------------------------------------------------------------
# Localstuff: file(1) magic for locally observed files
#
# Id: Localstuff,v 1.3 1995/01/21 21:09:00 christos Exp
# $Id: Localstuff,v 1.4 2003/03/23 04:17:27 christos Exp $
# Add any locally observed files here. Remember:
# text if readable, executable if runnable binary, data if unreadable.
# XXX promoted from tex so that *.tfm is not mis-identified as mc68k file.
# There is no way to detect TeX Font Metric (*.tfm) files without
# breaking them apart and reading the data. The following patterns
# match most *.tfm files generated by METAFONT or afm2tfm.
2 string \000\021 TeX font metric data
>33 string >\0 (%s)
2 string \000\022 TeX font metric data
>33 string >\0 (%s)

View File

@ -33,7 +33,38 @@
0 string ARP. The Holy Noise Module sound file
0 string BeEp\0 JamCracker Module sound file
0 string COSO\0 Hippel-COSO Module sound file
26 string V.3 Brian Postma's Soundmon Module sound file v3
26 string BPSM Brian Postma's Soundmon Module sound file v3
26 string V.2 Brian Postma's Soundmon Module sound file v2
# Too simple (short, pure ASCII, deep), MPi
#26 string V.3 Brian Postma's Soundmon Module sound file v3
#26 string BPSM Brian Postma's Soundmon Module sound file v3
#26 string V.2 Brian Postma's Soundmon Module sound file v2
# The following are from: "Stefan A. Haubenthal" <polluks@web.de>
0 beshort 0x0f00 AmigaOS bitmap font
0 beshort 0x0f03 AmigaOS outline font
0 belong 0x80001001 AmigaOS outline tag
0 string ##\ version catalog translation
0 string FORM IFF data
>8 string CTLG \b, CTLG message catalog
>8 string PREF \b, PREF preferences
0 string Rar! RAR archive data,
>44 byte x v%0x,
>35 byte 0 os: MS-DOS
>35 byte 1 os: OS/2
>35 byte 2 os: Win32
>35 byte 3 os: Unix
0 belong 0x000003fa AmigaOS shared library
# Amiga disk types
#
0 string RDSK Rigid Disk Block
>160 string x on %.24s
0 string DOS\0 Amiga DOS disk
0 string DOS\1 Amiga FFS disk
0 string DOS\2 Amiga Inter DOS disk
0 string DOS\3 Amiga Inter FFS disk
0 string DOS\4 Amiga Fastdir DOS disk
0 string DOS\5 Amiga Fastdir FFS disk
0 string KICK Kickstart disk

View File

@ -118,6 +118,12 @@
#>3 byte&0x03 1 \b, Emphasis 5
#>3 byte&0x03 3 \b, Emphasis c
#From: Johan Gade <jgade@diku.dk>
# MPEG-4 Advanced Audio Coding (AAC) file (perhaps also MPEG-2 ACC?)
16 string M4A MPEG-4 Advanced Audio Coding file (AAC)
# FLI animation format
4 leshort 0xAF11 FLI file
>6 leshort x - %d frames,
@ -157,10 +163,19 @@
# \003. Most of them start with non-null values at hex offset 0x34 or so.
#0 string \3\0\0\0\0\0\0\0\0\0\0\0 DL version 3
# SGI and Apple formats
# SGI formats
0 string MOVI Silicon Graphics movie file
# Apple Quicktime: Scan for all known top-level QT atom markers
4 string moov Apple QuickTime movie file (moov)
4 string mdat Apple QuickTime movie file (mdat)
4 string ftyp Apple QuickTime movie file (ftyp)
4 string free Apple QuickTime movie file (free)
4 string junk Apple QuickTime movie file (junk)
4 string pnot Apple QuickTime movie file (pnot)
4 string skip Apple QuickTime movie file (skip)
4 string wide Apple QuickTime movie file (wide)
4 string pict Apple QuickTime movie file (pict)
# iso 13818 transport stream
#
@ -194,3 +209,32 @@
0 string \x8aMNG MNG video data,
>4 belong !0x0d0a1a0a CORRUPTED,
>4 belong 0x0d0a1a0a
>>16 belong x %ld x
>>20 belong x %ld
# JNG Video Format, <URL:http://www.libpng.org/pub/mng/spec/>
0 string \x8bJNG JNG video data,
>4 belong !0x0d0a1a0a CORRUPTED,
>4 belong 0x0d0a1a0a
>>16 belong x %ld x
>>20 belong x %ld
# Vivo video (Wolfram Kleff)
3 string \x0D\x0AVersion:Vivo Vivo video data
# VRML (Virtual Reality Modelling Language)
0 string/b #VRML\ V1.0\ ascii VRML 1 file
0 string/b #VRML\ V2.0\ utf8 ISO/IEC 14772 VRML 97 file
#---------------------------------------------------------------------------
# HVQM4: compressed movie format designed by Hudson for Nintendo GameCube
# From Mark Sheppard <msheppard@climax.co.uk>, 2002-10-03
#
0 string HVQM4 %s
>6 string >\0 v%s
>0 byte x GameCube movie,
>0x34 ubeshort x %d x
>0x36 ubeshort x %d,
>0x26 ubeshort x %dµs,
>0x42 ubeshort 0 no audio
>0x42 ubeshort >0 %dHz audio

View File

@ -28,6 +28,13 @@
>12 belong &0x02000000 UseFasterCompression,
>16 belong x version %d
0 string package4 Newton package,
>8 byte 8 NOS 1.x,
>8 byte 9 NOS 2.x,
>12 belong &0x80000000 AutoRemove,
>12 belong &0x40000000 CopyProtect,
>12 belong &0x10000000 NoCompression,
# The following entries for the Apple II are for files that have
# been transferred as raw binary data from an Apple, without having
# been encapsulated by any of the above archivers.

View File

@ -32,8 +32,10 @@
0 string !<arch>\ndebian
>8 string debian-split part of multipart Debian package
>8 string debian-binary Debian binary package
>68 string >\n (format %s)
>136 ledate x created: %s
>68 string >\0 (format %s)
>81 string bz2 \b, uses bzip2 compression
>84 string gz \b, uses gzip compression
#>136 ledate x created: %s
# other archives
0 long 0177555 very old archive
@ -239,9 +241,11 @@
# Microsoft cabinets
# by David Necas (Yeti) <yeti@physics.muni.cz>
0 string MSCF\0\0\0\0 Microsoft cabinet file data,
>25 byte x v%d
>24 byte x \b.%d
#0 string MSCF\0\0\0\0 Microsoft cabinet file data,
#>25 byte x v%d
#>24 byte x \b.%d
# MPi: All CABs have version 1.3, so this is pointless.
# Better magic in debian-additions.
# GTKtalog catalogs
# by David Necas (Yeti) <yeti@physics.muni.cz>
@ -256,3 +260,48 @@
0 string PAR\0 PARity archive data
>48 leshort =0 - Index file
>48 leshort >0 - file number %d
# Felix von Leitner <felix-file@fefe.de>
0 string d8:announce BitTorrent file
# Atari MSA archive - Teemu Hukkanen <tjhukkan@iki.fi>
0 beshort 0x0e0f Atari MSA archive data
>2 beshort x \b, %d sectors per track
>4 beshort 0 \b, 1 sided
>4 beshort 1 \b, 2 sided
>6 beshort x \b, starting track: %d
>8 beshort x \b, ending track: %d
# Alternate ZIP string (amc@arwen.cs.berkeley.edu)
0 string PK00PK\003\004 Zip archive data
# ACE archive (from http://www.wotsit.org/download.asp?f=ace)
# by Stefan `Sec` Zehl <sec@42.org>
7 string **ACE** ACE compressed archive
>15 byte >0 version %d
>16 byte =0x00 \b, from MS-DOS
>16 byte =0x01 \b, from OS/2
>16 byte =0x02 \b, from Win/32
>16 byte =0x03 \b, from Unix
>16 byte =0x04 \b, from MacOS
>16 byte =0x05 \b, from WinNT
>16 byte =0x06 \b, from Primos
>16 byte =0x07 \b, from AppleGS
>16 byte =0x08 \b, from Atari
>16 byte =0x09 \b, from Vax/VMS
>16 byte =0x0A \b, from Amiga
>16 byte =0x0B \b, from Next
>14 byte x \b, version %d to extract
>5 leshort &0x0080 \b, multiple volumes,
>>17 byte x \b (part %d),
>5 leshort &0x0002 \b, contains comment
>5 leshort &0x0200 \b, sfx
>5 leshort &0x0400 \b, small dictionary
>5 leshort &0x0800 \b, multi-volume
>5 leshort &0x1000 \b, contains AV-String
>>30 string\x16*UNREGISTERED\x20VERSION* (unregistered)
>5 leshort &0x2000 \b, with recovery record
>5 leshort &0x4000 \b, locked
>5 leshort &0x8000 \b, solid
# Date in MS-DOS format (whatever that is)
#>18 lelong x Created on

View File

@ -8,14 +8,14 @@
# Sun/NeXT audio data
0 string .snd Sun/NeXT audio data:
>12 belong 1 8-bit ISDN u-law,
>12 belong 1 8-bit ISDN mu-law,
>12 belong 2 8-bit linear PCM [REF-PCM],
>12 belong 3 16-bit linear PCM,
>12 belong 4 24-bit linear PCM,
>12 belong 5 32-bit linear PCM,
>12 belong 6 32-bit IEEE floating point,
>12 belong 7 64-bit IEEE floating point,
>12 belong 23 8-bit ISDN u-law compressed (CCITT G.721 ADPCM voice data encoding),
>12 belong 23 8-bit ISDN mu-law compressed (CCITT G.721 ADPCM voice data encoding),
>12 belong 24 compressed (8-bit G.722 ADPCM)
>12 belong 25 compressed (3-bit G.723 ADPCM),
>12 belong 26 compressed (5-bit G.723 ADPCM),
@ -28,14 +28,14 @@
# DEC systems (e.g. DECstation 5000) use a variant of the Sun/NeXT format
# that uses little-endian encoding and has a different magic number
0 lelong 0x0064732E DEC audio data:
>12 lelong 1 8-bit ISDN u-law,
>12 lelong 1 8-bit ISDN mu-law,
>12 lelong 2 8-bit linear PCM [REF-PCM],
>12 lelong 3 16-bit linear PCM,
>12 lelong 4 24-bit linear PCM,
>12 lelong 5 32-bit linear PCM,
>12 lelong 6 32-bit IEEE floating point,
>12 lelong 7 64-bit IEEE floating point,
>12 lelong 23 8-bit ISDN u-law compressed (CCITT G.721 ADPCM voice data encoding),
>12 lelong 23 8-bit ISDN mu-law compressed (CCITT G.721 ADPCM voice data encoding),
>20 lelong 1 mono,
>20 lelong 2 stereo,
>20 lelong 4 quad,
@ -43,8 +43,12 @@
# Creative Labs AUDIO stuff
0 string MThd Standard MIDI data
>9 byte >0 (format %d)
>11 byte >1 using %d tracks
>8 beshort x (format %d)
>10 beshort x using %d track
>10 beshort >1 \bs
>12 beshort&0x7fff x at 1/%d
>12 beshort&0x8000 >0 SMPTE
0 string CTMF Creative Music (CMF) data
0 string SBI SoundBlaster instrument data
0 string Creative\ Voice\ File Creative Labs voice data
@ -72,12 +76,18 @@
# MTM/669/FAR/S3M/ULT/XM format checking [Aaron Eppert, aeppert@dialin.ind.net]
# Oct 31, 1995
0 string MTM MultiTracker Module sound file
# fixed by <doj@cubic.org> 2003-06-24
# Too short...
#0 string MTM MultiTracker Module sound file
#0 string if Composer 669 Module sound data
0 string FAR Module sound data
#0 string JN Composer 669 Module sound data (extended format)
0 string MAS_U ULT(imate) Module sound data
#0 string FAR Module sound data
#>4 string >\15 Title: "%s"
0x2c string SCRM ScreamTracker III Module sound data
0 string Extended Module Extended Module sound data
>0 string >\0 Title: "%s"
# Gravis UltraSound patches
# From <ache@nagual.ru>
@ -88,37 +98,68 @@
#
# Taken from loader code from mikmod version 2.14
# by Steve McIntyre (stevem@chiark.greenend.org.uk)
0 string JN extended 669 module data
# <doj@cubic.org> added title printing on 2003-06-24
0 string MAS_UTrack_V00
>14 string >/0 ultratracker V1.%.1s module sound data
0 string UN05 MikMod UNI format module sound data
0 string Extended\ Module: Fasttracker II module sound data
21 string !SCREAM! Screamtracker 2 module sound data
>17 string >\0 Title: "%s"
21 string/c !SCREAM! Screamtracker 2 module sound data
21 string BMOD2STM Screamtracker 2 module sound data
1080 string M.K. 4-channel Protracker module sound data
>0 string >\0 Title: "%s"
1080 string M!K! 4-channel Protracker module sound data
>0 string >\0 Title: "%s"
1080 string FLT4 4-channel Startracker module sound data
>0 string >\0 Title: "%s"
1080 string FLT8 8-channel Startracker module sound data
>0 string >\0 Title: "%s"
1080 string 4CHN 4-channel Fasttracker module sound data
>0 string >\0 Title: "%s"
1080 string 6CHN 6-channel Fasttracker module sound data
>0 string >\0 Title: "%s"
1080 string 8CHN 8-channel Fasttracker module sound data
1080 string CD81 8-channel Oktalyzer module sound data
>0 string >\0 Title: "%s"
1080 string CD81 8-channel Octalyser module sound data
>0 string >\0 Title: "%s"
1080 string OKTA 8-channel Oktalyzer module sound data
>0 string >\0 Title: "%s"
# Not good enough.
#1082 string CH
#>1080 string >/0 %.2s-channel Fasttracker "oktalyzer" module sound data
1080 string 16CN 16-channel Taketracker module sound data
>0 string >\0 Title: "%s"
1080 string 32CN 32-channel Taketracker module sound data
>0 string >\0 Title: "%s"
# TOC sound files -Trevor Johnson <trevor@jpj.net>
#
0 string TOC TOC sound file
# sidfiles <pooka@iki.fi>
# added name,author,(c) and new RSID type by <doj@cubic.org> 2003-06-24
0 string SIDPLAY\ INFOFILE Sidplay info file
0 string PSID PlaySID v2.2+ (AMIGA) sidtune
>4 beshort >0 w/ header v%d,
>14 beshort =1 single song,
>14 beshort >1 %d songs,
>16 beshort >0 default song: %d
>0x16 string >\0 name: "%s"
>0x36 string >\0 author: "%s"
>0x56 string >\0 copyright: "%s"
0 string RSID RSID sidtune PlaySID compatible
>4 beshort >0 w/ header v%d,
>14 beshort =1 single song,
>14 beshort >1 %d songs,
>16 beshort >0 default song: %d
>0x16 string >\0 name: "%s"
>0x36 string >\0 author: "%s"
>0x56 string >\0 copyright: "%s"
# IRCAM <mpruett@sgi.com>
# VAX and MIPS files are little-endian; Sun and NeXT are big-endian
@ -133,8 +174,25 @@
# Sample Vision <mpruett@sgi.com>
0 string SOUND\ SAMPLE\ DATA\ Sample Vision file
# Audio Visual Research <mpruett@sgi.com>
0 string 2BIT Audio Visual Research file
# Audio Visual Research <tonigonenstein@users.sourceforge.net>
0 string 2BIT Audio Visual Research file,
>12 beshort =0 mono,
>12 beshort =-1 stereo,
>14 beshort x %d bits
>16 beshort =0 unsigned,
>16 beshort =-1 signed,
>22 belong&0x00ffffff x %d Hz,
>18 beshort =0 no loop,
>18 beshort =-1 loop,
>21 ubyte <=127 note %d,
>22 byte =0 replay 5.485 KHz
>22 byte =1 replay 8.084 KHz
>22 byte =2 replay 10.971 Khz
>22 byte =3 replay 16.168 Khz
>22 byte =4 replay 21.942 KHz
>22 byte =5 replay 32.336 KHz
>22 byte =6 replay 43.885 KHz
>22 byte =7 replay 47.261 KHz
# SGI SoundTrack <mpruett@sgi.com>
0 string _SGI_SoundTrack SGI SoundTrack project file
@ -230,6 +288,29 @@
0 string FTMN FaceTheMusic module
>16 string >\0d \b, "%s"
# From: <doj@cubic.org> 2003-06-24
0 string AMShdr\32 Velvet Studio AMS Module v2.2
0 string Extreme Extreme Tracker AMS Module v1.3
0 string DDMF Xtracker DMF Module
>4 byte x v%i
>0xD string >\0 Title: "%s"
>0x2B string >\0 Composer: "%s"
0 string DSM\32 Dynamic Studio Module DSM
0 string SONG DigiTrekker DTM Module
0 string DMDL DigiTrakker MDL Module
0 string PSM\32 Protracker Studio PSM Module
44 string PTMF Poly Tracker PTM Module
>0 string >\32 Title: "%s"
0 string MT20 MadTracker 2.0 Module MT2
0 string RAD\40by\40REALiTY!! RAD Adlib Tracker Module RAD
0 string RTMM RTM Module
0x426 string MaDoKaN96 XMS Adlib Module
>0 string >\0 Composer: "%s"
0 string AMF AMF Module
>4 string >\0 Title: "%s"
0 string MODINFO1 Open Cubic Player Module Inforation MDZ
0 string Extended\40Instrument: Fast Tracker II Instrument
# From: Takeshi Hamasaki <hma@syd.odn.ne.jp>
# NOA Nancy Codec file
0 string \210NOA\015\012\032 NOA Nancy Codec Movie file
@ -240,7 +321,56 @@
>20 string Ver01.00 Ver. 1.00
>>32 byte x , %d tracks
# FLAC audio stream <URL:http://flac.sourceforge.net/>
# From: Dan Fandrich <dan@coneharvesters.com>
0 string fLaC FLAC audio stream data
# Free lossless audio codec <http://flac.sourceforge.net>
# From: Przemyslaw Augustyniak <silvathraec@rpg.pl>
0 string fLaC FLAC audio bitstream data
>4 byte&0x7f >0 \b, unknown version
>4 byte&0x7f 0 \b
# some common bits/sample values
>>20 beshort&0x1f0 0x030 \b, 4 bit
>>20 beshort&0x1f0 0x050 \b, 6 bit
>>20 beshort&0x1f0 0x070 \b, 8 bit
>>20 beshort&0x1f0 0x0b0 \b, 12 bit
>>20 beshort&0x1f0 0x0f0 \b, 16 bit
>>20 beshort&0x1f0 0x170 \b, 24 bit
>>20 byte&0xe 0x0 \b, mono
>>20 byte&0xe 0x2 \b, stereo
>>20 byte&0xe 0x4 \b, 3 channels
>>20 byte&0xe 0x6 \b, 4 channels
>>20 byte&0xe 0x8 \b, 5 channels
>>20 byte&0xe 0xa \b, 6 channels
>>20 byte&0xe 0xc \b, 7 channels
>>20 byte&0xe 0xe \b, 8 channels
# some common sample rates
>>17 belong&0xfffff0 0x0ac440 \b, 44.1 kHz
>>17 belong&0xfffff0 0x0bb800 \b, 48 kHz
>>17 belong&0xfffff0 0x07d000 \b, 32 kHz
>>17 belong&0xfffff0 0x056220 \b, 22.05 kHz
>>17 belong&0xfffff0 0x05dc00 \b, 24 kHz
>>17 belong&0xfffff0 0x03e800 \b, 16 kHz
>>17 belong&0xfffff0 0x02b110 \b, 11.025 kHz
>>17 belong&0xfffff0 0x02ee00 \b, 12 kHz
>>17 belong&0xfffff0 0x01f400 \b, 8 kHz
>>17 belong&0xfffff0 0x177000 \b, 96 kHz
>>17 belong&0xfffff0 0x0fa000 \b, 64 kHz
>>21 byte&0xf >0 \b, >4G samples
>>21 byte&0xf 0 \b
>>>22 belong >0 \b, %u samples
>>>22 belong 0 \b, length unknown
# (ISDN) VBOX voice message file (Wolfram Kleff)
0 string VBOX VBOX voice message data
# ReBorn Song Files (.rbs)
# David J. Singer <doc@deadvirgins.org.uk>
8 string RB40 RBS Song file
>29 string ReBorn created by ReBorn
>37 string Propellerhead created by ReBirth
# Synthesizer Generator and Kimwitu share their file format
0 string A#S#C#S#S#L#V#3 Synthesizer Generator or Kimwitu data
# Kimwitu++ uses a slightly different magic
0 string A#S#C#S#S#L#HUB Kimwitu++ data
# From "Simon Hosie
0 string TFMX-SONG TFMX module sound data

View File

@ -10,7 +10,7 @@
# this first will upset you if you're a PL/1 shop...
# in which case rm it; ascmagic will catch real C programs
#0 string /* C or REXX program text
0 string // C++ program text
#0 string // C++ program text
# From: Mikhail Teterin <mi@aldan.algebra.com>
0 string cscope cscope reference data

27
file/magic/Magdir/c64 Normal file
View File

@ -0,0 +1,27 @@
#------------------------------------------------------------------------------
# c64: file(1) magic for various commodore 64 related files
#
# From <doj@cubic.org>
0x16500 belong 0x12014100 D64 Image
0x16500 belong 0x12014180 D71 Image
0x61800 belong 0x28034400 D81 Image
0 string C64\40CARTRIDGE CCS C64 Emultar Cartridge Image
0 belong 0x43154164 X64 Image
0 string GCR-1541 GCR Image
>8 byte x version: $i
>9 byte x tracks: %i
9 string PSUR ARC archive (c64)
2 string -LH1- LHA archive (c64)
0 string C64File PC64 Emulator file
>8 string >\0 "%s"
0 string C64Image PC64 Freezer Image
0 beshort 0x38CD C64 PCLink Image
0 string CBM\144\0\0 Power 64 C64 Emulator Snapshot
0 belong 0xFF424CFF WRAptor packer (c64)

36
file/magic/Magdir/cad Normal file
View File

@ -0,0 +1,36 @@
#------------------------------------------------------------------------------
# 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)
# Written October 30, 2003 by Lester Hightower
# DGN is the default file extension of Microstation/Intergraph CAD files.
# CIT is the proprietary raster format (similar to TIFF) used to attach
# raster underlays to Microstation DGN (vector) drawings.
#
# http://www.wotsit.org/search.asp
# http://filext.com/detaillist.php?extdetail=DGN
# http://filext.com/detaillist.php?extdetail=CIT
#
# http://www.bentley.com/products/default.cfm?objectid=97F351F5-9C35-4E5E-89C2
# 3F86C928&method=display&p_objectid=97F351F5-9C35-4E5E-89C280A93F86C928
# http://www.bentley.com/products/default.cfm?objectid=A5C2FD43-3AC9-4C71-B682
# 721C479F&method=display&p_objectid=A5C2FD43-3AC9-4C71-B682C7BE721C479F
0 string \010\011\376 Microstation
>3 string \002
>>30 string \372\104 DGN File
>>30 string \172\104 DGN File
>>30 string \026\105 DGN File
>4 string \030\000\000 CIT File
# AutoCad, from Nahuel Greco
0 string AC1012 AutoCad (release 12)
0 string AC1014 AutoCad (release 14)

View File

@ -13,8 +13,8 @@
#
# zsh/ash/ae/nawk/gawk magic from cameron@cs.unsw.oz.au (Cameron Simpson)
0 string/b #!\ /bin Paul Falstad's zsh script text executable
0 string/b #!\ /usr/bin Paul Falstad's zsh script text executable
0 string/b #!\ /bin/zsh Paul Falstad's zsh script text executable
0 string/b #!\ /usr/bin/zsh Paul Falstad's zsh script text executable
0 string/b #!\ /usr/local/bin/zsh Paul Falstad's zsh script text executable
0 string/b #!\ /usr/local/bin/ash Neil Brown's ash script text executable
0 string/b #!\ /usr/local/bin/ae Neil Brown's ae script text executable
@ -42,17 +42,6 @@
0 string #!\ /usr/bin/env a
>16 string >\0 %s script text executable
# generic shell magic
0 string #!\ / a
>3 string >\0 %s script text executable
0 string #!\ / a
>3 string >\0 %s script text executable
0 string #!/ a
>2 string >\0 %s script text executable
0 string #!\ script text executable
>3 string >\0 for %s
# PHP scripts
# Ulf Harnhammar <ulfh@update.uu.se>
0 string/c =<?php PHP script text

View File

@ -0,0 +1,21 @@
#----------------------------------------------------------------------------
# communcation
# TTCN is the Tree and Tabular Combined Notation described in ISO 9646-3.
# It is used for conformance testing of communication protocols.
# Added by W. Borgert <debacle@debian.org>.
0 string $Suite TTCN Abstract Test Suite
>&1 string $SuiteId
>>&1 string >\n %s
>&2 string $SuiteId
>>&1 string >\n %s
>&3 string $SuiteId
>>&1 string >\n %s
# MSC (message sequence charts) are a formal description technique,
# described in ITU-T Z.120, mainly used for communication protocols.
# Added by W. Borgert <debacle@debian.org>.
0 string mscdocument Message Sequence Chart (document)
0 string msc Message Sequence Chart (chart)
0 string submsc Message Sequence Chart (subchart)

View File

@ -46,10 +46,8 @@
>2 belong >1 \b, %d characters originally
>2 belong =1 \b, %d character originally
#
# This magic number is byte-order-independent. XXX - Does that mean this
# is big-endian, little-endian, either, or that you can't tell?
# this short is valid for SunOS
0 short 017437 old packed data
# This magic number is byte-order-independent.
0 short 0x1f1f old packed data
# XXX - why *two* entries for "compacted data", one of which is
# byte-order independent, and one of which is byte-order dependent?
@ -169,3 +167,6 @@
0 string 7z\274\257\047\034 7z archive data,
>6 byte x version %d
>7 byte x \b.%d
# AFX compressed files (Wolfram Kleff)
2 string -afx- AFX compressed file data

View File

@ -119,4 +119,37 @@
#------------------------------------------------------------------------------
# msx: file(1) magic for MSX game cartridge dumps
0 beshort 0x4142 MSX game cartridge dump
# Too simple - MPi
#0 beshort 0x4142 MSX game cartridge dump
#------------------------------------------------------------------------------
# Sony Playstation executables (Adam Sjoegren <asjo@diku.dk>) :
0 string PS-X\ EXE Sony Playstation executable
# Area:
>113 string x (%s)
#------------------------------------------------------------------------------
# Microsoft Xbox executables .xbe (Esa Hyytiä <ehyytia@cc.hut.fi>)
0 string XBEH XBE, Microsoft Xbox executable
# probabilistic checks whether signed or not
>0x0004 ulelong =0x0
>>&2 ulelong =0x0
>>>&2 ulelong =0x0 \b, not signed
>0x0004 ulelong >0
>>&2 ulelong >0
>>>&2 ulelong >0 \b, signed
# expect base address of 0x10000
>0x0104 ulelong =0x10000
>>(0x0118-0x0FF60) ulelong&0x80000007 0x80000007 \b, all regions
>>(0x0118-0x0FF60) ulelong&0x80000007 !0x80000007
>>>(0x0118-0x0FF60) ulelong >0 (regions:
>>>>(0x0118-0x0FF60) ulelong &0x00000001 NA
>>>>(0x0118-0x0FF60) ulelong &0x00000002 Japan
>>>>(0x0118-0x0FF60) ulelong &0x00000004 Rest_of_World
>>>>(0x0118-0x0FF60) ulelong &0x80000000 Manufacturer
>>>(0x0118-0x0FF60) ulelong >0 \b)
# --------------------------------
# Microsoft Xbox data file formats
0 string XIP0 XIP, Microsoft Xbox data
0 string XTF0 XTF, Microsoft Xbox data

10
file/magic/Magdir/dact Normal file
View File

@ -0,0 +1,10 @@
#------------------------------------------------------------------------------
# dact: file(1) magic for DACT compressed files
#
0 long 0x444354C3 DACT compressed data
>4 byte >-1 (version %i.
>5 byte >-1 $BS%i.
>6 byte >-1 $BS%i)
>7 long >0 $BS, original size: %i bytes
>15 long >30 $BS, block size: %i bytes

View File

@ -78,3 +78,126 @@
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
#>>>0x04 lelong 0 (no records)
#>>>0x04 lelong >0 (%ld records)
#
#0 byte 0x03
#>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
#>8 leshort >0
#>>12 leshort 0 dBASE IV no memo file
#>>>0x04 lelong 0 (no records)
#>>>0x04 lelong >0 (%ld records)
#
#0 byte 0x05
#>8 leshort >0
#>>12 leshort 0 dBASE V no memo file
#>>>0x04 lelong 0 (no records)
#>>>0x04 lelong >0 (%ld records)
#
#0 byte 0x30
#>8 leshort >0
#>>12 leshort 0 Visual FoxPro
#>>>0x04 lelong 0 (no records)
#>>>0x04 lelong >0 (%ld records)
#
#0 byte 0x43
#>8 leshort >0
#>>12 leshort 0 FlagShip with memo var size
#>>>0x04 lelong 0 (no records)
#>>>0x04 lelong >0 (%ld records)
#
#0 byte 0x7b
#>8 leshort >0
#>>12 leshort 0 dBASEIV with memo
#>>>0x04 lelong 0 (no records)
#>>>0x04 lelong >0 (%ld records)
#
#0 byte 0x83
#>8 leshort >0
#>>12 leshort 0 FoxBase+, dBaseIII+ with memo
#>>>0x04 lelong 0 (no records)
#>>>0x04 lelong >0 (%ld records)
#
#0 byte 0x8b
#>8 leshort >0
#>>12 leshort 0 dBaseIV with memo
#>>>0x04 lelong 0 (no records)
#>>>0x04 lelong >0 (%ld records)
#
#0 byte 0x8e
#>8 leshort >0
#>>12 leshort 0 dBaseIV with SQL Table
#>>>0x04 lelong 0 (no records)
#>>>0x04 lelong >0 (%ld records)
#
#0 byte 0xb3
#>8 leshort >0
#>>12 leshort 0 FlagShip with .dbt memo
#>>>0x04 lelong 0 (no records)
#>>>0x04 lelong >0 (%ld records)
#
#0 byte 0xf5
#>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
# 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

View File

@ -12,7 +12,12 @@
>4 byte 0 invalid class
>4 byte 1 32-bit
# only for MIPS - in the future, the ABI field of e_flags should be used.
>>18 leshort 8
>>>36 lelong &0x20 N32
>>18 leshort 10
>>>36 lelong &0x20 N32
>>18 beshort 8
>>>36 belong &0x20 N32
>>18 beshort 10
>>>36 belong &0x20 N32
>4 byte 2 64-bit
@ -77,12 +82,14 @@
>>18 leshort 17 Fujitsu VPP500,
>>18 leshort 18 SPARC32PLUS,
>>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 Hitachi SH,
>>18 leshort 43 SPARC V9 - invalid byte order,
>>18 leshort 44 Siemens Tricore Embedded Processor,
@ -91,7 +98,7 @@
>>18 leshort 47 Hitachi H8/300H,
>>18 leshort 48 Hitachi H8S,
>>18 leshort 49 Hitachi H8/500,
>>18 leshort 50 IA-64,
>>18 leshort 50 IA-64 (Intel 64 bit architecture)
>>18 leshort 51 Stanford MIPS-X,
>>18 leshort 52 Motorola Coldfire,
>>18 leshort 53 Motorola M68HC12,
@ -162,6 +169,7 @@
>>>36 belong&0xffff00 &0x000800 Sun UltraSPARC3 Extensions Required,
>>18 beshort 20 PowerPC or cisco 4500,
>>18 beshort 21 cisco 7500,
>>18 beshort 22 IBM S/390,
>>18 beshort 24 cisco SVIP,
>>18 beshort 25 cisco 7200,
>>18 beshort 36 NEC V800 or cisco 12000,
@ -178,7 +186,7 @@
>>18 beshort 47 Hitachi H8/300H,
>>18 beshort 48 Hitachi H8S,
>>18 beshort 49 Hitachi H8/500,
>>18 beshort 50 IA-64,
>>18 beshort 50 Intel Merced Processor,
>>18 beshort 51 Stanford MIPS-X,
>>18 beshort 52 Motorola Coldfire,
>>18 beshort 53 Motorola M68HC12,
@ -186,10 +194,14 @@
>>18 beshort 75 Digital VAX,
>>18 beshort 97 NatSemi 32k,
>>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
>8 string >\0 (%s)
# 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)

8
file/magic/Magdir/fcs Normal file
View File

@ -0,0 +1,8 @@
#------------------------------------------------------------------------------
# fcs: file(1) magic for FCS (Flow Cytometry Standard) data files
# From Roger Leigh <roger@whinlatter.uklinux.net>
0 string FCS1.0 Flow Cytometry Standard (FCS) data, version 1.0
0 string FCS2.0 Flow Cytometry Standard (FCS) data, version 2.0
0 string FCS3.0 Flow Cytometry Standard (FCS) data, version 3.0

View File

@ -205,8 +205,8 @@
# SGI XFS filesystem - Nathan Scott <nathans@debian.org>
0 belong 0x58465342 SGI XFS filesystem data
>0x4 belong x (blksz=3D%d,
>0x68 beshort x inosz=3D%d,
>0x4 belong x (blksz %d,
>0x68 beshort x inosz %d,
>0x64 beshort ^0x2004 v1 dirs)
>0x64 beshort &0x2004 v2 dirs)
@ -276,5 +276,62 @@
# CDROM Filesystems
32769 string CD001 ISO 9660 CD-ROM filesystem data
# "application id" which appears to be used as a volume label
>32808 string >\0 '%s'
>34816 string \000CD001\001EL\ TORITO\ SPECIFICATION (bootable)
37633 string CD001 ISO 9660 CD-ROM filesystem data (raw 2352 byte sectors)
32776 string CDROM High Sierra CD-ROM filesystem data
# cramfs filesystem - russell@coker.com.au
0 lelong 0x28cd3d45 Linux Compressed ROM File System data, little endian
>4 lelong x size %d
>8 lelong &1 version #2
>8 lelong &2 sorted_dirs
>8 lelong &4 hole_support
>32 lelong x CRC 0x%x,
>36 lelong x edition %d,
>40 lelong x %d blocks,
>44 lelong x %d files
0 belong 0x28cd3d45 Linux Compressed ROM File System data, big endian
>4 belong x size %d
>8 belong &1 version #2
>8 belong &2 sorted_dirs
>8 belong &4 hole_support
>32 belong x CRC 0x%x,
>36 belong x edition %d,
>40 belong x %d blocks,
>44 belong x %d files
# reiserfs - russell@coker.com.au
0x10034 string ReIsErFs ReiserFS V3.5
0x10034 string ReIsEr2Fs ReiserFS V3.6
>0x1002c leshort x block size %d
>0x10032 leshort &2 (mounted or unclean)
>0x10000 lelong x num blocks %d
>0x10040 lelong 1 tea hash
>0x10040 lelong 2 yura hash
>0x10040 lelong 3 r5 hash
# JFFS - russell@coker.com.au
0 lelong 0x34383931 Linux Journalled Flash File system, little endian
0 belong 0x34383931 Linux Journalled Flash File system, big endian
# EST flat binary format (which isn't, but anyway)
# From: Mark Brown <broonie@sirena.org.uk>
0 string ESTFBINR EST flat binary
# Aculab VoIP firmware
# From: Mark Brown <broonie@sirena.org.uk>
0 string VoIP\ Startup\ and Aculab VoIP firmware
>35 string x format %s
# PPCBoot image file
# From: Mark Brown <broonie@sirena.org.uk>
0 belong 0x27051956 PPCBoot image
>4 string PPCBoot
>>12 string x version %s
# JFFS2 file system
0 leshort 0x1984 Linux old jffs2 filesystem data little endian
0 lelong 0xe0011985 Linux jffs2 filesystem data little endian

View File

@ -8,6 +8,8 @@
#
0 string FWS Macromedia Flash data,
>3 byte x version %d
0 string CWS Macromedia Flash data (compressed),
>3 byte x version %d
#
# From Dave Wilson
0 string AGD4\xbe\xb8\xbb\xcb\x00 Macromedia Freehand 9 Document

View File

@ -7,9 +7,9 @@
0 short 017001 byte-swapped Berkeley vfont data
# PostScript fonts (must precede "printer" entries), quinlan@yggdrasil.com
0 string %!PS-AdobeFont-1.0 PostScript Type 1 font text
0 string %!PS-AdobeFont-1. PostScript Type 1 font text
>20 string >\0 (%s)
6 string %!PS-AdobeFont-1.0 PostScript Type 1 font program data
6 string %!PS-AdobeFont-1. PostScript Type 1 font program data
# X11 font files in SNF (Server Natural Format) format
0 belong 00000004 X11 SNF font data, MSB first
@ -49,3 +49,13 @@
# downloadable fonts for browser (prints type) anthon@mnt.org
0 string PFR1 PFR1 font
>102 string >0 \b: %s
# True Type fonts
0 string \000\001\000\000\000 TrueType font data
0 string \007\001\001\000Copyright\ (c)\ 199 Adobe Multiple Master font
0 string \012\001\001\000Copyright\ (c)\ 199 Adobe Multiple Master font
# Opentype font data from Avi Bercovich
0 string OTTO OpenType font data

157
file/magic/Magdir/games Normal file
View File

@ -0,0 +1,157 @@
#------------------------------------------------------------------------------
# games: file(1) for games
# Thomas M. Ott (ThMO)
1 string =WAD DOOM data,
>0 string =I main wad
>0 string =P patch wad
>0 byte x unknown junk
# Fabio Bonelli <fabiobonelli@libero.it>
# Quake II - III data files
0 string IDP2 Quake II 3D Model file,
>20 long x %lu skin(s),
>8 long x (%lu x
>12 long x %lu),
>40 long x %lu frame(s),
>16 long x Frame size %lu bytes,
>24 long x %lu vertices/frame,
>28 long x %lu texture coordinates,
>32 long x %lu triangles/frame
0 string IBSP Quake
>4 long 0x26 II Map file (BSP)
>4 long 0x2E III Map file (BSP)
0 string IDS2 Quake II SP2 sprite file
#---------------------------------------------------------------------------
# Doom and Quake
# submitted by Nicolas Patrois
# DOOM
0 string IWAD DOOM or DOOM ][ world
0 string PWAD DOOM or DOOM ][ extension world
0 string \xcb\x1dBoom\xe6\xff\x03\x01 Boom or linuxdoom demo
# some doom lmp files don't match, I've got one beginning with \x6d\x02\x01\x01
24 string LxD\ 203 Linuxdoom save
>0 string x , name=%s
>44 string x , world=%s
# Quake
0 string PACK Quake I or II world or extension
#0 string -1\x0a Quake I demo
#>30 string x version %.4s
#>61 string x level %s
#0 string 5\x0a Quake I save
# The levels
# Quake 1
0 string 5\x0aIntroduction Quake I save: start Introduction
0 string 5\x0athe_Slipgate_Complex Quake I save: e1m1 The slipgate complex
0 string 5\x0aCastle_of_the_Damned Quake I save: e1m2 Castle of the damned
0 string 5\x0athe_Necropolis Quake I save: e1m3 The necropolis
0 string 5\x0athe_Grisly_Grotto Quake I save: e1m4 The grisly grotto
0 string 5\x0aZiggurat_Vertigo Quake I save: e1m8 Ziggurat vertigo (secret)
0 string 5\x0aGloom_Keep Quake I save: e1m5 Gloom keep
0 string 5\x0aThe_Door_To_Chthon Quake I save: e1m6 The door to Chthon
0 string 5\x0aThe_House_of_Chthon Quake I save: e1m7 The house of Chthon
0 string 5\x0athe_Installation Quake I save: e2m1 The installation
0 string 5\x0athe_Ogre_Citadel Quake I save: e2m2 The ogre citadel
0 string 5\x0athe_Crypt_of_Decay Quake I save: e2m3 The crypt of decay (dopefish lives!)
0 string 5\x0aUnderearth Quake I save: e2m7 Underearth (secret)
0 string 5\x0athe_Ebon_Fortress Quake I save: e2m4 The ebon fortress
0 string 5\x0athe_Wizard's_Manse Quake I save: e2m5 The wizard's manse
0 string 5\x0athe_Dismal_Oubliette Quake I save: e2m6 The dismal oubliette
0 string 5\x0aTermination_Central Quake I save: e3m1 Termination central
0 string 5\x0aVaults_of_Zin Quake I save: e3m2 Vaults of Zin
0 string 5\x0athe_Tomb_of_Terror Quake I save: e3m3 The tomb of terror
0 string 5\x0aSatan's_Dark_Delight Quake I save: e3m4 Satan's dark delight
0 string 5\x0athe_Haunted_Halls Quake I save: e3m7 The haunted halls (secret)
0 string 5\x0aWind_Tunnels Quake I save: e3m5 Wind tunnels
0 string 5\x0aChambers_of_Torment Quake I save: e3m6 Chambers of torment
0 string 5\x0athe_Sewage_System Quake I save: e4m1 The sewage system
0 string 5\x0aThe_Tower_of_Despair Quake I save: e4m2 The tower of despair
0 string 5\x0aThe_Elder_God_Shrine Quake I save: e4m3 The elder god shrine
0 string 5\x0athe_Palace_of_Hate Quake I save: e4m4 The palace of hate
0 string 5\x0aHell's_Atrium Quake I save: e4m5 Hell's atrium
0 string 5\x0athe_Nameless_City Quake I save: e4m8 The nameless city (secret)
0 string 5\x0aThe_Pain_Maze Quake I save: e4m6 The pain maze
0 string 5\x0aAzure_Agony Quake I save: e4m7 Azure agony
0 string 5\x0aShub-Niggurath's_Pit Quake I save: end Shub-Niggurath's pit
# Quake DeathMatch levels
0 string 5\x0aPlace_of_Two_Deaths Quake I save: dm1 Place of two deaths
0 string 5\x0aClaustrophobopolis Quake I save: dm2 Claustrophobopolis
0 string 5\x0aThe_Abandoned_Base Quake I save: dm3 The abandoned base
0 string 5\x0aThe_Bad_Place Quake I save: dm4 The bad place
0 string 5\x0aThe_Cistern Quake I save: dm5 The cistern
0 string 5\x0aThe_Dark_Zone Quake I save: dm6 The dark zone
# Scourge of Armagon
0 string 5\x0aCommand_HQ Quake I save: start Command HQ
0 string 5\x0aThe_Pumping_Station Quake I save: hip1m1 The pumping station
0 string 5\x0aStorage_Facility Quake I save: hip1m2 Storage facility
0 string 5\x0aMilitary_Complex Quake I save: hip1m5 Military complex (secret)
0 string 5\x0athe_Lost_Mine Quake I save: hip1m3 The lost mine
0 string 5\x0aResearch_Facility Quake I save: hip1m4 Research facility
0 string 5\x0aAncient_Realms Quake I save: hip2m1 Ancient realms
0 string 5\x0aThe_Gremlin's_Domain Quake I save: hip2m6 The gremlin's domain (secret)
0 string 5\x0aThe_Black_Cathedral Quake I save: hip2m2 The black cathedral
0 string 5\x0aThe_Catacombs Quake I save: hip2m3 The catacombs
0 string 5\x0athe_Crypt__ Quake I save: hip2m4 The crypt
0 string 5\x0aMortum's_Keep Quake I save: hip2m5 Mortum's keep
0 string 5\x0aTur_Torment Quake I save: hip3m1 Tur torment
0 string 5\x0aPandemonium Quake I save: hip3m2 Pandemonium
0 string 5\x0aLimbo Quake I save: hip3m3 Limbo
0 string 5\x0athe_Edge_of_Oblivion Quake I save: hipdm1 The edge of oblivion (secret)
0 string 5\x0aThe_Gauntlet Quake I save: hip3m4 The gauntlet
0 string 5\x0aArmagon's_Lair Quake I save: hipend Armagon's lair
# Malice
0 string 5\x0aThe_Academy Quake I save: start The academy
0 string 5\x0aThe_Lab Quake I save: d1 The lab
0 string 5\x0aArea_33 Quake I save: d1b Area 33
0 string 5\x0aSECRET_MISSIONS Quake I save: d3b Secret missions
0 string 5\x0aThe_Hospital Quake I save: d10 The hospital (secret)
0 string 5\x0aThe_Genetics_Lab Quake I save: d11 The genetics lab (secret)
0 string 5\x0aBACK_2_MALICE Quake I save: d4b Back to Malice
0 string 5\x0aArea44 Quake I save: d1c Area 44
0 string 5\x0aTakahiro_Towers Quake I save: d2 Takahiro towers
0 string 5\x0aA_Rat's_Life Quake I save: d3 A rat's life
0 string 5\x0aInto_The_Flood Quake I save: d4 Into the flood
0 string 5\x0aThe_Flood Quake I save: d5 The flood
0 string 5\x0aNuclear_Plant Quake I save: d6 Nuclear plant
0 string 5\x0aThe_Incinerator_Plant Quake I save: d7 The incinerator plant
0 string 5\x0aThe_Foundry Quake I save: d7b The foundry
0 string 5\x0aThe_Underwater_Base Quake I save: d8 The underwater base
0 string 5\x0aTakahiro_Base Quake I save: d9 Takahiro base
0 string 5\x0aTakahiro_Laboratories Quake I save: d12 Takahiro laboratories
0 string 5\x0aStayin'_Alive Quake I save: d13 Stayin' alive
0 string 5\x0aB.O.S.S._HQ Quake I save: d14 B.O.S.S. HQ
0 string 5\x0aSHOWDOWN! Quake I save: d15 Showdown!
# Malice DeathMatch levels
0 string 5\x0aThe_Seventh_Precinct Quake I save: ddm1 The seventh precinct
0 string 5\x0aSub_Station Quake I save: ddm2 Sub station
0 string 5\x0aCrazy_Eights! Quake I save: ddm3 Crazy eights!
0 string 5\x0aEast_Side_Invertationa Quake I save: ddm4 East side invertationa
0 string 5\x0aSlaughterhouse Quake I save: ddm5 Slaughterhouse
0 string 5\x0aDOMINO Quake I save: ddm6 Domino
0 string 5\x0aSANDRA'S_LADDER Quake I save: ddm7 Sandra's ladder
0 string MComprHD MAME CHD compressed hard disk image,
>12 belong x version %lu

16
file/magic/Magdir/gcc Normal file
View File

@ -0,0 +1,16 @@
#------------------------------------------------------------------------------
# gcc: file(1) magic for GCC special files
#
0 string gpch GCC precompiled header
# The version field is annoying. It's 3 characters, not zero-terminated.
>5 byte x (version %c
>6 byte x \b%c
>7 byte x \b%c)
# 67 = 'C', 111 = 'o', 43 = '+', 79 = 'O'
>4 byte 67 for C
>4 byte 111 for Objective C
>4 byte 43 for C++
>4 byte 79 for Objective C++

19
file/magic/Magdir/geos Normal file
View File

@ -0,0 +1,19 @@
#------------------------------------------------------------------------------
# GEOS files (Vidar Madsen, vidar@gimp.org)
# semi-commonly used in embedded and handheld systems.
0 belong 0xc745c153 GEOS
>40 byte 1 executable
>40 byte 2 VMFile
>40 byte 3 binary
>40 byte 4 directory label
>40 byte <1 unknown
>40 byte >4 unknown
>4 string >\0 \b, name "%s"
#>44 short x \b, version %d
#>46 short x \b.%d
#>48 short x \b, rev %d
#>50 short x \b.%d
#>52 short x \b, proto %d
#>54 short x \br%d
#>168 string >\0 \b, copyright "%s"

View File

@ -10,3 +10,33 @@
# message catalogs, from Mitchum DSouza <m.dsouza@mrc-apu.cam.ac.uk>
0 string *nazgul* Nazgul style compiled message catalog
>8 lelong >0 \b, version %ld
# GnuPG
# The format is very similar to pgp
0 string \001gpg GPG key trust database
>4 byte x version %d
0 beshort 0x9901 GPG key public ring
# This magic is not particularly good, as the keyrings don't have true
# magic. Nevertheless, it covers many keyrings.
# Gnumeric spreadsheet
# This entry is only semi-helpful, as Gnumeric compresses its files, so
# they will ordinarily reported as "compressed", but at least -z helps
39 string =<gmr:Workbook Gnumeric spreadsheet
#------------------------------------------------------------------------------
# gcc: file(1) magic for GCC special files
#
0 string gpch GCC precompiled header
# The version field is annoying. It's 3 characters, not zero-terminated.
>5 byte x (version %c
>6 byte x \b%c
>7 byte x \b%c)
# 67 = 'C', 111 = 'o', 43 = '+', 79 = 'O'
>4 byte 67 for C
>4 byte 111 for Objective C
>4 byte 43 for C++
>4 byte 79 for Objective C++

View File

@ -1,25 +1,25 @@
#------------------------------------------------------------------------------
# human68k: file(1) magic for Human68k (X680x0 DOS) binary formats
0 string HU Human68k
>68 string LZX LZX compressed
>>72 string >\0 (version %s)
>(8.L+74) string LZX LZX compressed
>>(8.L+78) string >\0 (version %s)
>60 belong >0 binded
>(8.L+66) string #HUPAIR hupair
>0 string HU X executable
>(8.L+74) string #LIBCV1 - linked PD LIBC ver 1
>4 belong >0 - base address 0x%x
>28 belong >0 not stripped
>32 belong >0 with debug information
0 beshort 0x601a Human68k Z executable
0 beshort 0x6000 Human68k object file
0 belong 0xd1000000 Human68k ar binary archive
0 belong 0xd1010000 Human68k ar ascii archive
0 beshort 0x0068 Human68k lib archive
4 string LZX Human68k LZX compressed
>8 string >\0 (version %s)
>4 string LZX R executable
2 string #HUPAIR Human68k hupair R executable
# Magic too short!
#0 string HU Human68k
#>68 string LZX LZX compressed
#>>72 string >\0 (version %s)
#>(8.L+74) string LZX LZX compressed
#>>(8.L+78) string >\0 (version %s)
#>60 belong >0 binded
#>(8.L+66) string #HUPAIR hupair
#>0 string HU X executable
#>(8.L+74) string #LIBCV1 - linked PD LIBC ver 1
#>4 belong >0 - base address 0x%x
#>28 belong >0 not stripped
#>32 belong >0 with debug information
#0 beshort 0x601a Human68k Z executable
#0 beshort 0x6000 Human68k object file
#0 belong 0xd1000000 Human68k ar binary archive
#0 belong 0xd1010000 Human68k ar ascii archive
#0 beshort 0x0068 Human68k lib archive
#4 string LZX Human68k LZX compressed
#>8 string >\0 (version %s)
#>4 string LZX R executable
#2 string #HUPAIR Human68k hupair R executable

View File

@ -15,3 +15,5 @@
0 string 0xabcdef AIX message catalog
0 belong 0x000001f9 AIX compiled message catalog
0 string \<aiaff> archive
0 string \<bigaf> archive (big format)

View File

@ -16,6 +16,8 @@
>8 string AIFC \b, AIFF-C compressed audio
>8 string 8SVX \b, 8SVX 8-bit sampled sound voice
>8 string SAMP \b, SAMP sampled audio
>8 string DTYP \b, DTYP datatype description
>8 string PTCH \b, PTCH binary patch
# image formats
>8 string ILBMBMHD \b, ILBM interleaved image
>>20 beshort x \b, %d x

View File

@ -17,10 +17,16 @@
# `tgatoppm' recognizes a superset (Index may be anything)
1 belong&0xfff7ffff 0x01010000 Targa image data - Map
>2 byte&8 8 - RLE
>12 leshort >0 %hd x
>14 leshort >0 %hd
1 belong&0xfff7ffff 0x00020000 Targa image data - RGB
>2 byte&8 8 - RLE
>12 leshort >0 %hd x
>14 leshort >0 %hd
1 belong&0xfff7ffff 0x00030000 Targa image data - Mono
>2 byte&8 8 - RLE
>12 leshort >0 %hd x
>14 leshort >0 %hd
# PBMPLUS images
# The next byte following the magic is always whitespace.
@ -158,10 +164,11 @@
>>18 lelong x \b, %d x
>>22 lelong x %d x
>>28 leshort x %d
0 string IC PC icon data
0 string PI PC pointer image data
0 string CI PC color icon data
0 string CP PC color pointer image data
# Too simple - MPi
#0 string IC PC icon data
#0 string PI PC pointer image data
#0 string CI PC color icon data
#0 string CP PC color pointer image data
# Conflicts with other entries [BABYL]
#0 string BA PC bitmap array data
@ -269,11 +276,11 @@
# DICOM medical imaging data
128 string DICM DICOM medical imaging data
# XWD - X-Windows Dump file.
# XWD - X Window Dump file.
# As described in /usr/X11R6/include/X11/XWDFile.h
# used by the xwd program.
# Bradford Castalia, idaeim, 1/01
4 belong 7 XWD X-Windows Dump image data
4 belong 7 XWD X Window Dump image data
>100 string >\0 \b, "%s"
>16 belong x \b, %dx
>20 belong x \b%dx
@ -362,3 +369,148 @@
# Adobe Photoshop
0 string 8BPS Adobe Photoshop Image
# XV thumbnail indicator (ThMO)
0 string P7\ 332 XV thumbnail image data
# NITF is defined by United States MIL-STD-2500A
0 string NITF National Imagery Transmission Format
>25 string >\0 dated %.14s
# GEM Image: Version 1, Headerlen 8 (Wolfram Kleff)
0 belong 0x00010008 GEM Image data
>12 beshort x %d x
>14 beshort x %d,
>4 beshort x %d planes,
>8 beshort x %d x
>10 beshort x %d pixelsize
# GEM Metafile (Wolfram Kleff)
0 lelong 0x0018FFFF GEM Metafile data
>4 leshort x version %d
#
# SMJPEG. A custom Motion JPEG format used by Loki Entertainment
# Software Torbjorn Andersson <d91tan@Update.UU.SE>.
#
0 string \0\nSMJPEG SMJPEG
>8 belong x %d.x data
# According to the specification you could find any number of _TXT
# headers here, but I can't think of any way of handling that. None of
# the SMJPEG files I tried it on used this feature. Even if such a
# file is encountered the output should still be reasonable.
>16 string _SND \b,
>>24 beshort >0 %d Hz
>>26 byte 8 8-bit
>>26 byte 16 16-bit
>>28 string NONE uncompressed
# >>28 string APCM ADPCM compressed
>>27 byte 1 mono
>>28 byte 2 stereo
# Help! Isn't there any way to avoid writing this part twice?
>>32 string _VID \b,
# >>>48 string JFIF JPEG
>>>40 belong >0 %d frames
>>>44 beshort >0 (%d x
>>>46 beshort >0 %d)
>16 string _VID \b,
# >>32 string JFIF JPEG
>>24 belong >0 %d frames
>>28 beshort >0 (%d x
>>30 beshort >0 %d)
0 string Paint\ Shop\ Pro\ Image\ File Paint Shop Pro Image File
# "thumbnail file" (icon)
# descended from "xv", but in use by other applications as well (Wolfram Kleff)
0 string P7\ 332 XV "thumbnail file" (icon) data
# taken from fkiss: (<yav@mte.biglobe.ne.jp> ?)
0 string KiSS KISS/GS
>4 byte 16 color
>>5 byte x %d bit
>>8 leshort x %d colors
>>10 leshort x %d groups
>4 byte 32 cell
>>5 byte x %d bit
>>8 leshort x %d x
>>10 leshort x %d
>>12 leshort x +%d
>>14 leshort x +%d
# Webshots (www.webshots.com), by John Harrison
0 string C\253\221g\230\0\0\0 Webshots Desktop .wbz file
# Hercules DASD image files
# From Jan Jaeger <jj@septa.nl>
0 string CKD_P370 Hercules CKD DASD image file
>8 long x \b, %d heads per cylinder
>12 long x \b, track size %d bytes
>16 byte x \b, device type 33%2.2X
0 string CKD_C370 Hercules compressed CKD DASD image file
>8 long x \b, %d heads per cylinder
>12 long x \b, track size %d bytes
>16 byte x \b, device type 33%2.2X
0 string CKD_S370 Hercules CKD DASD shadow file
>8 long x \b, %d heads per cylinder
>12 long x \b, track size %d bytes
>16 byte x \b, device type 33%2.2X
# Squeak images and - etoffi@softhome.net
0 string \146\031\0\0 Squeak image data
0 string 'From\040Squeak Squeak program text
# partimage: file(1) magic for PartImage files (experimental, incomplete)
# Author: Hans-Joachim Baader <hjb@pro-linux.de>
0 string PaRtImAgE-VoLuMe PartImage
>0x0020 string 0.6.1 file version %s
>>0x0060 lelong >-1 volume %ld
#>>0x0064 8 byte identifier
#>>0x007c reserved
>>0x0200 string >\0 type %s
>>0x1400 string >\0 device %s,
>>0x1600 string >\0 original filename %s,
# Some fields omitted
>>0x2744 lelong 0 not compressed
>>0x2744 lelong 1 gzip compressed
>>0x2744 lelong 2 bzip2 compressed
>>0x2744 lelong >2 compressed with unknown algorithm
>0x0020 string >0.6.1 file version %s
>0x0020 string <0.6.1 file version %s
# DCX is multi-page PCX, using a simple header of up to 1024
# offsets for the respective PCX components.
# From: Joerg Wunsch <joerg_wunsch@uriah.heep.sax.de>
0 lelong 987654321 DCX multi-page PCX image data
# Simon Walton <simonw@matteworld.com>
# Kodak Cineon format for scanned negatives
# http://www.kodak.com/US/en/motion/support/dlad/
0 lelong 0xd75f2a80 Cineon image data
>200 belong >0 \b, %ld x
>204 belong >0 %ld
# Bio-Rad .PIC is an image format used by microscope control systems
# and related image processing software used by biologists.
# From: Vebjorn Ljosa <vebjorn@ljosa.com>
54 leshort 12345 Bio-Rad .PIC Image File
>0 leshort >0 %hd x
>2 leshort >0 %hd,
>4 leshort =1 1 image in file
>4 leshort >1 %hd images in file
# From Jan "Yenya" Kasprzak <kas@fi.muni.cz>
# The description of *.mrw format can be found at
# http://www.dalibor.cz/minolta/raw_file_format.htm
0 string \000MRM Minolta Dimage camera raw image data
# From: stephane.loeuillet@tiscali.f
# http://www.djvuzone.org/
0 string AT&TFORM DjVu Image file
# From: Jason Bacon <bacon@smithers.neuro.mcw.edu>
0 beshort 0x3020 character Computer Graphics Metafile

View File

@ -1,18 +0,0 @@
#------------------------------------------------------------------------------
# impulse tracker: file(1) magic for Impulse Tracker data files
#
# From <collver1@attbi.com>
# These are the /etc/magic entries to decode modules, instruments, and
# samples in Impulse Tracker's native format.
0 string IMPS Impulse Tracker Sample
>18 byte &2 16 bit
>18 byte ^2 8 bit
>18 byte &4 stereo
>18 byte ^4 mono
0 string IMPI Impulse Tracker Instrument
>28 leshort !0 ITv%x
>30 byte !0 %d samples
0 string IMPM Impulse Tracker Module
>40 leshort !0 compatible w/ITv%x
>42 leshort !0 created w/ITv%x

View File

@ -33,3 +33,15 @@
0 leshort =0514 80386 COFF executable
>12 lelong >0 not stripped
>22 leshort >0 - version %ld
# rom: file(1) magic for BIOS ROM Extensions found in intel machines
# mapped into memory between 0xC0000 and 0xFFFFF
# From Gürkan Sengün <gurkan@linuks.mine.nu>, www.linuks.mine.nu
0 beshort 0x55AA BIOS (ia32) ROM Ext.
>5 string USB USB
>7 string LDR UNDI image
>30 string IBM IBM comp. Video
>26 string Adaptec Adaptec
>28 string Adaptec Adaptec
>42 string PROMISE Promise
>2 byte x (%d*512)

View File

@ -19,9 +19,9 @@
>11 byte x \b %d.
>12 byte x \b%02d
# Next, the resolution or aspect ratio of the image:
>13 byte 0 \b, aspect ratio
>13 byte 1 \b, resolution (DPI)
>13 byte 2 \b, resolution (DPCM)
#>13 byte 0 \b, aspect ratio
#>13 byte 1 \b, resolution (DPI)
#>13 byte 2 \b, resolution (DPCM)
#>4 beshort x \b, segment length %d
# Next, show thumbnail info, if it exists:
>18 byte !0 \b, thumbnail %dx
@ -54,8 +54,8 @@
# I've commented-out quantisation table reporting. I doubt anyone cares yet.
#>(4.S+5) byte 0xDB \b, quantisation table
#>>(4.S+6) beshort x \b length=%d
>14 beshort x \b, %d x
>16 beshort x \b %d
#>14 beshort x \b, %d x
#>16 beshort x \b %d
# HSI is Handmade Software's proprietary JPEG encoding scheme
0 string hsi1 JPEG image data, HSI proprietary

View File

@ -44,11 +44,6 @@
# this can be overridden by the DOS executable (COM) entry
2 string LILO Linux/i386 LILO boot/chain loader
#
# Debian Packages, from Peter Tobias <tobias@server.et-inf.fho-emden.de>
0 string 0.9
>8 byte 0x0a old Debian Binary Package
>>3 byte >0 \b, created by dpkg 0.9%c
>>4 byte >0 pl%c
# PSF fonts, from H. Peter Anvin <hpa@yggdrasil.com>
0 leshort 0x0436 Linux/i386 PC Screen Font data,
>2 byte 0 256 characters, no directory,
@ -60,6 +55,8 @@
4086 string SWAP-SPACE Linux/i386 swap file
# according to man page of mkswap (8) March 1999
4086 string SWAPSPACE2 Linux/i386 swap file (new style)
>0x400 long x %d (4K pages)
>0x404 long x size %d pages
# ECOFF magic for OSF/1 and Linux (only tested under Linux though)
#
# from Erik Troan (ewt@redhat.com) examining od dumps, so this
@ -79,28 +76,38 @@
# and others such as Axel Kohlmeyer <akohlmey@rincewind.chemie.uni-ulm.de>
# and Nicolás Lichtmaier <nick@debian.org>
# All known start with: b8 c0 07 8e d8 b8 00 90 8e c0 b9 00 01 29 f6 29
# Linux kernel boot images (i386 arch) (Wolfram Kleff)
514 string HdrS Linux kernel
>518 leshort >0
>>529 byte 0 zImage data,
>>529 byte 1 bzImage data,
>0x048c byte 0x31
>>0x048c string x version %s
>0x0493 byte 0x31
>>0x0493 string x version %s
>0x048c byte 0x32
>>0x048c string x version %s
>0x0493 byte 0x32
>>0x0493 string x version %s
>0x04df byte 0x32
>>0x04df string x version %s
>0x04fb byte 0x32
>>0x04fb string x version %s
>510 leshort 0xAA55 x86 boot executable
>>518 leshort >=3D0x200
>>529 byte 0 zImage,
>>>529 byte 1 bzImage,
>>>(526.s+0x200) string >\0 version %s,
>>498 leshort 1 RO-rootFS,
>>498 leshort 0 RW-rootFS,
>>508 leshort >0 root_dev 0x%X,
>>502 leshort >0 swap_dev 0x%X,
>>504 leshort >0 RAMdisksize %u KB,
>>506 leshort 0xFFFF Normal VGA
>>506 leshort 0xFFFE Extended VGA
>>506 leshort 0xFFFD Prompt for Videomode
>>506 leshort >0 Video mode %d
# This also matches new kernels, which were caught above by "HdrS".
0 belong 0xb8c0078e Linux kernel
>0x1e3 string Loading version 1.3.79 or older
>0x1e9 string Loading from prehistoric times
# LSM entries - Nicolás Lichtmaier <nick@feedback.net.ar>
# System.map files - Nicolás Lichtmaier <nick@debian.org>
8 string \ A\ _text Linux kernel symbol map text
# LSM entries - Nicolás Lichtmaier <nick@debian.org>
0 string Begin3 Linux Software Map entry text
0 string Begin4 Linux Software Map entry text (new format)
# From Matt Zimmerman
0 belong 0x4f4f4f4d User-mode Linux COW file
>4 belong x \b, version %d
>8 string >\0 \b, backing file %s
############################################################################
# Linux kernel versions

View File

@ -12,7 +12,10 @@
>12 belong 3 shared library
>12 belong 4 core
>12 belong 5 preload executable
>12 belong >5
>12 belong 6 dynamically linked shared library
>12 belong 7 dynamic linker
>12 belong 8 bundle
>12 belong >8
>>12 belong x filetype=%ld
>4 belong <0
>>4 belong x architecture=%ld
@ -38,6 +41,6 @@
>4 belong 15 i860-big
>4 belong 16 i860
>4 belong 17 rs6000
>4 belong 18 powerPC
>4 belong 18 ppc
>4 belong >18
>>4 belong x architecture=%ld

View File

@ -88,7 +88,8 @@
# that the first one be 0x80, 0x81, 0x82, or 0x83, and that the second
# be 0x81. This works for the files I have, but maybe not for everyone's.
122 beshort&0xFCFF 0x8081 Macintosh MacBinary data
# Unfortunately, this magic is quite weak - MPi
#122 beshort&0xFCFF 0x8081 Macintosh MacBinary data
# MacBinary I doesn't have the version number field at all, but MacBinary II
# has been in use since 1987 so I hope there aren't many really old files
@ -111,117 +112,117 @@
# >73 byte&0x10 0x40 \b, invisible
# >73 byte&0x10 0x80 \b, locked
>65 string x \b, type "%4.4s"
#>65 string x \b, type "%4.4s"
>65 string 8BIM (PhotoShop)
>65 string ALB3 (PageMaker 3)
>65 string ALB4 (PageMaker 4)
>65 string ALT3 (PageMaker 3)
>65 string APPL (application)
>65 string AWWP (AppleWorks word processor)
>65 string CIRC (simulated circuit)
>65 string DRWG (MacDraw)
>65 string EPSF (Encapsulated PostScript)
>65 string FFIL (font suitcase)
>65 string FKEY (function key)
>65 string FNDR (Macintosh Finder)
>65 string GIFf (GIF image)
>65 string Gzip (GNU gzip)
>65 string INIT (system extension)
>65 string LIB\ (library)
>65 string LWFN (PostScript font)
>65 string MSBC (Microsoft BASIC)
>65 string PACT (Compact Pro archive)
>65 string PDF\ (Portable Document Format)
>65 string PICT (picture)
>65 string PNTG (MacPaint picture)
>65 string PREF (preferences)
>65 string PROJ (Think C project)
>65 string QPRJ (Think Pascal project)
>65 string SCFL (Defender scores)
>65 string SCRN (startup screen)
>65 string SITD (StuffIt Deluxe)
>65 string SPn3 (SuperPaint)
>65 string STAK (HyperCard stack)
>65 string Seg\ (StuffIt segment)
>65 string TARF (Unix tar archive)
>65 string TEXT (ASCII)
>65 string TIFF (TIFF image)
>65 string TOVF (Eudora table of contents)
>65 string WDBN (Microsoft Word word processor)
>65 string WORD (MacWrite word processor)
>65 string XLS\ (Microsoft Excel)
>65 string ZIVM (compress (.Z))
>65 string ZSYS (Pre-System 7 system file)
>65 string acf3 (Aldus FreeHand)
>65 string cdev (control panel)
>65 string dfil (Desk Acessory suitcase)
>65 string libr (library)
>65 string nX^d (WriteNow word processor)
>65 string nX^w (WriteNow dictionary)
>65 string rsrc (resource)
>65 string scbk (Scrapbook)
>65 string shlb (shared library)
>65 string ttro (SimpleText read-only)
>65 string zsys (system file)
#>65 string 8BIM (PhotoShop)
#>65 string ALB3 (PageMaker 3)
#>65 string ALB4 (PageMaker 4)
#>65 string ALT3 (PageMaker 3)
#>65 string APPL (application)
#>65 string AWWP (AppleWorks word processor)
#>65 string CIRC (simulated circuit)
#>65 string DRWG (MacDraw)
#>65 string EPSF (Encapsulated PostScript)
#>65 string FFIL (font suitcase)
#>65 string FKEY (function key)
#>65 string FNDR (Macintosh Finder)
#>65 string GIFf (GIF image)
#>65 string Gzip (GNU gzip)
#>65 string INIT (system extension)
#>65 string LIB\ (library)
#>65 string LWFN (PostScript font)
#>65 string MSBC (Microsoft BASIC)
#>65 string PACT (Compact Pro archive)
#>65 string PDF\ (Portable Document Format)
#>65 string PICT (picture)
#>65 string PNTG (MacPaint picture)
#>65 string PREF (preferences)
#>65 string PROJ (Think C project)
#>65 string QPRJ (Think Pascal project)
#>65 string SCFL (Defender scores)
#>65 string SCRN (startup screen)
#>65 string SITD (StuffIt Deluxe)
#>65 string SPn3 (SuperPaint)
#>65 string STAK (HyperCard stack)
#>65 string Seg\ (StuffIt segment)
#>65 string TARF (Unix tar archive)
#>65 string TEXT (ASCII)
#>65 string TIFF (TIFF image)
#>65 string TOVF (Eudora table of contents)
#>65 string WDBN (Microsoft Word word processor)
#>65 string WORD (MacWrite word processor)
#>65 string XLS\ (Microsoft Excel)
#>65 string ZIVM (compress (.Z))
#>65 string ZSYS (Pre-System 7 system file)
#>65 string acf3 (Aldus FreeHand)
#>65 string cdev (control panel)
#>65 string dfil (Desk Acessory suitcase)
#>65 string libr (library)
#>65 string nX^d (WriteNow word processor)
#>65 string nX^w (WriteNow dictionary)
#>65 string rsrc (resource)
#>65 string scbk (Scrapbook)
#>65 string shlb (shared library)
#>65 string ttro (SimpleText read-only)
#>65 string zsys (system file)
>69 string x \b, creator "%4.4s"
#>69 string x \b, creator "%4.4s"
# Somewhere, Apple has a repository of registered Creator IDs. These are
# just the ones that I happened to have files from and was able to identify.
>69 string 8BIM (Adobe Photoshop)
>69 string ALD3 (PageMaker 3)
>69 string ALD4 (PageMaker 4)
>69 string ALFA (Alpha editor)
>69 string APLS (Apple Scanner)
>69 string APSC (Apple Scanner)
>69 string BRKL (Brickles)
>69 string BTFT (BitFont)
>69 string CCL2 (Common Lisp 2)
>69 string CCL\ (Common Lisp)
>69 string CDmo (The Talking Moose)
>69 string CPCT (Compact Pro)
>69 string CSOm (Eudora)
>69 string DMOV (Font/DA Mover)
>69 string DSIM (DigSim)
>69 string EDIT (Macintosh Edit)
>69 string ERIK (Macintosh Finder)
>69 string EXTR (self-extracting archive)
>69 string Gzip (GNU gzip)
>69 string KAHL (Think C)
>69 string LWFU (LaserWriter Utility)
>69 string LZIV (compress)
>69 string MACA (MacWrite)
>69 string MACS (Macintosh operating system)
>69 string MAcK (MacKnowledge terminal emulator)
>69 string MLND (Defender)
>69 string MPNT (MacPaint)
>69 string MSBB (Microsoft BASIC (binary))
>69 string MSWD (Microsoft Word)
>69 string NCSA (NCSA Telnet)
>69 string PJMM (Think Pascal)
>69 string PSAL (Hunt the Wumpus)
>69 string PSI2 (Apple File Exchange)
>69 string R*ch (BBEdit)
>69 string RMKR (Resource Maker)
>69 string RSED (Resource Editor)
>69 string Rich (BBEdit)
>69 string SIT! (StuffIt)
>69 string SPNT (SuperPaint)
>69 string Unix (NeXT Mac filesystem)
>69 string VIM! (Vim editor)
>69 string WILD (HyperCard)
>69 string XCEL (Microsoft Excel)
>69 string aCa2 (Fontographer)
>69 string aca3 (Aldus FreeHand)
>69 string dosa (Macintosh MS-DOS file system)
>69 string movr (Font/DA Mover)
>69 string nX^n (WriteNow)
>69 string pdos (Apple ProDOS file system)
>69 string scbk (Scrapbook)
>69 string ttxt (SimpleText)
>69 string ufox (Foreign File Access)
#>69 string 8BIM (Adobe Photoshop)
#>69 string ALD3 (PageMaker 3)
#>69 string ALD4 (PageMaker 4)
#>69 string ALFA (Alpha editor)
#>69 string APLS (Apple Scanner)
#>69 string APSC (Apple Scanner)
#>69 string BRKL (Brickles)
#>69 string BTFT (BitFont)
#>69 string CCL2 (Common Lisp 2)
#>69 string CCL\ (Common Lisp)
#>69 string CDmo (The Talking Moose)
#>69 string CPCT (Compact Pro)
#>69 string CSOm (Eudora)
#>69 string DMOV (Font/DA Mover)
#>69 string DSIM (DigSim)
#>69 string EDIT (Macintosh Edit)
#>69 string ERIK (Macintosh Finder)
#>69 string EXTR (self-extracting archive)
#>69 string Gzip (GNU gzip)
#>69 string KAHL (Think C)
#>69 string LWFU (LaserWriter Utility)
#>69 string LZIV (compress)
#>69 string MACA (MacWrite)
#>69 string MACS (Macintosh operating system)
#>69 string MAcK (MacKnowledge terminal emulator)
#>69 string MLND (Defender)
#>69 string MPNT (MacPaint)
#>69 string MSBB (Microsoft BASIC (binary))
#>69 string MSWD (Microsoft Word)
#>69 string NCSA (NCSA Telnet)
#>69 string PJMM (Think Pascal)
#>69 string PSAL (Hunt the Wumpus)
#>69 string PSI2 (Apple File Exchange)
#>69 string R*ch (BBEdit)
#>69 string RMKR (Resource Maker)
#>69 string RSED (Resource Editor)
#>69 string Rich (BBEdit)
#>69 string SIT! (StuffIt)
#>69 string SPNT (SuperPaint)
#>69 string Unix (NeXT Mac filesystem)
#>69 string VIM! (Vim editor)
#>69 string WILD (HyperCard)
#>69 string XCEL (Microsoft Excel)
#>69 string aCa2 (Fontographer)
#>69 string aca3 (Aldus FreeHand)
#>69 string dosa (Macintosh MS-DOS file system)
#>69 string movr (Font/DA Mover)
#>69 string nX^n (WriteNow)
#>69 string pdos (Apple ProDOS file system)
#>69 string scbk (Scrapbook)
#>69 string ttxt (SimpleText)
#>69 string ufox (Foreign File Access)
# Just in case...
@ -236,6 +237,14 @@
>24 string CATALOG catalog
>24 string INDEX data file index
>24 string VIEW data view
# sas 7+ magic from Reinhold Koch (reinhold.koch@roche.com)
#
0x54 string SAS SAS 7+
>0x9C string DATA data file
>0x9C string CATALOG catalog
>0x9C string INDEX data file index
>0x9C string VIEW data view
# spss magic for SPSS system and portable files,
# from Bruce Foster (bef@nwu.edu).
@ -247,6 +256,7 @@
# Macintosh filesystem data
# From "Tom N Harris" <telliamed@mac.com>
# Fixed HFS+ and Partition map magic: Ethan Benson <erbenson@alaska.net>
# The MacOS epoch begins on 1 Jan 1904 instead of 1 Jan 1970, so these
# entries depend on the data arithmetic added after v.35
# There's also some Pascal strings in here, ditto...
@ -266,39 +276,39 @@
>0x412 beshort x number of blocks: %d,
>0x424 pstring x volume name: %s
0x400 beshort 0x4244 Macintosh HFS data
>0 beshort 0x4C4B (bootable)
>0x40a beshort &0x8000 (locked)
>0x40a beshort ^0x0100 (mounted)
>0x40a beshort &0x0800 (unclean)
>0x402 beldate-0x7C25B080 x created: %s,
>0x406 beldate-0x7C25B080 x last modified: %s,
>0x440 beldate-0x7C25B080 >0 last backup: %s,
>0x414 belong x block size: %d,
>0x412 beshort x number of blocks: %d,
>0x424 pstring x volume name: %s
#>0x480 beshort =0x482B Embedded HFS+ Volume:
#>>((0x482*(0x414))+(0x41c*512)) x \b
# Well, this is (theoretically) how we could do this. But it occurs to
# me that we likely don't read in a large enough chunk. I don't have any
# HFS+ volumes to see what a typical offset would be.
# "BD" is has many false positives
#0x400 beshort 0x4244 Macintosh HFS data
#>0 beshort 0x4C4B (bootable)
#>0x40a beshort &0x8000 (locked)
#>0x40a beshort ^0x0100 (mounted)
#>0x40a beshort &0x0200 (spared blocks)
#>0x40a beshort &0x0800 (unclean)
#>0x47C beshort 0x482B (Embedded HFS+ Volume)
#>0x402 beldate-0x7C25B080 x created: %s,
#>0x406 beldate-0x7C25B080 x last modified: %s,
#>0x440 beldate-0x7C25B080 >0 last backup: %s,
#>0x414 belong x block size: %d,
#>0x412 beshort x number of blocks: %d,
#>0x424 pstring x volume name: %s
0x400 beshort 0x482B Macintosh HFS Extended
>&2 beshort x version %d data
>&0 beshort x version %d data
>0 beshort 0x4C4B (bootable)
>&4 belong ^0x00000100 (mounted)
>&4 belong &0x00000800 (unclean)
>&4 belong &0x00008000 (locked)
>&8 string x last mounted by: '%.4s',
>0x404 belong ^0x00000100 (mounted)
>&2 belong &0x00000200 (spared blocks)
>&2 belong &0x00000800 (unclean)
>&2 belong &0x00008000 (locked)
>&6 string x last mounted by: '%.4s',
# really, that should be treated as a belong and we print a string
# based on the value. TN1150 only mentions '8.10' for "MacOS 8.1"
>&16 beldate-0x7C25B080 x created: %s,
>&20 beldate-0x7C25B080 x last modified: %s,
>&24 beldate-0x7C25B080 >0 last backup: %s,
>&28 beldate-0x7C25B080 >0 last checked: %s,
>&40 belong x block size: %d,
>&44 belong x number of blocks: %d,
>&48 belong x free blocks: %d
>&14 beldate-0x7C25B080 x created: %s,
# only the creation date is local time, all other timestamps in HFS+ are UTC.
>&18 bedate-0x7C25B080 x last modified: %s,
>&22 bedate-0x7C25B080 >0 last backup: %s,
>&26 bedate-0x7C25B080 >0 last checked: %s,
>&38 belong x block size: %d,
>&42 belong x number of blocks: %d,
>&46 belong x free blocks: %d
# I don't think this is really necessary since it doesn't do much and
# anything with a valid driver descriptor will also have a valid
@ -311,29 +321,40 @@
# cstring. Of course, partitions can contain more than four entries, but
# what're you gonna do?
0x200 beshort 0x504D Apple Partition data
>&2 beshort x block size: %d
>&48 string x first type: %s,
>&12 belong x number of blocks: %d,
>(&0x2.S) beshort 0x504D
>>&48 string x second type: %s
>>&12 belong x number of blocks: %d,
>>(&0x2.S) beshort 0x504D
>>>&48 string x third type: %s
>>>&12 belong x number of blocks: %d,
>>>(&0x2.S) beshort 0x504D
>>>>&48 string x fourth type: %s
>>>>&12 belong x number of blocks: %d,
>0x2 beshort x block size: %d,
>0x230 string x first type: %s,
>0x210 string x name: %s,
>0x254 belong x number of blocks: %d,
>0x400 beshort 0x504D
>>0x430 string x second type: %s,
>>0x410 string x name: %s,
>>0x454 belong x number of blocks: %d,
>>0x800 beshort 0x504D
>>>0x830 string x third type: %s,
>>>0x810 string x name: %s,
>>>0x854 belong x number of blocks: %d,
>>>0xa00 beshort 0x504D
>>>>0xa30 string x fourth type: %s,
>>>>0xa10 string x name: %s,
>>>>0xa54 belong x number of blocks: %d
# AFAIK, only the signature is different
0x200 beshort 0x5453 Apple Old Partition data
>&2 beshort x block size: %d
>&48 string x first type: %s,
>&12 belong x number of blocks: %d,
>(&0x2.S) beshort 0x504D
>>&48 string x second type: %s
>>&12 belong x number of blocks: %d,
>>(&0x2.S) beshort 0x504D
>>>&48 string x third type: %s
>>>&12 belong x number of blocks: %d,
>>>(&0x2.S) beshort 0x504D
>>>>&48 string x fourth type: %s
>>>>&12 belong x number of blocks: %d,
>0x2 beshort x block size: %d,
>0x230 string x first type: %s,
>0x210 string x name: %s,
>0x254 belong x number of blocks: %d,
>0x400 beshort 0x504D
>>0x430 string x second type: %s,
>>0x410 string x name: %s,
>>0x454 belong x number of blocks: %d,
>>0x800 beshort 0x504D
>>>0x830 string x third type: %s,
>>>0x810 string x name: %s,
>>>0x854 belong x number of blocks: %d,
>>>0xa00 beshort 0x504D
>>>>0xa30 string x fourth type: %s,
>>>>0xa10 string x name: %s,
>>>>0xa54 belong x number of blocks: %d
# From: Remi Mommsen <mommsen@slac.stanford.edu>
0 string BOMStore Mac OS X bill of materials (BOM) fil

View File

@ -28,3 +28,13 @@
# From: Simon Matter <simon.matter@invoca.ch>
0 string \241\002\213\015skiplist\ file\0\0\0 Cyrus skiplist DB
# JAM(mbp) Fidonet message area databases
# JHR file
0 string JAM\0 JAM message area header file
>12 leshort >0 (%d messages)
# Squish Fidonet message area databases
# SQD file (requires at least one message in the area)
256 leshort 0xAFAE4453 Squish message area data file
>4 leshort >0 (%d messages)

View File

@ -20,9 +20,9 @@
0 string \<PACKAGE= Maple help file
0 string \<HELP\ NAME= Maple help file
0 string \n\<HELP\ NAME= Maple help file with extra carriage return at start (yuck)
0 string #\ Newton Maple help file, old style
#0 string #\ Newton Maple help file, old style
0 string #\ daub Maple help file, old style
0 string #=========== Maple help file, old style
#0 string #=========== Maple help file, old style
# .mws
0 string \000\000\001\044\000\221 Maple worksheet

View File

@ -56,4 +56,13 @@
0 string (*********************** Mathematica 3.0 notebook
# other (* matches it is a comment start in these langs
0 string (* Mathematica, or Pascal, Modula-2 or 3 code
0 string (* Mathematica, or Pascal, Modula-2 or 3 code text
#########################
# MatLab v5
0 string MATLAB Matlab v5 mat-file
>126 short 0x494d (big endian)
>>124 beshort x version 0x%04x
>126 short 0x4d49 (little endian)
>>124 leshort x version 0x%04x

View File

@ -0,0 +1,5 @@
#-----------------------------------------------------------------------------
# misctools: file(1) magic for miscelanous UNIX tools.
#
0 string %%!! X-Post-It-Note text
0 string BEGIN:VCALENDAR vCalendar calendar file

View File

@ -48,3 +48,23 @@
>6 belong x dat=%ld,
>10 belong x bss=%ld,
>14 belong x sym=%ld)
# Atari ST/TT... program format (sent by Wolfram Kleff <kleff@cs.uni-bonn.de>)
0 beshort 0x601A Atari 68xxx executable,
>2 belong x text len %lu,
>6 belong x data len %lu,
>10 belong x BSS len %lu,
>14 belong x symboltab len %lu,
>18 belong 0
>22 belong &0x01 fastload flag,
>22 belong &0x02 may be loaded to alternate RAM,
>22 belong &0x04 malloc may be from alternate RAM,
>22 belong x flags: 0x%lX,
>26 beshort 0 no relocation tab
>26 beshort !0 + relocation tab
>30 string SFX [Self-Extracting LZH SFX archive]
>38 string SFX [Self-Extracting LZH SFX archive]
>44 string ZIP! [Self-Extracting ZIP SFX archive]
0 beshort 0x0064 Atari 68xxx CPX file
>8 beshort x (version %04lx)

View File

@ -4,7 +4,7 @@
#
# .BAT files (Daniel Quinlan, quinlan@yggdrasil.com)
0 string @echo\ off MS-DOS batch file text
0 string/c @echo\ off MS-DOS batch file text
# XXX - according to Microsoft's spec, at an offset of 0x3c in a
# PE-format executable is the offset in the file of the PE header;
@ -144,9 +144,10 @@
#
#
# Windows NT Registry files.
# Windows Registry files.
#
0 string regf Windows NT Registry file
0 string regf Windows NT registry file
0 string CREG Windows 95 registry file
# Popular applications
2080 string Microsoft\ Word\ 6.0\ Document %s
@ -159,7 +160,7 @@
0 string PO^Q` Microsoft Word 6.0 Document
#
0 string \376\067\0\043 Microsoft Office Document
0 string \320\317\021\340\241\261 Microsoft Office Document
0 string \320\317\021\340\241\261\032\341 Microsoft Office Document
0 string \333\245-\0\0\0 Microsoft Office Document
#
2080 string Microsoft\ Excel\ 5.0\ Worksheet %s
@ -180,9 +181,6 @@
# Help files
0 string ?_\3\0 MS Windows Help Data
# Microsoft CAB distribution format Dale Worley <root@dworley.ny.mediaone.net>
0 string MSCF\000\000\000\000 Microsoft CAB file
# DeIsL1.isu what this is I don't know
0 string \161\250\000\000\001\002 DeIsL1.isu whatever that is
@ -238,11 +236,6 @@
>>8 byte >0 \b, %d-colors
# True Type fonts currently misidentified as raw G3 data
0 string \000\001\000\000\000 MS-Windows true type font .ttf
# .chr files
0 string PK\010\010BGI Borland font
>4 string >\0 %s
@ -263,9 +256,9 @@
# Acroread or something files wrongly identified as G3 .pfm
# these have the form \000 \001 any? \002 \000 \000
# or \000 \001 any? \022 \000 \000
0 string \000\001 pfm?
>3 string \022\000\000Copyright\ yes
>3 string \002\000\000Copyright\ yes
#0 string \000\001 pfm?
#>3 string \022\000\000Copyright\ yes
#>3 string \002\000\000Copyright\ yes
#>3 string >\0 oops, not a font file. Cancel that.
#it clashes with ttf files so put it lower down.
@ -278,7 +271,8 @@
0 string DCU1 Borland Delphi .DCU file
0 string !<spell> MKS Spell hash list (old format)
0 string !<spell2> MKS Spell hash list
0 string AH Halo(TM) bitmapped font file
# Too simple - MPi
#0 string AH Halo(TM) bitmapped font file
0 lelong 0x08086b70 TurboC BGI file
0 lelong 0x08084b50 TurboC Font file
@ -309,3 +303,62 @@
# TNEF magic From "Joomy" <joomy@se-ed.net>
0 leshort 0x223e9f78 TNEF
# HtmlHelp files (.chm)
0 string ITSF\003\000\000\000\x60\000\000\000\001\000\000\000 MS Windows HtmlHelp Data
# GFA-BASIC (Wolfram Kleff)
2 string GFA-BASIC3 GFA-BASIC 3 data
# DJGPP compiled files
# v >2, uses DPMI & small(2k) stub (Robert vd Boon, rjvdboon@europe.com)
0x200 string go32stub DOS-executable compiled w/DJGPP
>0x20c string >0 (stub v%.4s)
>>0x8b2 string djp [compressed w/%s
>>>&1 string >\0 %.4s]
>>0x8ad string UPX [compressed w/%s
>>>&1 string >\0 %.4s]
>>0x1c string pmodedj stubbed with %s
# QDOS
4 belong 0x4AFB QDOS executable
>9 pstring x '%s'
0 beshort 0xFB01 QDOS object
>2 pstring x '%s'
#------------------------------------------------------------------------------
# From Stuart Caie <kyzer@4u.net> (developer of cabextract)
# Microsoft Cabinet files
0 string MSCF\0\0\0\0 Microsoft Cabinet file
>8 lelong x \b, %u bytes
>28 leshort 1 \b, 1 file
>28 leshort >1 \b, %u files
# InstallShield Cabinet files
0 string ISc( InstallShield Cabinet file
>5 byte&0xf0 =0x60 version 6,
>5 byte&0xf0 !0x60 version 4/5,
>(12.l+40) lelong x %u files
# Windows CE package files
0 string MSCE\0\0\0\0 Microsoft WinCE install header
>20 lelong 0 \b, architecture-independent
>20 lelong 103 \b, Hitachi SH3
>20 lelong 104 \b, Hitachi SH4
>20 lelong 0xA11 \b, StrongARM
>20 lelong 4000 \b, MIPS R4000
>20 lelong 10003 \b, Hitachi SH3
>20 lelong 10004 \b, Hitachi SH3E
>20 lelong 10005 \b, Hitachi SH4
>20 lelong 70001 \b, ARM 7TDMI
>52 leshort 1 \b, 1 file
>52 leshort >1 \b, %u files
>56 leshort 1 \b, 1 registry entry
>56 leshort >1 \b, %u registry entries
# Outlook Personal Folders
0 lelong 0x4E444221 Microsoft Outlook binary email folder
# From: Dirk Jagdmann <doj@cubic.org>
0 lelong 0x00035f3f Windows 3.x help file

View File

@ -8,6 +8,9 @@
# Netscape Address book .nab
0 string \000\017\102\104\000\000\000\000\000\000\001\000\000\000\000\002\000\000\000\002\000\000\004\000 Netscape Address book
# Netscape Communicator address book
0 string \000\017\102\111 Netscape Communicator address book
# .snm Caches
0 string #\ Netscape\ folder\ cache Netscape folder cache
0 string \000\036\204\220\000 Netscape folder cache

13
file/magic/Magdir/ocaml Normal file
View File

@ -0,0 +1,13 @@
#------------------------------------------------------------------------------
# ocaml: file(1) magic for Objective Caml files.
0 string Caml1999 Objective caml
>8 string X exec file
>8 string I interface file (.cmi)
>8 string O object file (.cmo)
>8 string A library file (.cma)
>8 string Y native object file (.cmx)
>8 string Z native library file (.cmxa)
>8 string M abstract syntax tree implementation file
>8 string N abstract syntax tree interface file
>9 string >\0 (Version %3.3s).

View File

@ -11,16 +11,16 @@
# OS/2 URL objects
# Provided 1998/08/22 by
# David Mediavilla <davidme.news@REMOVEIFNOTSPAMusa.net>
0 string http: OS/2 URL object text
>5 string >\ (WWW) <http:%s>
0 string mailto: OS/2 URL object text
>7 string >\ (email) <%s>
0 string news: OS/2 URL object text
>5 string >\ (Usenet) <%s>
0 string ftp: OS/2 URL object text
>4 string >\ (FTP) <ftp:%s>
0 string file: OS/2 URL object text
>5 string >\ (Local file) <%s>
#0 string http: OS/2 URL object text
#>5 string >\ (WWW) <http:%s>
#0 string mailto: OS/2 URL object text
#>7 string >\ (email) <%s>
#0 string news: OS/2 URL object text
#>5 string >\ (Usenet) <%s>
#0 string ftp: OS/2 URL object text
#>4 string >\ (FTP) <ftp:%s>
#0 string file: OS/2 URL object text
#>5 string >\ (Local file) <%s>
# >>>>> OS/2 INF/HLP <<<<< (source: Daniel Dissett ddissett@netcom.com)
# Carl Hauser (chauser.parc@xerox.com) and

View File

@ -13,3 +13,79 @@
# HACK
60 belong 0x4841434b HackMaster hack
>0 string >\0 "%s"
# Variety of PalmOS document types
# Michael-John Turner <mj@debian.org>
# Thanks to Hasan Umit Ezerce <humit@tr-net.net.tr> for his DocType
60 string BVokBDIC BDicty PalmOS document
>0 string >\0 "%s"
60 string DB99DBOS DB PalmOS document
>0 string >\0 "%s"
60 string vIMGView FireViewer/ImageViewer PalmOS document
>0 string >\0 "%s"
60 string PmDBPmDB HanDBase PalmOS document
>0 string >\0 "%s"
60 string InfoINDB InfoView PalmOS document
>0 string >\0 "%s"
60 string ToGoToGo iSilo PalmOS document
>0 string >\0 "%s"
60 string JfDbJBas JFile PalmOS document
>0 string >\0 "%s"
60 string JfDbJFil JFile Pro PalmOS document
>0 string >\0 "%s"
60 string DATALSdb List PalmOS document
>0 string >\0 "%s"
60 string Mdb1Mdb1 MobileDB PalmOS document
>0 string >\0 "%s"
60 string PNRdPPrs PeanutPress PalmOS document
>0 string >\0 "%s"
60 string DataPlkr Plucker PalmOS document
>0 string >\0 "%s"
60 string DataSprd QuickSheet PalmOS document
>0 string >\0 "%s"
60 string SM01SMem SuperMemo PalmOS document
>0 string >\0 "%s"
60 string DataTlPt TealDoc PalmOS document
>0 string >\0 "%s"
60 string InfoTlIf TealInfo PalmOS document
>0 string >\0 "%s"
60 string DataTlMl TealMeal PalmOS document
>0 string >\0 "%s"
60 string DataTlPt TealPaint PalmOS document
>0 string >\0 "%s"
60 string dataTDBP ThinkDB PalmOS document
>0 string >\0 "%s"
60 string TdatTide Tides PalmOS document
>0 string >\0 "%s"
60 string ToRaTRPW TomeRaider PalmOS document
>0 string >\0 "%s"
# A GutenPalm zTXT etext for use on Palm Pilots (http://gutenpalm.sf.net)
# For version 1.xx zTXTs, outputs version and numbers of bookmarks and
# annotations.
# For other versions, just outputs version.
#
60 string zTXT A GutenPalm zTXT e-book
>0 string >\0 "%s"
>(0x4E.L) byte 0
>>(0x4E.L+1) byte x (v0.%02d)
>(0x4E.L) byte 1
>>(0x4E.L+1) byte x (v1.%02d)
>>>(0x4E.L+10) beshort >0
>>>>(0x4E.L+10) beshort <2 - 1 bookmark
>>>>(0x4E.L+10) beshort >1 - %d bookmarks
>>>(0x4E.L+14) beshort >0
>>>>(0x4E.L+14) beshort <2 - 1 annotation
>>>>(0x4E.L+14) beshort >1 - %d annotations
>(0x4E.L) byte >1 (v%d.
>>(0x4E.L+1) byte x %02d)
# Palm OS .prc file types
60 string libr Palm OS dynamic library data
>0 string >\0 "%s"
60 string ptch Palm OS operating system patch data
>0 string >\0 "%s"
# Mobipocket (www.mobipocket.com), donated by Carl Witty
60 string BOOKMOBI Mobipocket E-book
>0 string >\0 "%s"

View File

@ -11,6 +11,7 @@
0 string eval\ "exec\ /usr/bin/perl perl script text
0 string/b #!\ /usr/local/bin/perl perl script text
0 string eval\ "exec\ /usr/local/bin/perl perl script text executable
0 string eval\ '(exit\ $?0)'\ &&\ eval\ 'exec perl script text
# a couple more, by me
# XXX: christos matches

4
file/magic/Magdir/plan9 Normal file
View File

@ -0,0 +1,4 @@
#------------------------------------------------------------------------------
# plan9: file(1) magic for AT&T Bell Labs' Plan 9 executables
#
0 belong 0x000001EB Plan 9 executable

View File

@ -90,3 +90,27 @@
# From <mike@flyn.org>
# These are the /etc/magic entries to decode data sent to an Epson printer.
0 string \x1B\x40\x1B\x28\x52\x08\x00\x00REMOTE1P Epson Stylus Color 460 data
#------------------------------------------------------------------------------
# zenographics: file(1) magic for Zenographics ZjStream printer data
# Rick Richardson rickr@mn.rr.com
0 string JZJZ
>0x12 string ZZ Zenographics ZjStream printer data (big-endian)
0 string ZJZJ
>0x12 string ZZ Zenographics ZjStream printer data (little-endian)
#------------------------------------------------------------------------------
# Oak Technologies printer stream
# Rick Richardson <rickr@mn.rr.com>
0 string OAK
>0x07 byte 0
>0x0b byte 0 Oak Technologies printer stream
# This would otherwise be recognized as PostScript - nick@debian.org
0 string %!VMF SunClock's Vector Map Format data
#------------------------------------------------------------------------------
# HP LaserJet 1000 series downloadable firmware file
0 string \xbe\xefABCDEFGH HP LaserJet 1000 series downloadable firmware

43
file/magic/Magdir/psion Normal file
View File

@ -0,0 +1,43 @@
#------------------------------------------------------------------------------
# psion: file(1) magic for Psion handhelds data
# from: Peter Breitenlohner <peb@mppmu.mpg.de>
#
0 lelong 0x10000037 Psion Series 5
>4 lelong 0x10000039 font file
>4 lelong 0x1000003A printer driver
>4 lelong 0x1000003B clipboard
>4 lelong 0x10000042 multi-bitmap image
>4 lelong 0x1000006A application infomation file
>4 lelong 0x1000006D
>>8 lelong 0x1000007D sketch image
>>8 lelong 0x1000007E voice note
>>8 lelong 0x1000007F word file
>>8 lelong 0x10000085 OPL program
>>8 lelong 0x10000088 sheet file
>>8 lelong 0x100001C4 EasyFax initialisation file
>4 lelong 0x10000073 OPO module
>4 lelong 0x10000074 OPL application
>4 lelong 0x1000008A exported multi-bitmap image
0 lelong 0x10000041 Psion Series 5 ROM multi-bitmap image
0 lelong 0x10000050 Psion Series 5
>4 lelong 0x1000006D database
>4 lelong 0x100000E4 ini file
0 lelong 0x10000079 Psion Series 5 binary:
>4 lelong 0x00000000 DLL
>4 lelong 0x10000049 comms hardware library
>4 lelong 0x1000004A comms protocol library
>4 lelong 0x1000005D OPX
>4 lelong 0x1000006C application
>4 lelong 0x1000008D DLL
>4 lelong 0x100000AC logical device driver
>4 lelong 0x100000AD physical device driver
>4 lelong 0x100000E5 file transfer protocol
>4 lelong 0x100000E5 file transfer protocol
>4 lelong 0x10000140 printer defintion
>4 lelong 0x10000141 printer defintion
0 lelong 0x1000007A Psion Series 5 executable

View File

@ -11,4 +11,4 @@
0 belong 0x87c60d0a python 2.0 byte-compiled
0 belong 0x2aeb0d0a python 2.1 byte-compiled
0 belong 0x2ded0d0a python 2.2 byte-compiled
#0 belong 0x31f20d0a python 2.3 byte-compiled
0 belong 0x3bf20d0a python 2.3 byte-compiled

View File

@ -1,6 +1,5 @@
#------------------------------------------------------------------------------
# file(1) magic for cvs(1) files
# file(1) magic for revision control files
# From Hendrik Scholz <hendrik@scholz.net>
0 string /1\ :pserver: cvs password text file

View File

@ -5,13 +5,7 @@
#
# http://www.seanet.com/users/matts/riffmci/riffmci.htm
#
# and
#
# http://www.ora.com/centers/gff/formats/micriff/index.htm
#
# and
#
# http://www.jtauber.com/music/encoding/niff/spec/
# AVI section extended by Patrik Rådman <patrik+file-magic@iki.fi>
#
0 string RIFF RIFF (little-endian) data
# RIFF Palette format
@ -40,8 +34,8 @@
>>20 leshort 1 \b, Microsoft PCM
>>>34 leshort >0 \b, %d bit
>>20 leshort 2 \b, Microsoft ADPCM
>>20 leshort 6 \b, ITU G.711 a-law
>>20 leshort 7 \b, ITU G.711 u-law
>>20 leshort 6 \b, ITU G.711 A-law
>>20 leshort 7 \b, ITU G.711 mu-law
>>20 leshort 17 \b, IMA ADPCM
>>20 leshort 20 \b, ITU G.723 ADPCM (Yamaha)
>>20 leshort 49 \b, GSM 6.10
@ -52,12 +46,124 @@
>>22 leshort =2 \b, stereo
>>22 leshort >2 \b, %d channels
>>24 lelong >0 %d Hz
# AVI == Audio Video Interleave
>8 string AVI\ \b, AVI
# Animated Cursor format
>8 string ACON \b, animated cursor
# Corel Draw Picture
>8 string CDRA \b, Corel Draw Picture
# AVI == Audio Video Interleave
>8 string AVI\040 \b, AVI
>>12 string LIST
>>>20 string hdrlavih
>>>>&36 lelong x \b, %lu x
>>>>&40 lelong x %lu,
>>>>&4 lelong >1000000 <1 fps,
>>>>&4 lelong 1000000 1.00 fps,
>>>>&4 lelong 500000 2.00 fps,
>>>>&4 lelong 333333 3.00 fps,
>>>>&4 lelong 250000 4.00 fps,
>>>>&4 lelong 200000 5.00 fps,
>>>>&4 lelong 166667 6.00 fps,
>>>>&4 lelong 142857 7.00 fps,
>>>>&4 lelong 125000 8.00 fps,
>>>>&4 lelong 111111 9.00 fps,
>>>>&4 lelong 100000 10.00 fps,
# ]9.9,10.1[
>>>>&4 lelong <101010
>>>>>&-4 lelong >99010
>>>>>>&-4 lelong !100000 ~10 fps,
>>>>&4 lelong 83333 12.00 fps,
# ]11.9,12.1[
>>>>&4 lelong <84034
>>>>>&-4 lelong >82645
>>>>>>&-4 lelong !83333 ~12 fps,
>>>>&4 lelong 66667 15.00 fps,
# ]14.9,15.1[
>>>>&4 lelong <67114
>>>>>&-4 lelong >66225
>>>>>>&-4 lelong !66667 ~15 fps,
>>>>&4 lelong 50000 20.00 fps,
>>>>&4 lelong 41708 23.98 fps,
>>>>&4 lelong 41667 24.00 fps,
# ]23.9,24.1[
>>>>&4 lelong <41841
>>>>>&-4 lelong >41494
>>>>>>&-4 lelong !41708
>>>>>>>&-4 lelong !41667 ~24 fps,
>>>>&4 lelong 40000 25.00 fps,
# ]24.9,25.1[
>>>>&4 lelong <40161
>>>>>&-4 lelong >39841
>>>>>>&-4 lelong !40000 ~25 fps,
>>>>&4 lelong 33367 29.97 fps,
>>>>&4 lelong 33333 30.00 fps,
# ]29.9,30.1[
>>>>&4 lelong <33445
>>>>>&-4 lelong >33223
>>>>>>&-4 lelong !33367
>>>>>>>&-4 lelong !33333 ~30 fps,
>>>>&4 lelong <32224 >30 fps,
##>>>>&4 lelong x (%lu)
##>>>>&20 lelong x %lu frames,
# Note: The tests below assume that the AVI has 1 or 2 streams,
# "vids" optionally followed by "auds".
# (Should cover 99.9% of all AVIs.)
# assuming avih length = 56
>>>88 string LIST
>>>>96 string strlstrh
>>>>>108 string vids video:
>>>>>>&0 lelong 0 uncompressed
# skip past vids strh
>>>>>>(104.l+108) string strf
>>>>>>>(104.l+132) lelong 1 RLE 8bpp
>>>>>>>(104.l+132) string/c cvid Cinepak
>>>>>>>(104.l+132) string/c i263 Intel I.263
>>>>>>>(104.l+132) string/c iv32 Indeo 3.2
>>>>>>>(104.l+132) string/c iv41 Indeo 4.1
>>>>>>>(104.l+132) string/c iv50 Indeo 5.0
>>>>>>>(104.l+132) string/c mp42 Microsoft MPEG-4 v2
>>>>>>>(104.l+132) string/c mp43 Microsoft MPEG-4 v3
>>>>>>>(104.l+132) string/c mjpg Motion JPEG
>>>>>>>(104.l+132) string/c div3 DivX 3
>>>>>>>>112 string/c div3 Low-Motion
>>>>>>>>112 string/c div4 Fast-Motion
>>>>>>>(104.l+132) string/c divx DivX 4
>>>>>>>(104.l+132) string/c dx50 DivX 5
>>>>>>>(104.l+132) string/c xvid XviD
>>>>>>>(104.l+132) lelong 0
##>>>>>>>(104.l+132) string x (%.4s)
# skip past first (video) LIST
>>>>(92.l+96) string LIST
>>>>>(92.l+104) string strlstrh
>>>>>>(92.l+116) string auds \b, audio:
# auds strh length = 56:
>>>>>>>(92.l+172) string strf
>>>>>>>>(92.l+180) leshort 0x0001 uncompressed PCM
>>>>>>>>(92.l+180) leshort 0x0002 ADPCM
>>>>>>>>(92.l+180) leshort 0x0055 MPEG-1 Layer 3
>>>>>>>>(92.l+180) leshort 0x2000 Dolby AC3
>>>>>>>>(92.l+180) leshort 0x0161 DivX
##>>>>>>>>(92.l+180) leshort x (0x%.4x)
>>>>>>>>(92.l+182) leshort 1 (mono,
>>>>>>>>(92.l+182) leshort 2 (stereo,
>>>>>>>>(92.l+182) leshort >2 (%d channels,
>>>>>>>>(92.l+184) lelong x %d Hz)
# auds strh length = 64:
>>>>>>>(92.l+180) string strf
>>>>>>>>(92.l+188) leshort 0x0001 uncompressed PCM
>>>>>>>>(92.l+188) leshort 0x0002 ADPCM
>>>>>>>>(92.l+188) leshort 0x0055 MPEG-1 Layer 3
>>>>>>>>(92.l+188) leshort 0x2000 Dolby AC3
>>>>>>>>(92.l+188) leshort 0x0161 DivX
##>>>>>>>>(92.l+188) leshort x (0x%.4x)
>>>>>>>>(92.l+190) leshort 1 (mono,
>>>>>>>>(92.l+190) leshort 2 (stereo,
>>>>>>>>(92.l+190) leshort >2 (%d channels,
>>>>>>>>(92.l+192) lelong x %d Hz)
# Animated Cursor format
>8 string ACON \b, animated cursor
# SoundFont 2 <mpruett@sgi.com>
>8 string sfbk SoundFont/Bank
# MPEG-1 wrapped in a RIFF, apparently
>8 string CDXA \b, wrapped MPEG-1 (CDXA)
>8 string 4XMV \b, 4X Movie file
#
# XXX - some of the below may only appear in little-endian form.
@ -95,14 +201,13 @@
>>22 beshort =2 \b, stereo
>>22 beshort >2 \b, %d channels
>>24 belong >0 %d Hz
# Corel Draw Picture
>8 string CDRA \b, Corel Draw Picture
# AVI == Audio Video Interleave
>8 string AVI\ \b, AVI
>8 string AVI\040 \b, AVI
# Animated Cursor format
>8 string ACON \b, animated cursor
# Notation Interchange File Format (big-endian only)
>8 string NIFF \b, Notation Interchange File Format
# Corel Draw Picture
>8 string CDRA \b, Corel Draw Picture
# SoundFont 2 <mpruett@sgi.com>
>8 string sfbk SoundFont 2
>8 string sfbk SoundFont/Bank

View File

@ -14,4 +14,9 @@
>>8 beshort 5 PowerPC
>>8 beshort 6 68000
>>8 beshort 7 SGI
>>8 beshort 8 RS6000
>>8 beshort 9 IA64
>>8 beshort 10 Sparc64
>>8 beshort 11 MIPSel
>>8 beshort 12 ARM
>>10 string x %s

59
file/magic/Magdir/sgi Normal file
View File

@ -0,0 +1,59 @@
#------------------------------------------------------------------------------
# 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 lelong x (V.%1.1s)
3 lelong 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
>24 lelong x host: %s
0 string PCPFolio PCP
>9 string Version: Archive Folio
>18 lelong x (V.%s)
0 string #pmchart PCP pmchart view
>9 string Version
>17 lelong x (V%-3.3s)
0 string pmview PCP pmview config
>7 string Version
>15 lelong x (V%-3.3s)
0 string #pmlogger PCP pmlogger config
>10 string Version
>18 lelong x (V%1.1s)
0 string PcPh PCP Help
>4 string 1 Index
>4 string 2 Text
>5 lelong x (V.%1.1s)
0 string #pmieconf-rules PCP pmieconf rules
>16 lelong x (V.%1.1s)
3 string pmieconf-pmie PCP pmie config
>17 lelong x (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|Wavefront Maya files
0 string //Maya ASCII Alias|Wavefront Maya Ascii File,
>13 lelong x version %s
8 string MAYAFOR4 Alias|Wavefront Maya Binary File,
>32 lelong x version %s scene
8 string MayaFOR4 Alias|Wavefront Maya Binary File,
>32 lelong x version %s scene
8 string CIMG Alias|Wavefront Maya Image File
8 string DEEP Alias|Wavefront Maya Image File

View File

@ -4,7 +4,7 @@
# HyperText Markup Language (HTML) is an SGML document type,
# from Daniel Quinlan (quinlan@yggdrasil.com)
# adapted to string extenstions by Anthon van der Neut <anthon@mnt.org)
0 string/cB \<!doctype\ html HTML document text
0 string/cB \<!DOCTYPE\ html HTML document text
0 string/cb \<head HTML document text
0 string/cb \<title HTML document text
0 string/cb \<html HTML document text
@ -12,6 +12,13 @@
# Extensible markup language (XML), a subset of SGML
# from Marc Prud'hommeaux (marc@apocalypse.org)
0 string/cb \<?xml XML document text
0 string \<?xml\ version " XML
0 string \<?xml\ version=" XML
>15 string >\0 %.3s document text
>>23 string \<xsl:stylesheet (XSL stylesheet)
>>24 string \<xsl:stylesheet (XSL stylesheet)
0 string/b \<?xml XML document text
0 string/cb \<?xml broken XML document text
# SGML, mostly from rph@sq

126
file/magic/Magdir/sinclair Normal file
View File

@ -0,0 +1,126 @@
#------------------------------------------------------------------------------
# sinclair: file(1) sinclair QL
# additions to /etc/magic by Thomas M. Ott (ThMO)
# Sinclair QL floppy disk formats (ThMO)
0 string =QL5 QL disk dump data,
>3 string =A 720 KB,
>3 string =B 1.44 MB,
>3 string =C 3.2 MB,
>4 string >\0 label:%.10s
# Sinclair QL OS dump (ThMO)
# (NOTE: if `file' would be able to use indirect references in a endian format
# differing from the natural host format, this could be written more
# reliably and faster...)
#
# we *can't* lookup QL OS code dumps, because `file' is UNABLE to read more
# than the first 8K of a file... #-(
#
#0 belong =0x30000
#>49124 belong <47104
#>>49128 belong <47104
#>>>49132 belong <47104
#>>>>49136 belong <47104 QL OS dump data,
#>>>>>49148 string >\0 type %.3s,
#>>>>>49142 string >\0 version %.4s
# Sinclair QL firmware executables (ThMO)
0 string NqNqNq`\004 QL firmware executable (BCPL)
# Sinclair QL libraries (ThMO)
0 beshort =0xFB01 QL library archive data
# Sinclair QL executbables (ThMO)
6 beshort =0x4AFB QL executable,
>10 string =\0 un-named
>8 beshort =1
>>10 string >\0 named: %.1s
>8 beshort =2
>>10 string >\0 named: %.2s
>8 beshort =3
>>10 string >\0 named: %.3s
>8 beshort =4
>>10 string >\0 named: %.4s
>8 beshort =5
>>10 string >\0 named: %.5s
>8 beshort =6
>>10 string >\0 named: %.6s
>8 beshort =7
>>10 string >\0 named: %.7s
>8 beshort =8
>>10 string >\0 named: %.8s
>8 beshort =9
>>10 string >\0 named: %.9s
>8 beshort =10
>>10 string >\0 named: %.10s
>8 beshort =11
>>10 string >\0 named: %.11s
>8 beshort =12
>>10 string >\0 named: %.12s
>8 beshort =13
>>10 string >\0 named: %.13s
>8 beshort =14
>>10 string >\0 named: %.14s
>8 beshort =15
>>10 string >\0 named: %.15s
>8 beshort =16
>>10 string >\0 named: %.16s
>8 beshort =17
>>10 string >\0 named: %.17s
>8 beshort =18
>>10 string >\0 named: %.18s
>8 beshort =19
>>10 string >\0 named: %.19s
>8 beshort =20
>>10 string >\0 named: %.20s
>8 beshort >20
>>10 string >\0 (truncated) named: %.20s
# Sinclair QL rom (ThMO)
0 belong =0x4AFB0001 QL plugin-ROM data,
>10 string =\0 un-named
>8 beshort =1
>>10 string >\0 named: %.1s
>8 beshort =2
>>10 string >\0 named: %.2s
>8 beshort =3
>>10 string >\0 named: %.3s
>8 beshort =4
>>10 string >\0 named: %.4s
>8 beshort =5
>>10 string >\0 named: %.5s
>8 beshort =6
>>10 string >\0 named: %.6s
>8 beshort =7
>>10 string >\0 named: %.7s
>8 beshort =8
>>10 string >\0 named: %.8s
>8 beshort =9
>>10 string >\0 named: %.9s
>8 beshort =10
>>10 string >\0 named: %.10s
>8 beshort =11
>>10 string >\0 named: %.11s
>8 beshort =12
>>10 string >\0 named: %.12s
>8 beshort =13
>>10 string >\0 named: %.13s
>8 beshort =14
>>10 string >\0 named: %.14s
>8 beshort =15
>>10 string >\0 named: %.15s
>8 beshort =16
>>10 string >\0 named: %.16s
>8 beshort =17
>>10 string >\0 named: %.17s
>8 beshort =18
>>10 string >\0 named: %.18s
>8 beshort =19
>>10 string >\0 named: %.19s
>8 beshort =20
>>10 string >\0 named: %.20s
>8 beshort >20
>>10 string >\0 (truncated) named: %.20s

View File

@ -9,23 +9,25 @@
# Microsoft Network Monitor 1.x capture files.
#
0 string RTSS NetMon capture file
>4 byte x - version %d
>5 byte x \b.%d
>5 byte x - version %d
>4 byte x \b.%d
>6 leshort 0 (Unknown)
>6 leshort 1 (Ethernet)
>6 leshort 2 (Token Ring)
>6 leshort 3 (FDDI)
>6 leshort 4 (ATM)
#
# Microsoft Network Monitor 2.x capture files.
#
0 string GMBU NetMon capture file
>4 byte x - version %d
>5 byte x \b.%d
>5 byte x - version %d
>4 byte x \b.%d
>6 leshort 0 (Unknown)
>6 leshort 1 (Ethernet)
>6 leshort 2 (Token Ring)
>6 leshort 3 (FDDI)
>6 leshort 4 (ATM)
#
# Network General Sniffer capture files.
@ -58,6 +60,9 @@
>44 leshort 0 (Ethernet)
>44 leshort 1 (Token Ring)
>44 leshort 2 (FDDI)
>44 leshort 3 (WAN)
>44 leshort 8 (ATM)
>44 leshort 9 (802.11)
#
# "libpcap" capture files.
@ -75,7 +80,7 @@
>20 belong 4 (ProNET
>20 belong 5 (CHAOS
>20 belong 6 (Token Ring
>20 belong 7 (ARCNET
>20 belong 7 (BSD ARCNET
>20 belong 8 (SLIP
>20 belong 9 (PPP
>20 belong 10 (FDDI
@ -92,10 +97,21 @@
>20 belong 104 (BSD/OS Cisco HDLC
>20 belong 105 (802.11
>20 belong 106 (Linux Classical IP over ATM
>20 belong 107 (Frame Relay
>20 belong 108 (OpenBSD loopback
>20 belong 109 (OpenBSD IPSEC encrypted
>20 belong 109 (OpenBSD IPsec encrypted
>20 belong 112 (Cisco HDLC
>20 belong 113 (Linux "cooked"
>20 belong 114 (LocalTalk
>20 belong 117 (OpenBSD PFLOG
>20 belong 119 (802.11 with Prism header
>20 belong 123 (SunATM
>20 belong 127 (802.11 with radiotap header
>20 belong 129 (Linux ARCNET
>20 belong 140 (MTP2
>20 belong 141 (MTP3
>20 belong 143 (DOCSIS
>20 belong 144 (IrDA
>16 belong x \b, capture length %d)
0 ulelong 0xa1b2c3d4 tcpdump capture file (little-endian)
>4 leshort x - version %d
@ -124,10 +140,21 @@
>20 lelong 104 (BSD/OS Cisco HDLC
>20 lelong 105 (802.11
>20 lelong 106 (Linux Classical IP over ATM
>20 lelong 107 (Frame Relay
>20 lelong 108 (OpenBSD loopback
>20 lelong 109 (OpenBSD IPSEC encrypted
>20 lelong 112 (Cisco HDLC
>20 lelong 113 (Linux "cooked"
>20 lelong 114 (LocalTalk
>20 lelong 117 (OpenBSD PFLOG
>20 lelong 119 (802.11 with Prism header
>20 lelong 123 (SunATM
>20 lelong 127 (802.11 with radiotap header
>20 lelong 129 (Linux ARCNET
>20 lelong 140 (MTP2
>20 lelong 141 (MTP3
>20 lelong 143 (DOCSIS
>20 lelong 144 (IrDA
>16 lelong x \b, capture length %d)
#
@ -178,6 +205,7 @@
#
# AIX "iptrace" capture files.
#
0 string iptrace\ 1.0 "iptrace" capture file
0 string iptrace\ 2.0 "iptrace" capture file
#

View File

@ -26,3 +26,19 @@
>3 byte 2 - character array
>3 byte 3 - memory block
>>14 belong 0x001B0040 (screen)
# The following three blocks are from pak21-spectrum@srcf.ucam.org
# TZX tape images
0 string ZXTape!\x1a Spectrum .TZX data
>8 byte x version %d
>9 byte x .%d
# RZX input recording files
0 string RZX! Spectrum .RZX data
>4 byte x version %d
>5 byte x .%d
# And three sorts of disk image
0 string MV\ -\ CPCEMU\ Disk-Fil Amstrad/Spectrum .DSK data
0 string MV\ -\ CPC\ format\ Dis Amstrad/Spectrum DU54 .DSK data
0 string EXTENDED\ CPC\ DSK\ Fil Amstrad/Spectrum Extended .DSK data

View File

@ -101,7 +101,23 @@
>12 belong 7 (IBM channel-to-channel adapter)
>12 belong 8 (FDDI)
>12 belong 9 (Unknown)
# Microsoft ICM color profile
36 string acspMSFT Microsoft ICM Color Profile
# Sun KCMS
36 string acsp Kodak Color Management System, ICC Profile
#---------------------------------------------------------------------------
# The following entries have been tested by Duncan Laurie <duncan@sun.com> (a
# lead Sun/Cobalt developer) who agrees that they are good and worthy of
# inclusion.
# Boot ROM images for Sun/Cobalt Linux server appliances
0 string Cobalt\ Networks\ Inc.\nFirmware\ v Paged COBALT boot rom
>38 string x V%.4s
# New format for Sun/Cobalt boot ROMs is annoying, it stores the version code
# at the very end where file(1) can't get it.
0 string CRfs COBALT boot rom data (Flat boot rom or file system)

View File

@ -4,13 +4,63 @@
#
0 byte 0xF0 SysEx File -
# North American Group
>1 byte 0x01 Sequential
>1 byte 0x02 IDP
>1 byte 0x03 OctavePlateau
>1 byte 0x04 Moog
>1 byte 0x05 Passport
>1 byte 0x06 Lexicon
>1 byte 0x07 Kurzweil
>1 byte 0x08 Fender
>1 byte 0x09 Gulbransen
>1 byte 0x0a AKG
>1 byte 0x0b Voyce
>1 byte 0x0c Waveframe
>1 byte 0x0d ADA
>1 byte 0x0e Garfield
>1 byte 0x0f Ensoniq
>1 byte 0x10 Oberheim
>1 byte 0x11 Apple
>1 byte 0x12 GreyMatter
>1 byte 0x14 PalmTree
>1 byte 0x15 JLCooper
>1 byte 0x16 Lowrey
>1 byte 0x17 AdamsSmith
>1 byte 0x18 E-mu
>1 byte 0x19 Harmony
>1 byte 0x1a ART
>1 byte 0x1b Baldwin
>1 byte 0x1c Eventide
>1 byte 0x1d Inventronics
>1 byte 0x1f Clarity
# European Group
>1 byte 0x21 SIEL
>1 byte 0x22 Synthaxe
>1 byte 0x24 Hohner
>1 byte 0x25 Twister
>1 byte 0x26 Solton
>1 byte 0x27 Jellinghaus
>1 byte 0x28 Southworth
>1 byte 0x29 PPG
>1 byte 0x2a JEN
>1 byte 0x2b SSL
>1 byte 0x2c AudioVertrieb
>1 byte 0x2f ELKA
>>3 byte 0x09 EK-44
>1 byte 0x30 Dynacord
>1 byte 0x33 Clavia
>1 byte 0x39 Soundcraft
>1 byte 0x3e Waldorf
>>3 byte 0x7f Microwave I
# Japanese Group
>1 byte 0x40 Kawai
>>3 byte 0x20 K1
>>3 byte 0x22 K4
>1 byte 0x41 Roland
@ -26,6 +76,7 @@
>1 byte 0x46 Kamiya
>1 byte 0x47 Akai
>1 byte 0x48 Victor
>1 byte 0x49 Mesosha
>1 byte 0x4b Fujitsu
>1 byte 0x4c Sony
>1 byte 0x4e Teac

View File

@ -1,36 +1,237 @@
# ------------------------------------------------------------------------
# ti-8x: file(1) magic for the TI-8x and TI-92 Graphing Calculators.
# ti-8x: file(1) magic for the TI-8x and TI-9x Graphing Calculators.
#
# From: Ryan McGuire (rmcguire@freenet.columbus.oh.us).
#
# Update: Romain Lievin (roms@lpg.ticalc.org).
#
# NOTE: This list is not complete.
#
# Magic Numbers for the TI-82
#
0 string **TI82** TI-82 Graphing Calculator
>0x000037 byte 0x0B TI-BASIC Group/Program File.
#
# Magic Numbers for the TI-83
#
0 string **TI83** TI-83 Graphing Calculator
>0x000037 byte 0x0B TI-BASIC Group/Program File.
#
# Magic Numbers for the TI-85
#
0 string **TI85** TI-85 Graphing Calculator
>11 string Backup Backup File.
>0x000032 string ZS4 - ZShell Version 4 File.
>0x000032 string ZS3 - ZShell Version 3 File.
>0x00000B string GDatabase Graphics Database.
>0x00003B byte 0x12 TI-BASIC Group/Program File.
#
# Magic Numbers for the TI-92
#
0 string **TI92** TI-92 Graphing Calculator
>0x000058 byte 0x12 TI-BASIC Group File.
>0x000012 string Function Function.
>0x000048 byte 0x12 TI-BASIC Program.
# Files for the TI-80 and TI-81 are pretty rare. I'm not going to put the
# program/group magic numbers in here because I cannot find any.
0 string **TI80** TI-80 Graphing Calculator File.
0 string **TI81** TI-81 Graphing Calculator File.
#
# Magic Numbers for the TI-73
#
0 string **TI73** TI-73 Graphing Calculator
>0x00003B byte 0x00 (real number)
>0x00003B byte 0x01 (list)
>0x00003B byte 0x02 (matrix)
>0x00003B byte 0x03 (equation)
>0x00003B byte 0x04 (string)
>0x00003B byte 0x05 (program)
>0x00003B byte 0x06 (assembly program)
>0x00003B byte 0x07 (picture)
>0x00003B byte 0x08 (gdb)
>0x00003B byte 0x0C (complex number)
>0x00003B byte 0x0F (window settings)
>0x00003B byte 0x10 (zoom)
>0x00003B byte 0x11 (table setup)
>0x00003B byte 0x13 (backup)
# Magic Numbers for the TI-82
#
0 string **TI82** TI-82 Graphing Calculator
>0x00003B byte 0x00 (real)
>0x00003B byte 0x01 (list)
>0x00003B byte 0x02 (matrix)
>0x00003B byte 0x03 (Y-variable)
>0x00003B byte 0x05 (program)
>0x00003B byte 0x06 (protected prgm)
>0x00003B byte 0x07 (picture)
>0x00003B byte 0x08 (gdb)
>0x00003B byte 0x0B (window settings)
>0x00003B byte 0x0C (window settings)
>0x00003B byte 0x0D (table setup)
>0x00003B byte 0x0E (screenshot)
>0x00003B byte 0x0F (backup)
#
# Magic Numbers for the TI-83
#
0 string **TI83** TI-83 Graphing Calculator
>0x00003B byte 0x00 (real)
>0x00003B byte 0x01 (list)
>0x00003B byte 0x02 (matrix)
>0x00003B byte 0x03 (Y-variable)
>0x00003B byte 0x04 (string)
>0x00003B byte 0x05 (program)
>0x00003B byte 0x06 (protected prgm)
>0x00003B byte 0x07 (picture)
>0x00003B byte 0x08 (gdb)
>0x00003B byte 0x0B (window settings)
>0x00003B byte 0x0C (window settings)
>0x00003B byte 0x0D (table setup)
>0x00003B byte 0x0E (screenshot)
>0x00003B byte 0x13 (backup)
#
# Magic Numbers for the TI-83+
#
0 string **TI83F* TI-83+ Graphing Calculator
>0x00003B byte 0x00 (real number)
>0x00003B byte 0x01 (list)
>0x00003B byte 0x02 (matrix)
>0x00003B byte 0x03 (equation)
>0x00003B byte 0x04 (string)
>0x00003B byte 0x05 (program)
>0x00003B byte 0x06 (assembly program)
>0x00003B byte 0x07 (picture)
>0x00003B byte 0x08 (gdb)
>0x00003B byte 0x0C (complex number)
>0x00003B byte 0x0F (window settings)
>0x00003B byte 0x10 (zoom)
>0x00003B byte 0x11 (table setup)
>0x00003B byte 0x13 (backup)
>0x00003B byte 0x15 (application variable)
>0x00003B byte 0x17 (group of variable)
#
# Magic Numbers for the TI-85
#
0 string **TI85** TI-85 Graphing Calculator
>0x00003B byte 0x00 (real number)
>0x00003B byte 0x01 (complex number)
>0x00003B byte 0x02 (real vector)
>0x00003B byte 0x03 (complex vector)
>0x00003B byte 0x04 (real list)
>0x00003B byte 0x05 (complex list)
>0x00003B byte 0x06 (real matrix)
>0x00003B byte 0x07 (complex matrix)
>0x00003B byte 0x08 (real constant)
>0x00003B byte 0x09 (complex constant)
>0x00003B byte 0x0A (equation)
>0x00003B byte 0x0C (string)
>0x00003B byte 0x0D (function GDB)
>0x00003B byte 0x0E (polar GDB)
>0x00003B byte 0x0F (parametric GDB)
>0x00003B byte 0x10 (diffeq GDB)
>0x00003B byte 0x11 (picture)
>0x00003B byte 0x12 (program)
>0x00003B byte 0x13 (range)
>0x00003B byte 0x17 (window settings)
>0x00003B byte 0x18 (window settings)
>0x00003B byte 0x19 (window settings)
>0x00003B byte 0x1A (window settings)
>0x00003B byte 0x1B (zoom)
>0x00003B byte 0x1D (backup)
>0x00003B byte 0x1E (unknown)
>0x00003B byte 0x2A (equation)
>0x000032 string ZS4 - ZShell Version 4 File.
>0x000032 string ZS3 - ZShell Version 3 File.
#
# Magic Numbers for the TI-86
#
0 string **TI86** TI-86 Graphing Calculator
>0x00003B byte 0x00 (real number)
>0x00003B byte 0x01 (complex number)
>0x00003B byte 0x02 (real vector)
>0x00003B byte 0x03 (complex vector)
>0x00003B byte 0x04 (real list)
>0x00003B byte 0x05 (complex list)
>0x00003B byte 0x06 (real matrix)
>0x00003B byte 0x07 (complex matrix)
>0x00003B byte 0x08 (real constant)
>0x00003B byte 0x09 (complex constant)
>0x00003B byte 0x0A (equation)
>0x00003B byte 0x0C (string)
>0x00003B byte 0x0D (function GDB)
>0x00003B byte 0x0E (polar GDB)
>0x00003B byte 0x0F (parametric GDB)
>0x00003B byte 0x10 (diffeq GDB)
>0x00003B byte 0x11 (picture)
>0x00003B byte 0x12 (program)
>0x00003B byte 0x13 (range)
>0x00003B byte 0x17 (window settings)
>0x00003B byte 0x18 (window settings)
>0x00003B byte 0x19 (window settings)
>0x00003B byte 0x1A (window settings)
>0x00003B byte 0x1B (zoom)
>0x00003B byte 0x1D (backup)
>0x00003B byte 0x1E (unknown)
>0x00003B byte 0x2A (equation)
#
# Magic Numbers for the TI-89
#
0 string **TI89** TI-89 Graphing Calculator
>0x000048 byte 0x00 (expression)
>0x000048 byte 0x04 (list)
>0x000048 byte 0x06 (matrix)
>0x000048 byte 0x0A (data)
>0x000048 byte 0x0B (text)
>0x000048 byte 0x0C (string)
>0x000048 byte 0x0D (graphic data base)
>0x000048 byte 0x0E (figure)
>0x000048 byte 0x10 (picture)
>0x000048 byte 0x12 (program)
>0x000048 byte 0x13 (function)
>0x000048 byte 0x14 (macro)
>0x000048 byte 0x1C (zipped)
>0x000048 byte 0x21 (assembler)
#
# Magic Numbers for the TI-92
#
0 string **TI92** TI-92 Graphing Calculator
>0x000048 byte 0x00 (expression)
>0x000048 byte 0x04 (list)
>0x000048 byte 0x06 (matrix)
>0x000048 byte 0x0A (data)
>0x000048 byte 0x0B (text)
>0x000048 byte 0x0C (string)
>0x000048 byte 0x0D (graphic data base)
>0x000048 byte 0x0E (figure)
>0x000048 byte 0x10 (picture)
>0x000048 byte 0x12 (program)
>0x000048 byte 0x13 (function)
>0x000048 byte 0x14 (macro)
>0x000048 byte 0x1D (backup)
#
# Magic Numbers for the TI-92+/V200
#
0 string **TI92P* TI-92+/V200 Graphing Calculator
>0x000048 byte 0x00 (expression)
>0x000048 byte 0x04 (list)
>0x000048 byte 0x06 (matrix)
>0x000048 byte 0x0A (data)
>0x000048 byte 0x0B (text)
>0x000048 byte 0x0C (string)
>0x000048 byte 0x0D (graphic data base)
>0x000048 byte 0x0E (figure)
>0x000048 byte 0x10 (picture)
>0x000048 byte 0x12 (program)
>0x000048 byte 0x13 (function)
>0x000048 byte 0x14 (macro)
>0x000048 byte 0x1C (zipped)
>0x000048 byte 0x21 (assembler)
#
# Magic Numbers for the TI-73/83+/89/92+/V200 FLASH upgrades
#
0x0000016 string Advanced TI-XX Graphing Calculator (FLASH)
0 string **TIFL** TI-XX Graphing Calculator (FLASH)
>8 byte >0 - Revision %d
>>9 byte x \b.%d,
>12 byte >0 Revision date %02x
>>13 byte x \b/%02x
>>14 beshort x \b/%04x,
>17 string >/0 name: '%s',
>48 byte 0x74 device: TI-73,
>48 byte 0x73 device: TI-83+,
>48 byte 0x98 device: TI-89,
>48 byte 0x88 device: TI-92+,
>49 byte 0x23 type: OS upgrade,
>49 byte 0x24 type: application,
>49 byte 0x25 type: certificate,
>49 byte 0x3e type: license,
>74 lelong >0 size: %ld bytes
# VTi & TiEmu skins (TI Graphing Calculators).
# From: Romain Lievin (roms@lpg.ticalc.org).
# Magic Numbers for the VTi skins
0 string VTI Virtual TI skin
>3 string v - Version
>>4 byte >0 \b %c
>>6 byte x \b.%c
# Magic Numbers for the TiEmu skins
0 string TiEmu TiEmu skin
>6 string v - Version
>>7 byte >0 \b %c
>>9 byte x \b.%c
>>10 byte x \b%c

View File

@ -30,3 +30,6 @@
# Harbour <URL:http://www.harbour-project.org/> HRB files.
0 string \xc0HRB Harbour HRB file
>4 short x version %d
# From: "Stefan A. Haubenthal" <polluks@web.de>
0 belong 0x000001EB Plan 9 executable

View File

@ -0,0 +1,12 @@
#------------------------------------------------------------------------------
# varied.script: file(1) magic for various interpreter scripts
0 string #!\ / a
>3 string >\0 %s script text executable
0 string #!\ / a
>3 string >\0 %s script text executable
0 string #!/ a
>2 string >\0 %s script text executable
0 string #!\ script text executable
>3 string >\0 for %s

View File

@ -3,10 +3,10 @@
# VMware specific files (deducted from version 1.1 and log file entries)
# Anthon van der Neut (anthon@mnt.org)
0 belong 0x4d52564e VMware nvram
0 belong 0x434f5744
>8 byte 3 VMware virtual disk
0 belong 0x434f5744 VMware
>4 byte 3 virtual disk
>>32 lelong x (%d/
>>36 lelong x \b%d/
>>40 lelong x \b%d)
>8 byte 2 VMware undoable disk
>4 byte 2 undoable disk
>>32 string >\0 (%s)

View File

@ -17,6 +17,9 @@
##>4 byte 0 revision 0
>4 byte 0
##>>14 lelong x (Serial %lX)
# non-Vorbis content: FLAC (Free Loss-lessy Audio Codec,
# http://flac.sourceforge.net)
>>28 string fLaC \b, FLAC audio
# --- First vorbis packet - general header ---
>>28 string \x01vorbis \b, Vorbis audio,
>>>35 lelong !0 UNKNOWN VERSION %lu,
@ -29,19 +32,19 @@
# Minimal, nominal and maximal bitrates specified when encoding
>>>>48 string <\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff \b,
# The above tests if at least one of these is specified:
>>>>>44 lelong !-1
>>>>>52 lelong !-1
# Vorbis RC2 has a bug which puts -1000 in the min/max bitrate fields
# instead of -1.
# Vorbis 1.0 uses 0 instead of -1.
>>>>>>44 lelong !-1000
>>>>>>>44 lelong !0
>>>>>>>>44 lelong x >%lu
>>>>>48 lelong !-1
>>>>>>48 lelong x ~%lu
>>>>>52 lelong !-1
>>>>>>52 lelong !0
>>>>>>>52 lelong !-1000
>>>>>>>>52 lelong x <%lu
>>>>>48 lelong !-1
>>>>>>48 lelong x ~%lu
>>>>>44 lelong !-1
>>>>>>44 lelong !-1000
>>>>>>>44 lelong !0
>>>>>>>>44 lelong x >%lu
>>>>>48 string <\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff bps
# -- Second vorbis header packet - the comments
# A kludge to read the vendor string. It's a counted string, not a
@ -52,7 +55,7 @@
# in a different place, so we must use an indirect offset.
>>>(84.b+85) string \x03vorbis
>>>>(84.b+96) string/c Xiphophorus\ libVorbis\ I \b, created by: Xiphophorus libVorbis I
>>>>>(84.b+120) string >00000000 %.8s
>>>>>(84.b+120) string >00000000
# Map to beta version numbers:
>>>>>>(84.b+120) string <20000508 (<beta1 - prepublic)
>>>>>>(84.b+120) string 20000508 (beta1/2)
@ -74,6 +77,7 @@
>>>>>>(84.b+120) string >20011231 (pre-1.0 CVS)
# For the 1.0 release, Xiphophorus is replaced by Xiph.Org
>>>>(84.b+96) string/c Xiph.Org\ libVorbis\ I \b, created by: Xiph.Org libVorbis I
>>>>>(84.b+117) string >00000000 %.8s
>>>>>(84.b+117) string >00000000
>>>>>>(84.b+117) string <20020717 (pre-1.0 CVS)
>>>>>>(84.b+117) string 20020717 (1.0)
>>>>>>(84.b+117) string >20020717 (post-1.0 CVS)

View File

@ -1,3 +1,16 @@
#------------------------------------------------------------------------------
# wordprocessors: file(1) magic fo word processors.
#
####### PWP file format used on Smith Corona Personal Word Processors:
2 string \040\040\040\040\040\040\040\040\040\040\040ML4D\040\'92 Smith Corona PWP
>24 byte 2 \b, single spaced
>24 byte 3 \b, 1.5 spaced
>24 byte 4 \b, double spaced
>25 byte 0x42 \b, letter
>25 byte 0x54 \b, legal
>26 byte 0x46 \b, A4
#WordPerfect type files Version 1.6 - PLEASE DO NOT REMOVE THIS LINE
0 string \377WPC\020\000\000\000\022\012\001\001\000\000\000\000 (WP) loadable text
>15 byte 0 Optimized for Intel
@ -89,3 +102,10 @@
>8 long 18219264 WordPerfect graphic image (1.0)
>8 long 18219520 WordPerfect graphic image (2.0)
#end of WordPerfect type files Version 1.6 - PLEASE DO NOT REMOVE THIS LINE
# Hangul (Korean) Word Processor File
0 string HWP\ Document\ File Hangul (Korean) Word Processor File
# CosmicBook, from Benoît Rouits
0 string CSBK Ted Neslson's CosmicBook hypertext file

View File

@ -0,0 +1,25 @@
#------------------------------------------------------------------------------
# xwindows: file(1) magic for various X/Window system file formats.
# Compiled X Keymap
# XKM (compiled X keymap) files (including version and byte ordering)
1 string mkx Compiled XKB Keymap: lsb,
>0 byte >0 version %d
>0 byte =0 obsolete
0 string xkm Compiled XKB Keymap: msb,
>3 byte >0 version %d
>0 byte =0 obsolete
# xfsdump archive
0 string xFSdump0 xfsdump archive
>8 long x (version %d)
# Jaleo XFS files
0 long 395726 Jaleo XFS file
>4 long x - version %ld
>8 long x - [%ld -
>20 long x %ldx
>24 long x %ldx
>28 long 1008 YUV422]
>28 long 1000 RGB24]

View File

@ -1,6 +1,4 @@
#pkgdata_DATA = magic magic.mime magic.mgc magic.mime.mgc
pkglibdir = @prefix@/lib/rpm
pkglib_DATA = magic magic.mime magic.mgc magic.mime.mgc
pkgdata_DATA = magic magic.mime magic.mgc magic.mime.mgc
EXTRA_DIST = magic2mime Localstuff Header magic.mime $(magic_FRAGMENTS)
@ -18,10 +16,10 @@ magic: Header Localstuff $(magic_FRAGMENTS)
done >> $@
magic.mgc: magic
$(top_builddir)/src/file -C -m $(srcdir)/magic
$(top_builddir)/src/file -C -m magic
magic.mime.mgc: magic.mime
$(top_builddir)/src/file -C -m $(srcdir)/magic.mime
$(top_builddir)/src/file -C -m magic.mime
magic_FRAGMENTS = \
Magdir/acorn \
@ -45,7 +43,9 @@ Magdir/blender \
Magdir/blit \
Magdir/bout \
Magdir/bsdi \
Magdir/cad \
Magdir/c-lang \
Magdir/c64 \
Magdir/cddb \
Magdir/chi \
Magdir/chord \
@ -54,11 +54,12 @@ Magdir/citrus \
Magdir/claris \
Magdir/clipper \
Magdir/commands \
Magdir/communications \
Magdir/compress \
Magdir/console \
Magdir/convex \
Magdir/ctags \
Magdir/cvs \
Magdir/dact \
Magdir/database \
Magdir/diamond \
Magdir/diff \
@ -70,12 +71,16 @@ Magdir/editors \
Magdir/elf \
Magdir/encore \
Magdir/epoc \
Magdir/fcs \
Magdir/filesystems \
Magdir/flash \
Magdir/fonts \
Magdir/frame \
Magdir/freebsd \
Magdir/fsav \
Magdir/games \
Magdir/geos \
Magdir/gcc \
Magdir/gimp \
Magdir/gnu \
Magdir/grace \
@ -110,6 +115,7 @@ Magdir/mcrypt \
Magdir/mime \
Magdir/mips \
Magdir/mirage \
Magdir/misctools \
Magdir/mkid \
Magdir/mlssa \
Magdir/mmdf \
@ -123,6 +129,7 @@ Magdir/netbsd \
Magdir/netscape \
Magdir/news \
Magdir/nitpicker \
Magdir/ocaml \
Magdir/octave \
Magdir/olf \
Magdir/os2 \
@ -136,13 +143,16 @@ Magdir/pdp \
Magdir/perl \
Magdir/pgp \
Magdir/pkgadd \
Magdir/plan9 \
Magdir/plus5 \
Magdir/printer \
Magdir/project \
Magdir/psdbms \
Magdir/psion \
Magdir/pulsar \
Magdir/pyramid \
Magdir/python \
Magdir/revision \
Magdir/riff \
Magdir/rpm \
Magdir/rtf \
@ -150,8 +160,10 @@ Magdir/sc \
Magdir/sccs \
Magdir/sendmail \
Magdir/sequent \
Magdir/sgi \
Magdir/sgml \
Magdir/sharc \
Magdir/sinclair \
Magdir/sketch \
Magdir/smalltalk \
Magdir/sniffer \
@ -172,6 +184,7 @@ Magdir/typeset \
Magdir/unknown \
Magdir/uuencode \
Magdir/varied.out \
Magdir/varied.script \
Magdir/vax \
Magdir/vicar \
Magdir/visx \
@ -179,8 +192,9 @@ Magdir/vms \
Magdir/vmware \
Magdir/vorbis \
Magdir/vxl \
Magdir/wordperfect \
Magdir/wordprocessors \
Magdir/xdelta \
Magdir/xenix \
Magdir/xwindows \
Magdir/zilog \
Magdir/zyxel

497
file/magic/Makefile.in Normal file
View File

@ -0,0 +1,497 @@
# Makefile.in generated by automake 1.7.9 from Makefile.am.
# @configure_input@
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
# 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@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = ..
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
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 = :
host_triplet = @host@
ACLOCAL = @ACLOCAL@
AMDEP_FALSE = @AMDEP_FALSE@
AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FSECT5_FALSE = @FSECT5_FALSE@
FSECT5_TRUE = @FSECT5_TRUE@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
MAKEINFO = @MAKEINFO@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
RANLIB = @RANLIB@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
ac_ct_CC = @ac_ct_CC@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
datadir = @datadir@
exec_prefix = @exec_prefix@
fsect = @fsect@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localstatedir = @localstatedir@
mandir = @mandir@
oldincludedir = @oldincludedir@
prefix = @prefix@
program_transform_name = @program_transform_name@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
pkgdata_DATA = magic magic.mime magic.mgc magic.mime.mgc
EXTRA_DIST = magic2mime Localstuff Header magic.mime $(magic_FRAGMENTS)
CLEANFILES = magic magic.mgc magic.mime.mgc
magic_FRAGMENTS = \
Magdir/acorn \
Magdir/adi \
Magdir/adventure \
Magdir/allegro \
Magdir/alliant \
Magdir/alpha \
Magdir/amanda \
Magdir/amigaos \
Magdir/animation \
Magdir/apl \
Magdir/apple \
Magdir/applix \
Magdir/archive \
Magdir/asterix \
Magdir/att3b \
Magdir/audio \
Magdir/bFLT \
Magdir/blender \
Magdir/blit \
Magdir/bout \
Magdir/bsdi \
Magdir/cad \
Magdir/c-lang \
Magdir/c64 \
Magdir/cddb \
Magdir/chi \
Magdir/chord \
Magdir/cisco \
Magdir/citrus \
Magdir/claris \
Magdir/clipper \
Magdir/commands \
Magdir/communications \
Magdir/compress \
Magdir/console \
Magdir/convex \
Magdir/ctags \
Magdir/dact \
Magdir/database \
Magdir/diamond \
Magdir/diff \
Magdir/digital \
Magdir/dolby \
Magdir/dump \
Magdir/dyadic \
Magdir/editors \
Magdir/elf \
Magdir/encore \
Magdir/epoc \
Magdir/fcs \
Magdir/filesystems \
Magdir/flash \
Magdir/fonts \
Magdir/frame \
Magdir/freebsd \
Magdir/fsav \
Magdir/games \
Magdir/geos \
Magdir/gcc \
Magdir/gimp \
Magdir/gnu \
Magdir/grace \
Magdir/gringotts \
Magdir/hdf \
Magdir/hitachi-sh \
Magdir/hp \
Magdir/human68k \
Magdir/ibm370 \
Magdir/ibm6000 \
Magdir/iff \
Magdir/images \
Magdir/intel \
Magdir/interleaf \
Magdir/island \
Magdir/ispell \
Magdir/java \
Magdir/jpeg \
Magdir/karma \
Magdir/lecter \
Magdir/lex \
Magdir/lif \
Magdir/linux \
Magdir/lisp \
Magdir/mach \
Magdir/macintosh \
Magdir/magic \
Magdir/mail.news \
Magdir/maple \
Magdir/mathematica \
Magdir/mcrypt \
Magdir/mime \
Magdir/mips \
Magdir/mirage \
Magdir/misctools \
Magdir/mkid \
Magdir/mlssa \
Magdir/mmdf \
Magdir/modem \
Magdir/motorola \
Magdir/msdos \
Magdir/msvc \
Magdir/natinst \
Magdir/ncr \
Magdir/netbsd \
Magdir/netscape \
Magdir/news \
Magdir/nitpicker \
Magdir/ocaml \
Magdir/octave \
Magdir/olf \
Magdir/os2 \
Magdir/os9 \
Magdir/osf1 \
Magdir/palm \
Magdir/parix \
Magdir/pbm \
Magdir/pdf \
Magdir/pdp \
Magdir/perl \
Magdir/pgp \
Magdir/pkgadd \
Magdir/plan9 \
Magdir/plus5 \
Magdir/printer \
Magdir/project \
Magdir/psdbms \
Magdir/psion \
Magdir/pulsar \
Magdir/pyramid \
Magdir/python \
Magdir/revision \
Magdir/riff \
Magdir/rpm \
Magdir/rtf \
Magdir/sc \
Magdir/sccs \
Magdir/sendmail \
Magdir/sequent \
Magdir/sgi \
Magdir/sgml \
Magdir/sharc \
Magdir/sinclair \
Magdir/sketch \
Magdir/smalltalk \
Magdir/sniffer \
Magdir/softquad \
Magdir/spectrum \
Magdir/sql \
Magdir/sun \
Magdir/sysex \
Magdir/teapot \
Magdir/terminfo \
Magdir/tex \
Magdir/tgif \
Magdir/ti-8x \
Magdir/timezone \
Magdir/troff \
Magdir/tuxedo \
Magdir/typeset \
Magdir/unknown \
Magdir/uuencode \
Magdir/varied.out \
Magdir/varied.script \
Magdir/vax \
Magdir/vicar \
Magdir/visx \
Magdir/vms \
Magdir/vmware \
Magdir/vorbis \
Magdir/vxl \
Magdir/wordprocessors \
Magdir/xdelta \
Magdir/xenix \
Magdir/xwindows \
Magdir/zilog \
Magdir/zyxel
subdir = magic
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
DIST_SOURCES =
DATA = $(pkgdata_DATA)
DIST_COMMON = $(srcdir)/Makefile.in Makefile.am
all: all-am
.SUFFIXES:
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
cd $(top_srcdir) && \
$(AUTOMAKE) --gnu magic/Makefile
Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in $(top_builddir)/config.status
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
distclean-libtool:
-rm -f libtool
uninstall-info-am:
pkgdataDATA_INSTALL = $(INSTALL_DATA)
install-pkgdataDATA: $(pkgdata_DATA)
@$(NORMAL_INSTALL)
$(mkinstalldirs) $(DESTDIR)$(pkgdatadir)
@list='$(pkgdata_DATA)'; for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
f="`echo $$p | sed -e 's|^.*/||'`"; \
echo " $(pkgdataDATA_INSTALL) $$d$$p $(DESTDIR)$(pkgdatadir)/$$f"; \
$(pkgdataDATA_INSTALL) $$d$$p $(DESTDIR)$(pkgdatadir)/$$f; \
done
uninstall-pkgdataDATA:
@$(NORMAL_UNINSTALL)
@list='$(pkgdata_DATA)'; for p in $$list; do \
f="`echo $$p | sed -e 's|^.*/||'`"; \
echo " rm -f $(DESTDIR)$(pkgdatadir)/$$f"; \
rm -f $(DESTDIR)$(pkgdatadir)/$$f; \
done
tags: TAGS
TAGS:
ctags: CTAGS
CTAGS:
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
top_distdir = ..
distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
distdir: $(DISTFILES)
$(mkinstalldirs) $(distdir)/Magdir
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
list='$(DISTFILES)'; for file in $$list; do \
case $$file in \
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
esac; \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
dir="/$$dir"; \
$(mkinstalldirs) "$(distdir)$$dir"; \
else \
dir=''; \
fi; \
if test -d $$d/$$file; then \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
fi; \
cp -pR $$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 $(DATA)
installdirs:
$(mkinstalldirs) $(DESTDIR)$(pkgdatadir)
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:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
distclean-generic:
-rm -f $(CONFIG_CLEAN_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 distclean-libtool
dvi: dvi-am
dvi-am:
info: info-am
info-am:
install-data-am: install-pkgdataDATA
install-exec-am:
install-info: install-info-am
install-man:
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-info-am uninstall-pkgdataDATA
.PHONY: all all-am check check-am clean clean-generic clean-libtool \
distclean distclean-generic distclean-libtool distdir dvi \
dvi-am info info-am install install-am install-data \
install-data-am install-exec install-exec-am install-info \
install-info-am install-man install-pkgdataDATA install-strip \
installcheck installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-generic \
mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \
uninstall-info-am uninstall-pkgdataDATA
magic: Header Localstuff $(magic_FRAGMENTS)
cat $(srcdir)/Header $(srcdir)/Localstuff > $@
for frag in $(magic_FRAGMENTS); do \
if test -f $(srcdir)/$$frag; then \
f=$(srcdir)/$$frag; \
else \
f=$$frag; \
fi; \
cat $$f; \
done >> $@
magic.mgc: magic
$(top_builddir)/src/file -C -m magic
magic.mime.mgc: magic.mime
$(top_builddir)/src/file -C -m magic.mime
# 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:

View File

@ -86,19 +86,21 @@
# Microsoft WAVE format (*.wav)
# [GRR 950115: probably all of the shorts and longs should be leshort/lelong]
# Microsoft RIFF
0 string RIFF audio/unknown
0 string RIFF
# - WAVE format
>8 string WAVE audio/x-wav
>8 string AVI video/x-msvideo
#
0 belong 0x2e7261fd application/x-realaudio
>8 string CDRA image/x-coreldraw
# MPEG Layer 3 sound files
0 beshort &0xffe0 audio/mpeg
#MP3 with ID3 tag
0 string ID3 audio/mpeg
# Ogg/Vorbis
0 string OggS audio/x-ogg
0 string OggS audio/ogg
#------------------------------------------------------------------------------
# c-lang: file(1) magic for C programs or various scripts
@ -143,6 +145,8 @@
#
# zsh/ash/ae/nawk/gawk magic from cameron@cs.unsw.oz.au (Cameron Simpson)
0 string #!/bin/zsh application/x-shellscript
0 string #!/usr/bin/zsh application/x-shellscript
0 string #!/usr/local/bin/zsh application/x-shellscript
0 string #!\ /usr/local/bin/zsh application/x-shellscript
0 string #!/usr/local/bin/ash application/x-shellscript
@ -198,6 +202,9 @@
0 string PK\003\004 application/x-zip
# RAR archiver (Greg Roelofs, newt@uchicago.edu)
0 string Rar! application/x-rar
# According to gzip.h, this is the correct byte order for packed data.
0 string \037\036 application/octet-stream
#
@ -253,7 +260,7 @@
0 lelong&0x8080ffff 0x0000041a application/x-arc squeezed
0 lelong&0x8080ffff 0x0000061a application/x-arc crunched
0 leshort 0xea60 application/octet-stream x-arj
0 leshort 0xea60 application/x-arj
# LHARC/LHA archiver (Greg Roelofs, newt@uchicago.edu)
2 string -lh0- application/x-lharc lh0
@ -304,6 +311,7 @@
0 string \<!doctype\ HTML text/html
0 string \<!DOCTYPE\ HTML text/html
0 string \<!doctype\ html text/html
0 string \<!doctype\ HTML text/html
#------------------------------------------------------------------------------
# images: file(1) magic for image formats (see also "c-lang" for XPM bitmaps)
@ -397,6 +405,7 @@
0 string Forward\ to message/rfc822 7bit
0 string Pipe\ to message/rfc822 7bit
0 string Return-Path: message/rfc822 7bit
0 string Received: message/rfc822
0 string Path: message/news 8bit
0 string Xref: message/news 8bit
0 string From: message/rfc822 7bit
@ -456,8 +465,8 @@
#>34 string >\0 (%s)
# Texinfo and GNU Info, from Daniel Quinlan (quinlan@yggdrasil.com)
#0 string \\input\ texinfo Texinfo source text
#0 string This\ is\ Info\ file GNU Info text
0 string \\input\ texinfo text/x-texinfo
0 string This\ is\ Info\ file text/x-info
# correct TeX magic for Linux (and maybe more)
# from Peter Tobias (tobias@server.et-inf.fho-emden.de)
@ -486,8 +495,6 @@
0 string MOVI video/sgi
4 string moov video/quicktime moov
4 string mdat video/quicktime mdat
# MNG
0 string \x8aMNG video/x-mng
# The contributor claims:
# I couldn't find a real magic number for these, however, this
# -appears- to work. Note that it might catch other files, too,
@ -545,3 +552,239 @@
# MNG Video Format, <URL:http://www.libpng.org/pub/mng/spec/>
0 string \x8aMNG video/x-mng
0 string \x8aJNG video/x-jng
#------------------------------------------------------------------------------
# Hierarchical Data Format, used to facilitate scientific data exchange
# specifications at http://hdf.ncsa.uiuc.edu/
0 belong 0x0e031301 Hierarchical Data Format (version 4) data
0 string \211HDF\r\n\032 Hierarchical Data Format (version 5) data
# Adobe Photoshop
0 string 8BPS image/x-photoshop
# Felix von Leitner <felix-file@fefe.de>
0 string d8:announce application/x-bittorrent
# lotus 1-2-3 document
0 belong 0x00001a00 application/x-123
0 belong 0x00000200 application/x-123
# MS Access database
4 string Standard\ Jet\ DB application/msaccess
## magic for XBase files
#0 byte 0x02
#>8 leshort >0
#>>12 leshort 0 application/x-dbf
#
#0 byte 0x03
#>8 leshort >0
#>>12 leshort 0 application/x-dbf
#
#0 byte 0x04
#>8 leshort >0
#>>12 leshort 0 application/x-dbf
#
#0 byte 0x05
#>8 leshort >0
#>>12 leshort 0 application/x-dbf
#
#0 byte 0x30
#>8 leshort >0
#>>12 leshort 0 application/x-dbf
#
#0 byte 0x43
#>8 leshort >0
#>>12 leshort 0 application/x-dbf
#
#0 byte 0x7b
#>8 leshort >0
#>>12 leshort 0 application/x-dbf
#
#0 byte 0x83
#>8 leshort >0
#>>12 leshort 0 application/x-dbf
#
#0 byte 0x8b
#>8 leshort >0
#>>12 leshort 0 application/x-dbf
#
#0 byte 0x8e
#>8 leshort >0
#>>12 leshort 0 application/x-dbf
#
#0 byte 0xb3
#>8 leshort >0
#>>12 leshort 0 application/x-dbf
#
#0 byte 0xf5
#>8 leshort >0
#>>12 leshort 0 application/x-dbf
#
#0 leshort 0x0006 application/x-dbt
# Debian has entries for the old PGP formats:
# pgp: file(1) magic for Pretty Good Privacy
# see http://lists.gnupg.org/pipermail/gnupg-devel/1999-September/016052.html
0 beshort 0x9900 text/PGP key public ring
0 beshort 0x9501 text/PGP key security ring
0 beshort 0x9500 text/PGP key security ring
0 beshort 0xa600 text/PGP encrypted data
0 string -----BEGIN\040PGP text/PGP armored data
>15 string PUBLIC\040KEY\040BLOCK- public key block
>15 string MESSAGE- message
>15 string SIGNED\040MESSAGE- signed message
>15 string PGP\040SIGNATURE- signature
0 beshort 0x8501 data
#
# GnuPG Magic:
#
0 beshort 0x9901 text/GnuPG key public ring
0 beshort 0x8501 text/OpenPGP data
# flash: file(1) magic for Macromedia Flash file format
#
# See
#
# http://www.macromedia.com/software/flash/open/
#
0 string FWS
>3 byte x application/x-shockwave-flash
# The following paramaters are created for Namazu.
# <http://www.namazu.org/>
#
# 1999/08/13
#0 string \<!--\ MHonArc text/html; x-type=mhonarc
0 string BZh application/x-bzip2
# 1999/09/09
# VRML (suggested by Masao Takaku)
0 string #VRML\ V1.0\ ascii model/vrml
0 string #VRML\ V2.0\ utf8 model/vrml
#------------------------------------------------------------------------------
# ichitaro456: file(1) magic for Just System Word Processor Ichitaro
#
# Contributor kenzo-:
# Reversed-engineered JS Ichitaro magic numbers
#
0 string DOC
>43 byte 0x14 application/ichitaro4
>144 string JDASH application/ichitaro4
0 string DOC
>43 byte 0x15 application/ichitaro5
0 string DOC
>43 byte 0x16 application/ichitaro6
#------------------------------------------------------------------------------
# office97: file(1) magic for MicroSoft Office files
#
# Contributor kenzo-:
# Reversed-engineered MS Office magic numbers
#
#0 string \320\317\021\340\241\261\032\341
#>48 byte 0x1B application/excel
2080 string Microsoft\ Excel\ 5.0\ Worksheet application/excel
2114 string Biff5 application/excel
0 string \224\246\056 application/msword
0 belong 0x31be0000 application/msword
0 string PO^Q` application/msword
0 string \320\317\021\340\241\261\032\341
>546 string bjbj application/msword
>546 string jbjb application/msword
512 string R\0o\0o\0t\0\ \0E\0n\0t\0r\0y application/msword
2080 string Microsoft\ Word\ 6.0\ Document application/msword
2080 string Documento\ Microsoft\ Word\ 6 application/msword
2112 string MSWordDoc application/msword
#0 string \320\317\021\340\241\261\032\341 application/powerpoint
0 string \320\317\021\340\241\261\032\341 application/msword
0 string #\ PaCkAgE\ DaTaStReAm application/x-svr4-package
# WinNT/WinCE PE files (Warner Losh, imp@village.org)
#
128 string PE\000\000 application/octet-stream
0 string PE\000\000 application/octet-stream
# miscellaneous formats
0 string LZ application/octet-stream
# .EXE formats (Greg Roelofs, newt@uchicago.edu)
#
0 string MZ
>24 string @ application/octet-stream
0 string MZ
>30 string Copyright\ 1989-1990\ PKWARE\ Inc. application/x-zip
0 string MZ
>30 string PKLITE\ Copr. application/x-zip
0 string MZ
>36 string LHa's\ SFX application/x-lha
0 string MZ application/octet-stream
# LHA archiver
2 string -lh
>6 string - application/x-lha
# Zoo archiver
20 lelong 0xfdc4a7dc application/x-zoo
# ARC archiver
0 lelong&0x8080ffff 0x0000081a application/x-arc
0 lelong&0x8080ffff 0x0000091a application/x-arc
0 lelong&0x8080ffff 0x0000021a application/x-arc
0 lelong&0x8080ffff 0x0000031a application/x-arc
0 lelong&0x8080ffff 0x0000041a application/x-arc
0 lelong&0x8080ffff 0x0000061a application/x-arc
# Microsoft Outlook's Transport Neutral Encapsulation Format (TNEF)
0 lelong 0x223e9f78 application/ms-tnef
#
# QuickTime format
# Contributer: Peter Breton
#
0 string MOVI video/quicktime
4 string moov video/quicktime
4 string mdat video/quicktime
# Video Formate
0 string RIFF
# AVI == Audio Video Interleave
>8 string AVI\
#>0xbc string >\0 video/x-%s
>>0xbc string DIV3 video/x-DivX-3
>>0xbc string div3 video/x-divX-3
>>0xbc string DIV4 video/x-DivX-4
>>0x70 string DX50 video/x-DIVX-5
>>0x70 string MP4 video/x-MPEG-4
>>0xbc string DIVX video/x-DivX
>8 string WAVE audio/x-wav
# From: stephane.loeuillet@tiscali.f
# http://www.djvuzone.org/
0 string AT&TFORM image/x.djvu

View File

@ -1,6 +1,6 @@
#! /usr/local/bin/perl
# -*- PERL -*-
# Id: magic2mime,v 1.1 1998/02/15 23:18:53 christos Exp
# $Id: magic2mime,v 1.2 2003/03/23 04:17:27 christos Exp $
# Copyright (c) 1996, 1997 vax@linkdead.paranoia.com (VaX#n8)
#
# Usage: echo 'your-file-output-here' | file_to_ctype.pl

View File

@ -4,7 +4,7 @@
# Created: 1993-05-16
# Public domain
# Id: mkinstalldirs,v 1.2 2000/11/13 00:30:49 christos Exp
# $Id: mkinstalldirs,v 1.2 2000/11/13 00:30:49 christos Exp $
errstatus=0

Some files were not shown because too many files have changed in this diff Show More