summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristos Zoulas <christos@zoulas.com>2000-05-14 17:58:35 +0000
committerChristos Zoulas <christos@zoulas.com>2000-05-14 17:58:35 +0000
commit9aca4d30024aecbe5770947f7957cd4ff33f8ace (patch)
tree67c2b8bf1819d46e521369fd8a2c5fac0c12ca22
parent42d5d17317fe2b65dcc671ece34dac3d4f248a78 (diff)
downloadfile-git-9aca4d30024aecbe5770947f7957cd4ff33f8ace.tar.gz
- new magic for claris files
- new magic for mathematica and maple files - new magic for msvc files - new -k flag to keep going matching all possible entries - add the word executable on #! magic files, and fix the usage of the word script - lots of other magic fixes - fix typo test -> text
-rw-r--r--Makefile.am7
-rw-r--r--Makefile.in17
-rw-r--r--aclocal.m44
-rwxr-xr-xconfigure177
-rw-r--r--configure.in2
-rw-r--r--doc/file.man7
-rw-r--r--magic/Magdir/commands64
-rw-r--r--magic/Magdir/fsav34
-rw-r--r--magic/Magdir/lisp3
-rw-r--r--magic/Magdir/msdos82
-rw-r--r--magic/Magdir/netscape18
-rw-r--r--src/Makefile.std5
-rw-r--r--src/file.c58
-rw-r--r--src/patchlevel.h14
-rw-r--r--src/softmagic.c18
15 files changed, 317 insertions, 193 deletions
diff --git a/Makefile.am b/Makefile.am
index d6325ae8..bf501157 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -47,7 +47,7 @@ magic.4: Makefile magic.man
magic_FRAGMENTS = 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/blit \
-Magdir/bsdi Magdir/c-lang Magdir/chi Magdir/cisco Magdir/clipper \
+Magdir/bsdi Magdir/c-lang Magdir/chi Magdir/cisco Magdir/claris Magdir/clipper \
Magdir/commands Magdir/compress Magdir/console Magdir/convex Magdir/database \
Magdir/diamond Magdir/diff Magdir/digital Magdir/dump Magdir/elf \
Magdir/encore Magdir/epoc Magdir/filesystems Magdir/flash Magdir/fonts Magdir/frame \
@@ -55,8 +55,9 @@ Magdir/freebsd Magdir/fsav Magdir/gimp Magdir/gnu Magdir/grace Magdir/hp Magdir/
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/mcrypt Magdir/mime Magdir/mirage Magdir/mkid \
-Magdir/mmdf Magdir/modem Magdir/motorola Magdir/msdos Magdir/ncr \
+Magdir/mathematica Magdir/magic Magdir/mail.news Magdir/maple Magdir/mcrypt \
+Magdir/mime Magdir/mirage Magdir/mkid \
+Magdir/mmdf Magdir/modem Magdir/motorola Magdir/msdos Magdir/msvc Magdir/ncr \
Magdir/netbsd Magdir/netscape Magdir/news Magdir/octave Magdir/olf Magdir/os2 Magdir/os9 \
Magdir/osf1 Magdir/palm Magdir/pbm Magdir/pdf Magdir/pdp Magdir/pgp Magdir/pkgadd \
Magdir/project Magdir/plus5 Magdir/printer Magdir/psdbms Magdir/pyramid Magdir/riff \
diff --git a/Makefile.in b/Makefile.in
index bda13bdb..df4513e9 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -1,4 +1,4 @@
-# Makefile.in generated automatically by automake 1.4a from Makefile.am
+# Makefile.in generated automatically by automake 1.4 from Makefile.am
# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
@@ -48,10 +48,9 @@ AUTOMAKE = @AUTOMAKE@
AUTOHEADER = @AUTOHEADER@
INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
INSTALL_DATA = @INSTALL_DATA@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_STRIP_FLAG =
transform = @program_transform_name@
NORMAL_INSTALL = :
@@ -85,7 +84,7 @@ EXTRA_DIST = LEGAL.NOTICE MAINT PORTING Makefile.std magic2mime Localstuff Head
CLEANFILES = $(man_MANS) magic
-magic_FRAGMENTS = Magdir/adventure 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/blit Magdir/bsdi Magdir/c-lang Magdir/chi Magdir/cisco Magdir/clipper Magdir/commands Magdir/compress Magdir/convex Magdir/database Magdir/diamond Magdir/diff Magdir/digital Magdir/dump Magdir/elf Magdir/encore Magdir/filesystems Magdir/flash Magdir/fonts Magdir/frame Magdir/freebsd Magdir/fsav Magdir/gimp Magdir/gnu Magdir/grace Magdir/hp 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/mcrypt Magdir/mime Magdir/mirage Magdir/mkid Magdir/mmdf Magdir/modem Magdir/motorola Magdir/msdos Magdir/ncr Magdir/netbsd Magdir/news Magdir/octave Magdir/olf Magdir/os2 Magdir/os9 Magdir/osf1 Magdir/palm Magdir/pbm Magdir/pdf Magdir/pdp Magdir/pgp Magdir/pkgadd Magdir/project Magdir/plus5 Magdir/printer Magdir/psdbms Magdir/pyramid Magdir/riff Magdir/rpm Magdir/rtf Magdir/sc Magdir/sccs Magdir/sendmail Magdir/sequent Magdir/sgi Magdir/sgml Magdir/sniffer Magdir/softquad Magdir/spectrum Magdir/sun Magdir/teapot Magdir/terminfo Magdir/tex Magdir/ti-8x Magdir/timezone Magdir/troff Magdir/typeset Magdir/unknown Magdir/uuencode Magdir/varied.out Magdir/vax Magdir/vicar Magdir/visx Magdir/vms Magdir/wordperfect Magdir/xenix Magdir/zilog Magdir/zyxel
+magic_FRAGMENTS = 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/blit Magdir/bsdi Magdir/c-lang Magdir/chi Magdir/cisco Magdir/claris Magdir/clipper Magdir/commands Magdir/compress Magdir/console Magdir/convex Magdir/database Magdir/diamond Magdir/diff Magdir/digital Magdir/dump Magdir/elf Magdir/encore Magdir/epoc Magdir/filesystems Magdir/flash Magdir/fonts Magdir/frame Magdir/freebsd Magdir/fsav Magdir/gimp Magdir/gnu Magdir/grace Magdir/hp 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/mathematica Magdir/magic Magdir/mail.news Magdir/maple Magdir/mcrypt Magdir/mime Magdir/mirage Magdir/mkid Magdir/mmdf Magdir/modem Magdir/motorola Magdir/msdos Magdir/msvc Magdir/ncr Magdir/netbsd Magdir/netscape Magdir/news Magdir/octave Magdir/olf Magdir/os2 Magdir/os9 Magdir/osf1 Magdir/palm Magdir/pbm Magdir/pdf Magdir/pdp Magdir/pgp Magdir/pkgadd Magdir/project Magdir/plus5 Magdir/printer Magdir/psdbms Magdir/pyramid Magdir/riff Magdir/rpm Magdir/rtf Magdir/sc Magdir/sccs Magdir/sendmail Magdir/sequent Magdir/sgi Magdir/sgml Magdir/sniffer Magdir/softquad Magdir/spectrum Magdir/sun Magdir/teapot Magdir/terminfo Magdir/tex Magdir/ti-8x Magdir/timezone Magdir/troff Magdir/typeset Magdir/unknown Magdir/uuencode Magdir/varied.out Magdir/vax Magdir/vicar Magdir/visx Magdir/vms Magdir/wordperfect Magdir/xdelta Magdir/xenix Magdir/zilog Magdir/zyxel
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
@@ -120,7 +119,7 @@ missing mkinstalldirs
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
-TAR = gtar
+TAR = tar
GZIP_ENV = --best
SOURCES = $(file_SOURCES)
OBJECTS = $(file_OBJECTS)
@@ -185,8 +184,8 @@ install-binPROGRAMS: $(bin_PROGRAMS)
$(mkinstalldirs) $(DESTDIR)$(bindir)
@list='$(bin_PROGRAMS)'; for p in $$list; do \
if test -f $$p; then \
- echo " $(INSTALL_PROGRAM) $(INSTALL_STRIP_FLAG) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \
- $(INSTALL_PROGRAM) $(INSTALL_STRIP_FLAG) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
+ echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \
+ $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
else :; fi; \
done
@@ -381,7 +380,7 @@ distdir: $(DISTFILES)
@for file in $(DISTFILES); do \
d=$(srcdir); \
if test -d $$d/$$file; then \
- cp -pr $$d/$$file $(distdir)/$$file; \
+ cp -pr $$/$$file $(distdir)/$$file; \
else \
test -f $(distdir)/$$file \
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
@@ -413,7 +412,7 @@ uninstall: uninstall-am
all-am: Makefile $(PROGRAMS) $(MANS) $(DATA) config.h
all-redirect: all-am
install-strip:
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_STRIP_FLAG=-s install
+ $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
installdirs:
$(mkinstalldirs) $(DESTDIR)$(bindir) $(DESTDIR)$(mandir)/man1 \
$(DESTDIR)$(mandir)/man4 $(DESTDIR)$(datadir)
diff --git a/aclocal.m4 b/aclocal.m4
index c62b0c88..b00f3cb6 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -1,4 +1,4 @@
-dnl aclocal.m4 generated automatically by aclocal 1.4a
+dnl aclocal.m4 generated automatically by aclocal 1.4
dnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
@@ -101,8 +101,6 @@ dnl AM_INIT_AUTOMAKE(package,version, [no-define])
AC_DEFUN(AM_INIT_AUTOMAKE,
[AC_REQUIRE([AC_PROG_INSTALL])
-dnl We require 2.13 because we rely on SHELL being computed by configure.
-AC_PREREQ([2.13])
PACKAGE=[$1]
AC_SUBST(PACKAGE)
VERSION=[$2]
diff --git a/configure b/configure
index 366319d1..b084a7f7 100755
--- a/configure
+++ b/configure
@@ -693,10 +693,9 @@ else
fi
-
PACKAGE=file
-VERSION=3.30
+VERSION=3.31
if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
{ echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
@@ -713,7 +712,7 @@ EOF
missing_dir=`cd $ac_aux_dir && pwd`
echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
-echo "configure:717: checking for working aclocal" >&5
+echo "configure:716: checking for working aclocal" >&5
# Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected.
# Redirect stdin to placate older versions of autoconf. Sigh.
@@ -726,7 +725,7 @@ else
fi
echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
-echo "configure:730: checking for working autoconf" >&5
+echo "configure:729: checking for working autoconf" >&5
# Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected.
# Redirect stdin to placate older versions of autoconf. Sigh.
@@ -739,7 +738,7 @@ else
fi
echo $ac_n "checking for working automake""... $ac_c" 1>&6
-echo "configure:743: checking for working automake" >&5
+echo "configure:742: checking for working automake" >&5
# Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected.
# Redirect stdin to placate older versions of autoconf. Sigh.
@@ -752,7 +751,7 @@ else
fi
echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
-echo "configure:756: checking for working autoheader" >&5
+echo "configure:755: checking for working autoheader" >&5
# Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected.
# Redirect stdin to placate older versions of autoconf. Sigh.
@@ -765,7 +764,7 @@ else
fi
echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
-echo "configure:769: checking for working makeinfo" >&5
+echo "configure:768: checking for working makeinfo" >&5
# Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected.
# Redirect stdin to placate older versions of autoconf. Sigh.
@@ -783,7 +782,7 @@ fi
echo $ac_n "checking for builtin ELF support""... $ac_c" 1>&6
-echo "configure:787: checking for builtin ELF support" >&5
+echo "configure:786: checking for builtin ELF support" >&5
# Check whether --enable-elf or --disable-elf was given.
if test "${enable_elf+set}" = set; then
enableval="$enable_elf"
@@ -809,7 +808,7 @@ fi
echo $ac_n "checking for ELF core file support""... $ac_c" 1>&6
-echo "configure:813: checking for ELF core file support" >&5
+echo "configure:812: checking for ELF core file support" >&5
# Check whether --enable-elf-core or --disable-elf-core was given.
if test "${enable_elf_core+set}" = set; then
enableval="$enable_elf_core"
@@ -837,7 +836,7 @@ fi
# Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:841: checking for $ac_word" >&5
+echo "configure:840: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -867,7 +866,7 @@ if test -z "$CC"; then
# Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:871: checking for $ac_word" >&5
+echo "configure:870: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -918,7 +917,7 @@ fi
# Extract the first word of "cl", so it can be a program name with args.
set dummy cl; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:922: checking for $ac_word" >&5
+echo "configure:921: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -950,7 +949,7 @@ fi
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:954: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:953: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
@@ -961,12 +960,12 @@ cross_compiling=$ac_cv_prog_cc_cross
cat > conftest.$ac_ext << EOF
-#line 965 "configure"
+#line 964 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
-if { (eval echo configure:970: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:969: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ac_cv_prog_cc_works=yes
# If we can't run a trivial program, we are probably using a cross compiler.
if (./conftest; exit) 2>/dev/null; then
@@ -992,12 +991,12 @@ if test $ac_cv_prog_cc_works = no; then
{ echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:996: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:995: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
cross_compiling=$ac_cv_prog_cc_cross
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:1001: checking whether we are using GNU C" >&5
+echo "configure:1000: checking whether we are using GNU C" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1006,7 +1005,7 @@ else
yes;
#endif
EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1010: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1009: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
ac_cv_prog_gcc=yes
else
ac_cv_prog_gcc=no
@@ -1025,7 +1024,7 @@ ac_test_CFLAGS="${CFLAGS+set}"
ac_save_CFLAGS="$CFLAGS"
CFLAGS=
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:1029: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:1028: checking whether ${CC-cc} accepts -g" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1068,7 +1067,7 @@ fi
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh.
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:1072: checking for a BSD compatible install" >&5
+echo "configure:1071: checking for a BSD compatible install" >&5
if test -z "$INSTALL"; then
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -1121,7 +1120,7 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
-echo "configure:1125: checking whether ln -s works" >&5
+echo "configure:1124: checking whether ln -s works" >&5
if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1143,7 +1142,7 @@ fi
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:1147: checking how to run the C preprocessor" >&5
+echo "configure:1146: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
@@ -1158,13 +1157,13 @@ else
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp.
cat > conftest.$ac_ext <<EOF
-#line 1162 "configure"
+#line 1161 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1168: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1167: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
@@ -1175,13 +1174,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF
-#line 1179 "configure"
+#line 1178 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1185: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1184: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
@@ -1192,13 +1191,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -nologo -E"
cat > conftest.$ac_ext <<EOF
-#line 1196 "configure"
+#line 1195 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1202: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1201: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
@@ -1223,12 +1222,12 @@ fi
echo "$ac_t""$CPP" 1>&6
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:1227: checking for ANSI C header files" >&5
+echo "configure:1226: checking for ANSI C header files" >&5
if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1232 "configure"
+#line 1231 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
@@ -1236,7 +1235,7 @@ else
#include <float.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1240: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1239: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -1253,7 +1252,7 @@ rm -f conftest*
if test $ac_cv_header_stdc = yes; then
# SunOS 4.x string.h does not declare mem*, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
-#line 1257 "configure"
+#line 1256 "configure"
#include "confdefs.h"
#include <string.h>
EOF
@@ -1271,7 +1270,7 @@ fi
if test $ac_cv_header_stdc = yes; then
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
-#line 1275 "configure"
+#line 1274 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
@@ -1292,7 +1291,7 @@ if test "$cross_compiling" = yes; then
:
else
cat > conftest.$ac_ext <<EOF
-#line 1296 "configure"
+#line 1295 "configure"
#include "confdefs.h"
#include <ctype.h>
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@@ -1303,7 +1302,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
exit (0); }
EOF
-if { (eval echo configure:1307: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1306: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
:
else
@@ -1327,19 +1326,19 @@ EOF
fi
echo $ac_n "checking whether sys/types.h defines makedev""... $ac_c" 1>&6
-echo "configure:1331: checking whether sys/types.h defines makedev" >&5
+echo "configure:1330: checking whether sys/types.h defines makedev" >&5
if eval "test \"`echo '$''{'ac_cv_header_sys_types_h_makedev'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1336 "configure"
+#line 1335 "configure"
#include "confdefs.h"
#include <sys/types.h>
int main() {
return makedev(0, 0);
; return 0; }
EOF
-if { (eval echo configure:1343: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1342: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_header_sys_types_h_makedev=yes
else
@@ -1357,17 +1356,17 @@ echo "$ac_t""$ac_cv_header_sys_types_h_makedev" 1>&6
if test $ac_cv_header_sys_types_h_makedev = no; then
ac_safe=`echo "sys/mkdev.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for sys/mkdev.h""... $ac_c" 1>&6
-echo "configure:1361: checking for sys/mkdev.h" >&5
+echo "configure:1360: checking for sys/mkdev.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1366 "configure"
+#line 1365 "configure"
#include "confdefs.h"
#include <sys/mkdev.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1371: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1370: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -1395,17 +1394,17 @@ fi
if test $ac_cv_header_sys_mkdev_h = no; then
ac_safe=`echo "sys/sysmacros.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for sys/sysmacros.h""... $ac_c" 1>&6
-echo "configure:1399: checking for sys/sysmacros.h" >&5
+echo "configure:1398: checking for sys/sysmacros.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1404 "configure"
+#line 1403 "configure"
#include "confdefs.h"
#include <sys/sysmacros.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1409: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1408: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -1433,12 +1432,12 @@ fi
fi
echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
-echo "configure:1437: checking for sys/wait.h that is POSIX.1 compatible" >&5
+echo "configure:1436: checking for sys/wait.h that is POSIX.1 compatible" >&5
if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1442 "configure"
+#line 1441 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/wait.h>
@@ -1454,7 +1453,7 @@ wait (&s);
s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
; return 0; }
EOF
-if { (eval echo configure:1458: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1457: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_header_sys_wait_h=yes
else
@@ -1478,17 +1477,17 @@ for ac_hdr in unistd.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1482: checking for $ac_hdr" >&5
+echo "configure:1481: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1487 "configure"
+#line 1486 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1492: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1491: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -1518,17 +1517,17 @@ for ac_hdr in locale.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1522: checking for $ac_hdr" >&5
+echo "configure:1521: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1527 "configure"
+#line 1526 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1532: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1531: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -1556,12 +1555,12 @@ done
echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:1560: checking for working const" >&5
+echo "configure:1559: checking for working const" >&5
if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1565 "configure"
+#line 1564 "configure"
#include "confdefs.h"
int main() {
@@ -1610,7 +1609,7 @@ ccp = (char const *const *) p;
; return 0; }
EOF
-if { (eval echo configure:1614: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1613: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_const=yes
else
@@ -1631,12 +1630,12 @@ EOF
fi
echo $ac_n "checking for off_t""... $ac_c" 1>&6
-echo "configure:1635: checking for off_t" >&5
+echo "configure:1634: checking for off_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1640 "configure"
+#line 1639 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@@ -1664,12 +1663,12 @@ EOF
fi
echo $ac_n "checking for size_t""... $ac_c" 1>&6
-echo "configure:1668: checking for size_t" >&5
+echo "configure:1667: checking for size_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1673 "configure"
+#line 1672 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@@ -1697,12 +1696,12 @@ EOF
fi
echo $ac_n "checking for st_rdev in struct stat""... $ac_c" 1>&6
-echo "configure:1701: checking for st_rdev in struct stat" >&5
+echo "configure:1700: checking for st_rdev in struct stat" >&5
if eval "test \"`echo '$''{'ac_cv_struct_st_rdev'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1706 "configure"
+#line 1705 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/stat.h>
@@ -1710,7 +1709,7 @@ int main() {
struct stat s; s.st_rdev;
; return 0; }
EOF
-if { (eval echo configure:1714: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1713: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_struct_st_rdev=yes
else
@@ -1732,12 +1731,12 @@ fi
echo $ac_n "checking for uint8_t""... $ac_c" 1>&6
-echo "configure:1736: checking for uint8_t" >&5
+echo "configure:1735: checking for uint8_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_uint8_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1741 "configure"
+#line 1740 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@@ -1765,12 +1764,12 @@ EOF
fi
echo $ac_n "checking for uint16_t""... $ac_c" 1>&6
-echo "configure:1769: checking for uint16_t" >&5
+echo "configure:1768: checking for uint16_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_uint16_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1774 "configure"
+#line 1773 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@@ -1798,12 +1797,12 @@ EOF
fi
echo $ac_n "checking for uint32_t""... $ac_c" 1>&6
-echo "configure:1802: checking for uint32_t" >&5
+echo "configure:1801: checking for uint32_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_uint32_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1807 "configure"
+#line 1806 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@@ -1832,7 +1831,7 @@ fi
echo $ac_n "checking for long long""... $ac_c" 1>&6
-echo "configure:1836: checking for long long" >&5
+echo "configure:1835: checking for long long" >&5
if eval "test \"`echo '$''{'ac_cv_c_long_long'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1843,13 +1842,13 @@ if test "$cross_compiling" = yes; then
{ echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
else
cat > conftest.$ac_ext <<EOF
-#line 1847 "configure"
+#line 1846 "configure"
#include "confdefs.h"
int main() {
long long foo = 0;
exit(sizeof(long long) < sizeof(long)); }
EOF
-if { (eval echo configure:1853: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1852: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_c_long_long=yes
else
@@ -1878,12 +1877,12 @@ else
long64='unsigned long';
fi
echo $ac_n "checking for uint64_t""... $ac_c" 1>&6
-echo "configure:1882: checking for uint64_t" >&5
+echo "configure:1881: checking for uint64_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_uint64_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1887 "configure"
+#line 1886 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@@ -1914,7 +1913,7 @@ fi
echo $ac_n "checking size of uint8_t""... $ac_c" 1>&6
-echo "configure:1918: checking size of uint8_t" >&5
+echo "configure:1917: checking size of uint8_t" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_uint8_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1922,7 +1921,7 @@ else
ac_cv_sizeof_uint8_t=0
else
cat > conftest.$ac_ext <<EOF
-#line 1926 "configure"
+#line 1925 "configure"
#include "confdefs.h"
#include <sys/types.h>
#ifdef STDC_HEADERS
@@ -1938,7 +1937,7 @@ main()
exit(0);
}
EOF
-if { (eval echo configure:1942: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1941: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_sizeof_uint8_t=`cat conftestval`
else
@@ -1959,7 +1958,7 @@ EOF
echo $ac_n "checking size of uint16_t""... $ac_c" 1>&6
-echo "configure:1963: checking size of uint16_t" >&5
+echo "configure:1962: checking size of uint16_t" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_uint16_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1967,7 +1966,7 @@ else
ac_cv_sizeof_uint16_t=0
else
cat > conftest.$ac_ext <<EOF
-#line 1971 "configure"
+#line 1970 "configure"
#include "confdefs.h"
#include <sys/types.h>
#ifdef STDC_HEADERS
@@ -1983,7 +1982,7 @@ main()
exit(0);
}
EOF
-if { (eval echo configure:1987: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1986: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_sizeof_uint16_t=`cat conftestval`
else
@@ -2004,7 +2003,7 @@ EOF
echo $ac_n "checking size of uint32_t""... $ac_c" 1>&6
-echo "configure:2008: checking size of uint32_t" >&5
+echo "configure:2007: checking size of uint32_t" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_uint32_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2012,7 +2011,7 @@ else
ac_cv_sizeof_uint32_t=0
else
cat > conftest.$ac_ext <<EOF
-#line 2016 "configure"
+#line 2015 "configure"
#include "confdefs.h"
#include <sys/types.h>
#ifdef STDC_HEADERS
@@ -2028,7 +2027,7 @@ main()
exit(0);
}
EOF
-if { (eval echo configure:2032: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2031: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_sizeof_uint32_t=`cat conftestval`
else
@@ -2049,7 +2048,7 @@ EOF
echo $ac_n "checking size of uint64_t""... $ac_c" 1>&6
-echo "configure:2053: checking size of uint64_t" >&5
+echo "configure:2052: checking size of uint64_t" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_uint64_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2057,7 +2056,7 @@ else
ac_cv_sizeof_uint64_t=0
else
cat > conftest.$ac_ext <<EOF
-#line 2061 "configure"
+#line 2060 "configure"
#include "confdefs.h"
#include <sys/types.h>
#ifdef STDC_HEADERS
@@ -2073,7 +2072,7 @@ main()
exit(0);
}
EOF
-if { (eval echo configure:2077: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2076: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_sizeof_uint64_t=`cat conftestval`
else
@@ -2097,12 +2096,12 @@ EOF
for ac_func in strerror strtoul
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2101: checking for $ac_func" >&5
+echo "configure:2100: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2106 "configure"
+#line 2105 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -2125,7 +2124,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:2129: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2128: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
diff --git a/configure.in b/configure.in
index 58227009..85b65597 100644
--- a/configure.in
+++ b/configure.in
@@ -1,6 +1,6 @@
dnl Process this file with autoconf to produce a configure script.
AC_INIT(file.c)
-AM_INIT_AUTOMAKE(file, 3.30)
+AM_INIT_AUTOMAKE(file, 3.31)
AM_CONFIG_HEADER(config.h)
AC_MSG_CHECKING(for builtin ELF support)
diff --git a/doc/file.man b/doc/file.man
index 60683ca0..3d876f2e 100644
--- a/doc/file.man
+++ b/doc/file.man
@@ -1,12 +1,12 @@
.TH FILE __CSECTION__ "Copyright but distributable"
-.\" $Id: file.man,v 1.34 2000/04/11 02:32:35 christos Exp $
+.\" $Id: file.man,v 1.35 2000/05/14 17:58:36 christos Exp $
.SH NAME
file
\- determine file type
.SH SYNOPSIS
.B file
[
-.B \-bcinsvzL
+.B \-bciknsvzL
]
[
.B \-f
@@ -133,6 +133,9 @@ it handles files recognised by the command it's self (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
+Don't stop at the first match, keep going.
+.TP 8
.B \-m list
Specify an alternate list of files containing magic numbers.
This can be a single file, or a colon-separated list of files.
diff --git a/magic/Magdir/commands b/magic/Magdir/commands
index 16da1808..f7aeda45 100644
--- a/magic/Magdir/commands
+++ b/magic/Magdir/commands
@@ -2,54 +2,54 @@
#------------------------------------------------------------------------------
# commands: file(1) magic for various shells and interpreters
#
-0 string :\ shell archive or commands for antique kernel text
-0 string/b #!\ /bin/sh Bourne shell script text
-0 string/b #!\ /bin/csh C shell script text
+0 string :\ shell archive or script for antique kernel text
+0 string/b #!\ /bin/sh Bourne shell script text executable
+0 string/b #!\ /bin/csh C shell script text executable
# korn shell magic, sent by George Wu, gwu@clyde.att.com
-0 string/b #!\ /bin/ksh Korn shell script text
-0 string/b #!\ /bin/tcsh Tenex C shell script text
-0 string/b #!\ /usr/local/tcsh Tenex C shell script text
-0 string/b #!\ /usr/local/bin/tcsh Tenex C shell script text
+0 string/b #!\ /bin/ksh Korn shell script text executable
+0 string/b #!\ /bin/tcsh Tenex C shell script text executable
+0 string/b #!\ /usr/local/tcsh Tenex C shell script text executable
+0 string/b #!\ /usr/local/bin/tcsh Tenex C shell script text executable
#
# zsh/ash/ae/nawk/gawk magic from cameron@cs.unsw.oz.au (Cameron Simpson)
-0 string/b #!\ /usr/local/bin/zsh Paul Falstad's zsh
-0 string/b #!\ /usr/local/bin/ash Neil Brown's ash
-0 string/b #!\ /usr/local/bin/ae Neil Brown's ae
-0 string/b #!\ /bin/nawk new awk script text
-0 string/b #!\ /usr/bin/nawk new awk script text
-0 string/b #!\ /usr/local/bin/nawk new awk script text
-0 string/b #!\ /bin/gawk GNU awk script text
-0 string/b #!\ /usr/bin/gawk GNU awk script text
-0 string/b #!\ /usr/local/bin/gawk GNU awk script text
+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
+0 string/b #!\ /bin/nawk new awk script text executable
+0 string/b #!\ /usr/bin/nawk new awk script text executable
+0 string/b #!\ /usr/local/bin/nawk new awk script text executable
+0 string/b #!\ /bin/gawk GNU awk script text executable
+0 string/b #!\ /usr/bin/gawk GNU awk script text executable
+0 string/b #!\ /usr/local/bin/gawk GNU awk script text executable
#
-0 string/b #!\ /bin/awk awk commands text
-0 string/b #!\ /usr/bin/awk awk commands text
-0 string BEGIN awk commands text
+0 string/b #!\ /bin/awk awk script text executable
+0 string/b #!\ /usr/bin/awk awk script text executable
+0 string BEGIN awk script text
# For Larry Wall's perl language. The ``eval'' line recognizes an
# outrageously clever hack for USG systems.
# Keith Waclena <keith@cerberus.uchicago.edu>
-0 string/b #!\ /bin/perl perl commands text
-0 string eval\ "exec\ /bin/perl perl commands text
-0 string/b #!\ /usr/bin/perl perl commands text
-0 string eval\ "exec\ /usr/bin/perl perl commands text
-0 string/b #!\ /usr/local/bin/perl perl commands text
-0 string eval\ "exec\ /usr/local/bin/perl perl commands text
+0 string/b #!\ /bin/perl perl script text executable
+0 string eval\ "exec\ /bin/perl perl script text
+0 string/b #!\ /usr/bin/perl perl script text executable
+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
# AT&T Bell Labs' Plan 9 shell
-0 string/b #!\ /bin/rc Plan 9 rc shell script text
+0 string/b #!\ /bin/rc Plan 9 rc shell script text executable
# bash shell magic, from Peter Tobias (tobias@server.et-inf.fho-emden.de)
-0 string/b #!\ /bin/bash Bourne-Again shell script text
-0 string/b #!\ /usr/local/bin/bash Bourne-Again shell script text
+0 string/b #!\ /bin/bash Bourne-Again shell script text executable
+0 string/b #!\ /usr/local/bin/bash Bourne-Again shell script text executable
# generic shell magic
0 string #!\ / a
->3 string >\0 %s script text
+>3 string >\0 %s script text executable
0 string #!\ / a
->3 string >\0 %s script text
+>3 string >\0 %s script text executable
0 string #!/ a
->2 string >\0 %s script text
-0 string #!\ commands text
+>2 string >\0 %s script text executable
+0 string #!\ script text executable
>3 string >\0 for %s
diff --git a/magic/Magdir/fsav b/magic/Magdir/fsav
index 76f23569..4218936e 100644
--- a/magic/Magdir/fsav
+++ b/magic/Magdir/fsav
@@ -7,19 +7,21 @@
>11 byte >0 \b%02d-
>10 byte >0 \b%02d)
-8 byte 0x0a
->12 byte 0x07
->11 leshort >0 fsav (linux) virus (%d-
->10 byte 0 \b01-
->10 byte 1 \b02-
->10 byte 2 \b03-
->10 byte 3 \b04-
->10 byte 4 \b05-
->10 byte 5 \b06-
->10 byte 6 \b07-
->10 byte 7 \b08-
->10 byte 8 \b08-
->10 byte 9 \b10-
->10 byte 10 \b11-
->10 byte 11 \b12-
->9 byte >0 \b%02d)
+# comment this out for now because it regognizes every file where
+# the eighth character is \n
+#8 byte 0x0a
+#>12 byte 0x07
+#>11 leshort >0 fsav (linux) virus (%d-
+#>10 byte 0 \b01-
+#>10 byte 1 \b02-
+#>10 byte 2 \b03-
+#>10 byte 3 \b04-
+#>10 byte 4 \b05-
+#>10 byte 5 \b06-
+#>10 byte 6 \b07-
+#>10 byte 7 \b08-
+#>10 byte 8 \b08-
+#>10 byte 9 \b10-
+#>10 byte 10 \b11-
+#>10 byte 11 \b12-
+#>9 byte >0 \b%02d)
diff --git a/magic/Magdir/lisp b/magic/Magdir/lisp
index 43f55a0a..4064dab2 100644
--- a/magic/Magdir/lisp
+++ b/magic/Magdir/lisp
@@ -16,3 +16,6 @@
# Files produced by GNU gettext
0 long 0xDE120495 GNU-format message catalog data
0 long 0x950412DE GNU-format message catalog data
+
+#.com and .bin for MIT scheme
+0 string \372\372\372\372 MIT scheme (library?)
diff --git a/magic/Magdir/msdos b/magic/Magdir/msdos
index 5293ef58..358831ee 100644
--- a/magic/Magdir/msdos
+++ b/magic/Magdir/msdos
@@ -184,3 +184,85 @@
# 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
+
+# Winamp .avs
+#0 string Nullsoft\ AVS\ Preset\ \060\056\061\032 A plug in for Winamp ms-windows Freeware media player
+0 string Nullsoft\ AVS\ Preset\ Winamp plug in
+
+# Hyper terminal:
+0 string HyperTerminal\ hyperterm
+>15 string 1.0\ --\ HyperTerminal\ data\ file MS-windows Hyperterminal
+
+# Windows Metafont .WMF
+0 string \327\315\306\232\000\000\000\000\000\000 ms-windows metafont .wmf
+
+#tz3 files whatever that is (MS Works files)
+0 string \003\001\001\004\070\001\000\000 tz3 ms-works file
+0 string \003\002\001\004\070\001\000\000 tz3 ms-works file
+0 string \003\003\001\004\070\001\000\000 tz3 ms-works file
+
+# PGP sig files .sig
+#0 string \211\000\077\003\005\000\063\237\127 065 to \027\266\151\064\005\045\101\233\021\002 PGP sig
+0 string \211\000\077\003\005\000\063\237\127\065\027\266\151\064\005\045\101\233\021\002 PGP sig
+0 string \211\000\077\003\005\000\063\237\127\066\027\266\151\064\005\045\101\233\021\002 PGP sig
+0 string \211\000\077\003\005\000\063\237\127\067\027\266\151\064\005\045\101\233\021\002 PGP sig
+0 string \211\000\077\003\005\000\063\237\127\070\027\266\151\064\005\045\101\233\021\002 PGP sig
+0 string \211\000\077\003\005\000\063\237\127\071\027\266\151\064\005\045\101\233\021\002 PGP sig
+0 string \211\000\225\003\005\000\062\122\207\304\100\345\042 PGP sig
+
+# windows zips files .dmf
+0 string MDIF\032\000\010\000\000\000\372\046\100\175\001\000\001\036\001\000 Ms-windows special zipped file
+
+
+# Windows help file FTG FTS
+0 string \164\146\115\122\012\000\000\000\001\000\000\000 ms-windows help cache
+
+# grp old windows 3.1 group files
+0 string \120\115\103\103 Ms-windows 3.1 group files
+
+
+# lnk files windows symlinks
+0 string \114\000\000\000\001\024\002\000\000\000\000\000\300\000\000\000\000\000\000\106 ms-Windows shortcut
+
+#ico files
+0 string \000\000\001\000\001\000\040\040\020\000\000\000\000\000\350\002\000\000 Icon for ms-windows
+0 string \000\000\001\000\004\000\040\040\020\000\000\000\000\000\350\002 Icon for ms-windows
+0 string \102\101\050\000\000\000\056\000\000\000\000\000\000\000 Icon for ms-windows
+0 string \000\000\001\000\002\000\040\040\010\000\000\000\000\000\350\002 Icon for ms-windows
+0 string \000\000\001\000\006\000\020\020\020\000\000\000\000\000\050\001 Icon for ms-windows
+0 string \000\000\001\000\002\000\020\020\020\000\000\000\000\000\050\001 Icon for ms-windows
+
+
+# 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
+# then there is a copyright notice
+
+
+# .bgi files
+0 string pk\010\010BGI Borland device
+>4 string >\0 %s
+# then there is a copyright notice
+
+
+# recycled/info the windows trash bin index
+9 string \000\000\000\030\001\000\000\000 ms-windows recycled bin info
+
+
+##### put in Either Magic/font or Magic/news
+# 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
+#>3 string >\0 oops, not a font file. Cancel that.
+#it clashes with ttf files so put it lower down.
diff --git a/magic/Magdir/netscape b/magic/Magdir/netscape
index 96509d89..eb4361c0 100644
--- a/magic/Magdir/netscape
+++ b/magic/Magdir/netscape
@@ -2,10 +2,20 @@
#------------------------------------------------------------------------------
# netscape: file(1) magic for Netscape files
# "H. Nanosecond" <aldomel@ix.netcom.com>
+# version 3 and 4 I think
+#
+
+# 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
+
+# .snm Caches
+0 string #\ Netscape\ folder\ cache Netscape folder cache
+0 string \000\036\204\220\000 Netscape folder cache
+# .n2p
+# Net 2 Phone
+#0 string 123\130\071\066\061\071\071\071\060\070\061\060\061\063\060
+0 string SX961999 Net2phone
+
#
#This is files ending in .art, FIXME add more rules
0 string JG\004\016\0\0\0\0 ART
-# Netscape makes summaries of Mail and newsgroups files (DOS only I think)
-#FIXME, add more rules
-0 string #\ Netscape\ folder\ cache Netscape folder cache
-0 string \000\036\204\220\000 Netscape folder cache
diff --git a/src/Makefile.std b/src/Makefile.std
index 844d879b..85e7a9fc 100644
--- a/src/Makefile.std
+++ b/src/Makefile.std
@@ -1,6 +1,6 @@
# Makefile for file(1) cmd.
# Copyright (c) Ian F. Darwin 86/09/01 - see LEGAL.NOTICE.
-# @(#)$Id: Makefile.std,v 1.7 2000/04/11 02:39:49 christos Exp $
+# @(#)$Id: Makefile.std,v 1.8 2000/05/14 17:58:36 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.
@@ -21,7 +21,8 @@
# ever read sources, credits must appear in the documentation.
#
# 4. This notice may not be removed or altered.
-VERSION = 3.30
+#
+VERSION = 3.31
SHELL = /bin/sh
#MAGIC = /etc/magic
MAGIC = /usr/local/etc/magic
diff --git a/src/file.c b/src/file.c
index e1a3e155..4484daaf 100644
--- a/src/file.c
+++ b/src/file.c
@@ -58,14 +58,14 @@
#include "patchlevel.h"
#ifndef lint
-FILE_RCSID("@(#)$Id: file.c,v 1.50 2000/04/23 04:31:44 christos Exp $")
+FILE_RCSID("@(#)$Id: file.c,v 1.51 2000/05/14 17:58:36 christos Exp $")
#endif /* lint */
#ifdef S_IFLNK
-# define USAGE "Usage: %s [-bcinvzL] [-f namefile] [-m magicfiles] file...\n"
+# define USAGE "Usage: %s [-bciknvzL] [-f namefile] [-m magicfiles] file...\n"
#else
-# define USAGE "Usage: %s [-bcinvz] [-f namefile] [-m magicfiles] file...\n"
+# define USAGE "Usage: %s [-bciknvz] [-f namefile] [-m magicfiles] file...\n"
#endif
#ifndef MAGIC
@@ -83,7 +83,8 @@ int /* Global command-line options */
zflag = 0, /* follow (uncompress) compressed files */
sflag = 0, /* read block special files */
iflag = 0,
- nobuffer = 0; /* Do not buffer stdout */
+ nobuffer = 0, /* Do not buffer stdout */
+ kflag = 0; /* Keep going after the first match */
int /* Misc globals */
nmagic = 0; /* number of valid magic[]s */
@@ -129,23 +130,14 @@ main(argc, argv)
if (!(magicfile = getenv("MAGIC")))
magicfile = default_magicfile;
- while ((c = getopt(argc, argv, "bcdinf:m:svzL")) != EOF)
+ while ((c = getopt(argc, argv, "bcdf:ikm:nsvzL")) != EOF)
switch (c) {
- case 'v':
- (void) fprintf(stdout, "%s-%d.%d\n", progname,
- FILE_VERSION_MAJOR, patchlevel);
- (void) fprintf(stdout, "magic file from %s\n",
- magicfile);
- return 1;
case 'b':
++bflag;
break;
case 'c':
++check;
break;
- case 'n':
- ++nobuffer;
- break;
case 'd':
++debug;
break;
@@ -159,28 +151,40 @@ main(argc, argv)
unwrap(optarg);
++didsomefiles;
break;
-#ifdef S_IFLNK
- case 'L':
- ++lflag;
+ case 'i':
+ iflag++;
+ if ((mime = malloc(strlen(magicfile) + 5)) != NULL) {
+ (void)strcpy(mime, magicfile);
+ (void)strcat(mime, ".mime");
+ magicfile = mime;
+ }
+ break;
+ case 'k':
+ kflag = 1;
break;
-#endif
case 'm':
magicfile = optarg;
break;
- case 'z':
- zflag++;
+ case 'n':
+ ++nobuffer;
break;
case 's':
sflag++;
break;
- case 'i':
- iflag++;
- if ((mime = malloc(strlen(magicfile) + 5)) != NULL) {
- (void)strcpy(mime, magicfile);
- (void)strcat(mime, ".mime");
- magicfile = mime;
- }
+ case 'v':
+ (void) fprintf(stdout, "%s-%d.%d\n", progname,
+ FILE_VERSION_MAJOR, patchlevel);
+ (void) fprintf(stdout, "magic file from %s\n",
+ magicfile);
+ return 1;
+ case 'z':
+ zflag++;
break;
+#ifdef S_IFLNK
+ case 'L':
+ ++lflag;
+ break;
+#endif
case '?':
default:
errflg++;
diff --git a/src/patchlevel.h b/src/patchlevel.h
index 0c4a0057..e1edae49 100644
--- a/src/patchlevel.h
+++ b/src/patchlevel.h
@@ -1,11 +1,21 @@
#define FILE_VERSION_MAJOR 3
-#define patchlevel 30
+#define patchlevel 31
/*
* Patchlevel file for Ian Darwin's MAGIC command.
- * $Id: patchlevel.h,v 1.30 2000/04/11 02:41:17 christos Exp $
+ * $Id: patchlevel.h,v 1.31 2000/05/14 17:58:36 christos Exp $
*
* $Log: patchlevel.h,v $
+ * Revision 1.31 2000/05/14 17:58:36 christos
+ * - new magic for claris files
+ * - new magic for mathematica and maple files
+ * - new magic for msvc files
+ * - new -k flag to keep going matching all possible entries
+ * - add the word executable on #! magic files, and fix the usage of
+ * the word script
+ * - lots of other magic fixes
+ * - fix typo test -> text
+ *
* Revision 1.30 2000/04/11 02:41:17 christos
* - add support for mime output (-i)
* - make sure we free memory in case realloc fails
diff --git a/src/softmagic.c b/src/softmagic.c
index ea6fac56..6f0328cb 100644
--- a/src/softmagic.c
+++ b/src/softmagic.c
@@ -35,7 +35,7 @@
#include "file.h"
#ifndef lint
-FILE_RCSID("@(#)$Id: softmagic.c,v 1.40 1999/11/28 20:02:30 christos Exp $")
+FILE_RCSID("@(#)$Id: softmagic.c,v 1.41 2000/05/14 17:58:36 christos Exp $")
#endif /* lint */
static int match __P((unsigned char *, int));
@@ -102,6 +102,9 @@ int nbytes;
static int32 *tmpoff = NULL;
static size_t tmplen = 0;
int32 oldoff = 0;
+ int returnval = 0; /* if a match is found it is set to 1*/
+ extern int kflag;
+ int firstline = 1; /* a flag to print X\n X\n- X */
if (tmpoff == NULL)
if ((tmpoff = (int32 *) malloc(tmplen = 20)) == NULL)
@@ -121,6 +124,11 @@ int nbytes;
continue;
}
+ if (! firstline) { /* we found another match */
+ /* put a newline and '-' to do some simple formatting*/
+ printf("\n- ");
+ }
+
tmpoff[cont_level] = mprint(&p, &magic[magindex]);
/*
* If we printed something, we'll need to print
@@ -184,9 +192,13 @@ int nbytes;
}
}
}
- return 1; /* all through */
+ firstline = 0;
+ returnval = 1;
+ if (!kflag) {
+ return 1; /* don't keep searching */
+ }
}
- return 0; /* no match at all */
+ return returnval; /* This is hit if -k is set or there is no match */
}
static int32