]> granicus.if.org Git - file/commitdiff
new string/[Bcb] magic from anton, and adjustments to the magic files to
authorChristos Zoulas <christos@zoulas.com>
Sun, 28 Nov 1999 20:02:28 +0000 (20:02 +0000)
committerChristos Zoulas <christos@zoulas.com>
Sun, 28 Nov 1999 20:02:28 +0000 (20:02 +0000)
use it.

19 files changed:
Makefile.in
aclocal.m4
config.h.in
configure
configure.in
doc/magic.man
magic/Magdir/commands
magic/Magdir/fonts
magic/Magdir/sgml
magic/Magdir/vmware [new file with mode: 0644]
src/acconfig.h
src/apprentice.c
src/ascmagic.c
src/compress.c
src/file.c
src/file.h
src/patchlevel.h
src/print.c
src/softmagic.c

index a356bc93238d3bb6b606600ecda8149726c95710..c45b012a5c92b4f72da627c5cb0c2c2559c4beb1 100644 (file)
@@ -1,4 +1,4 @@
-# Makefile.in generated automatically by automake 1.4 from Makefile.am
+# Makefile.in generated automatically by automake 1.4a from Makefile.am
 
 # Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
 # This Makefile.in is free software; the Free Software Foundation
@@ -48,9 +48,10 @@ AUTOMAKE = @AUTOMAKE@
 AUTOHEADER = @AUTOHEADER@
 
 INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_DATA = @INSTALL_DATA@
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_FLAG =
 transform = @program_transform_name@
 
 NORMAL_INSTALL = :
@@ -119,7 +120,7 @@ missing mkinstalldirs
 
 DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
 
-TAR = tar
+TAR = gtar
 GZIP_ENV = --best
 SOURCES = $(file_SOURCES)
 OBJECTS = $(file_OBJECTS)
@@ -184,8 +185,8 @@ install-binPROGRAMS: $(bin_PROGRAMS)
        $(mkinstalldirs) $(DESTDIR)$(bindir)
        @list='$(bin_PROGRAMS)'; for p in $$list; do \
          if test -f $$p; then \
-           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)/'`; \
+           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)/'`; \
          else :; fi; \
        done
 
@@ -380,7 +381,7 @@ distdir: $(DISTFILES)
        @for file in $(DISTFILES); do \
          d=$(srcdir); \
          if test -d $$d/$$file; then \
-           cp -pr $$/$$file $(distdir)/$$file; \
+           cp -pr $$d/$$file $(distdir)/$$file; \
          else \
            test -f $(distdir)/$$file \
            || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
@@ -412,7 +413,7 @@ uninstall: uninstall-am
 all-am: Makefile $(PROGRAMS) $(MANS) $(DATA) config.h
 all-redirect: all-am
 install-strip:
-       $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
+       $(MAKE) $(AM_MAKEFLAGS) INSTALL_STRIP_FLAG=-s install
 installdirs:
        $(mkinstalldirs)  $(DESTDIR)$(bindir) $(DESTDIR)$(mandir)/man1 \
                $(DESTDIR)$(mandir)/man4 $(DESTDIR)$(datadir)
index 15f85742ab0f4c5a1d8e46e747376df9df49a40b..c62b0c88817793a9bf54489aeb201aff3317f828 100644 (file)
@@ -1,7 +1,7 @@
-dnl aclocal.m4 generated automatically by aclocal 1.3
+dnl aclocal.m4 generated automatically by aclocal 1.4a
 
-dnl Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
-dnl This Makefile.in is free software; the Free Software Foundation
+dnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
 
@@ -100,7 +100,9 @@ dnl Usage:
 dnl AM_INIT_AUTOMAKE(package,version, [no-define])
 
 AC_DEFUN(AM_INIT_AUTOMAKE,
-[AC_REQUIRE([AM_PROG_INSTALL])
+[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]
@@ -110,8 +112,8 @@ if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
   AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
 fi
 ifelse([$3],,
-AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE")
-AC_DEFINE_UNQUOTED(VERSION, "$VERSION"))
+AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
+AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
 AC_REQUIRE([AM_SANITY_CHECK])
 AC_REQUIRE([AC_ARG_PROGRAM])
 dnl FIXME This is truly gross.
@@ -123,15 +125,6 @@ AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
 AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
 AC_REQUIRE([AC_PROG_MAKE_SET])])
 
-
-# serial 1
-
-AC_DEFUN(AM_PROG_INSTALL,
-[AC_REQUIRE([AC_PROG_INSTALL])
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
-AC_SUBST(INSTALL_SCRIPT)dnl
-])
-
 #
 # Check to make sure that the build environment is sane.
 #
index 5f30873899441d55af1708184a8e42f18412ce8c..116676b7af4113cff50f66c475a9dbfb8be39cbd 100644 (file)
 /* Define if you have the ANSI C header files.  */
 #undef STDC_HEADERS
 
-/* Autoheader needs me */
-#define PACKAGE "file"
-
-/* Autoheader needs me */
-#define VERSION "3.27"
-
 /* Define if builtin ELF support is enabled.  */
 #undef BUILTIN_ELF
 
 /* Define if you have the strtoul function.  */
 #undef HAVE_STRTOUL
 
+/* Define if you have the <locale.h> header file.  */
+#undef HAVE_LOCALE_H
+
 /* Define if you have the <unistd.h> header file.  */
 #undef HAVE_UNISTD_H
+
+/* Name of package */
+#undef PACKAGE
+
+/* Version number of package */
+#undef VERSION
+
index 48ee2786038d17ba2926cb9142b450f12dd68a32..565652494724f3d4381bd3c411def3ce511ae074 100755 (executable)
--- a/configure
+++ b/configure
@@ -608,11 +608,8 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
 
 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
 
-
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
-
 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
-echo "configure:616: checking whether build environment is sane" >&5
+echo "configure:613: checking whether build environment is sane" >&5
 # Just in case
 sleep 1
 echo timestamp > conftestfile
@@ -669,7 +666,7 @@ test "$program_suffix" != NONE &&
 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
 
 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:673: checking whether ${MAKE-make} sets \${MAKE}" >&5
+echo "configure:670: checking whether ${MAKE-make} sets \${MAKE}" >&5
 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -696,6 +693,7 @@ else
 fi
 
 
+
 PACKAGE=file
 
 VERSION=3.27
@@ -715,7 +713,7 @@ EOF
 
 missing_dir=`cd $ac_aux_dir && pwd`
 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
-echo "configure:719: checking for working aclocal" >&5
+echo "configure:717: 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.
@@ -728,7 +726,7 @@ else
 fi
 
 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
-echo "configure:732: checking for working autoconf" >&5
+echo "configure:730: 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.
@@ -741,7 +739,7 @@ else
 fi
 
 echo $ac_n "checking for working automake""... $ac_c" 1>&6
-echo "configure:745: checking for working automake" >&5
+echo "configure:743: 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.
@@ -754,7 +752,7 @@ else
 fi
 
 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
-echo "configure:758: checking for working autoheader" >&5
+echo "configure:756: 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.
@@ -767,7 +765,7 @@ else
 fi
 
 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
-echo "configure:771: checking for working makeinfo" >&5
+echo "configure:769: 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.
@@ -785,7 +783,7 @@ fi
 
 
 echo $ac_n "checking for builtin ELF support""... $ac_c" 1>&6
-echo "configure:789: checking for builtin ELF support" >&5
+echo "configure:787: 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"
@@ -811,7 +809,7 @@ fi
 
 
 echo $ac_n "checking for ELF core file support""... $ac_c" 1>&6
-echo "configure:815: checking for ELF core file support" >&5
+echo "configure:813: 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"
@@ -839,7 +837,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:843: checking for $ac_word" >&5
+echo "configure:841: 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
@@ -869,7 +867,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:873: checking for $ac_word" >&5
+echo "configure:871: 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
@@ -920,7 +918,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:924: checking for $ac_word" >&5
+echo "configure:922: 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
@@ -952,7 +950,7 @@ fi
 fi
 
 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:956: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:954: 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.
@@ -963,12 +961,12 @@ cross_compiling=$ac_cv_prog_cc_cross
 
 cat > conftest.$ac_ext << EOF
 
-#line 967 "configure"
+#line 965 "configure"
 #include "confdefs.h"
 
 main(){return(0);}
 EOF
-if { (eval echo configure:972: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:970: \"$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
@@ -994,12 +992,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:998: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:996: 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:1003: checking whether we are using GNU C" >&5
+echo "configure:1001: 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
@@ -1008,7 +1006,7 @@ else
   yes;
 #endif
 EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1012: \"$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:1010: \"$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
@@ -1027,7 +1025,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:1031: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:1029: 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
@@ -1070,7 +1068,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:1074: checking for a BSD compatible install" >&5
+echo "configure:1072: 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
@@ -1123,7 +1121,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:1127: checking whether ln -s works" >&5
+echo "configure:1125: 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
@@ -1145,7 +1143,7 @@ fi
 
 
 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:1149: checking how to run the C preprocessor" >&5
+echo "configure:1147: checking how to run the C preprocessor" >&5
 # On Suns, sometimes $CPP names a directory.
 if test -n "$CPP" && test -d "$CPP"; then
   CPP=
@@ -1160,13 +1158,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 1164 "configure"
+#line 1162 "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:1170: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1168: \"$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
   :
@@ -1177,13 +1175,13 @@ else
   rm -rf conftest*
   CPP="${CC-cc} -E -traditional-cpp"
   cat > conftest.$ac_ext <<EOF
-#line 1181 "configure"
+#line 1179 "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:1187: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1185: \"$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
   :
@@ -1194,13 +1192,13 @@ else
   rm -rf conftest*
   CPP="${CC-cc} -nologo -E"
   cat > conftest.$ac_ext <<EOF
-#line 1198 "configure"
+#line 1196 "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:1204: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1202: \"$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
   :
@@ -1225,12 +1223,12 @@ fi
 echo "$ac_t""$CPP" 1>&6
 
 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:1229: checking for ANSI C header files" >&5
+echo "configure:1227: 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 1234 "configure"
+#line 1232 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 #include <stdarg.h>
@@ -1238,7 +1236,7 @@ else
 #include <float.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1242: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1240: \"$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*
@@ -1255,7 +1253,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 1259 "configure"
+#line 1257 "configure"
 #include "confdefs.h"
 #include <string.h>
 EOF
@@ -1273,7 +1271,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 1277 "configure"
+#line 1275 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 EOF
@@ -1294,7 +1292,7 @@ if test "$cross_compiling" = yes; then
   :
 else
   cat > conftest.$ac_ext <<EOF
-#line 1298 "configure"
+#line 1296 "configure"
 #include "confdefs.h"
 #include <ctype.h>
 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@@ -1305,7 +1303,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
 exit (0); }
 
 EOF
-if { (eval echo configure:1309: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1307: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   :
 else
@@ -1329,19 +1327,19 @@ EOF
 fi
 
 echo $ac_n "checking whether sys/types.h defines makedev""... $ac_c" 1>&6
-echo "configure:1333: checking whether sys/types.h defines makedev" >&5
+echo "configure:1331: 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 1338 "configure"
+#line 1336 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 int main() {
 return makedev(0, 0);
 ; return 0; }
 EOF
-if { (eval echo configure:1345: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1343: \"$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
@@ -1359,17 +1357,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:1363: checking for sys/mkdev.h" >&5
+echo "configure:1361: 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 1368 "configure"
+#line 1366 "configure"
 #include "confdefs.h"
 #include <sys/mkdev.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1373: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1371: \"$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*
@@ -1397,17 +1395,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:1401: checking for sys/sysmacros.h" >&5
+echo "configure:1399: 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 1406 "configure"
+#line 1404 "configure"
 #include "confdefs.h"
 #include <sys/sysmacros.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1411: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1409: \"$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*
@@ -1435,12 +1433,12 @@ fi
 fi
 
 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
-echo "configure:1439: checking for sys/wait.h that is POSIX.1 compatible" >&5
+echo "configure:1437: 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 1444 "configure"
+#line 1442 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/wait.h>
@@ -1456,7 +1454,7 @@ wait (&s);
 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
 ; return 0; }
 EOF
-if { (eval echo configure:1460: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1458: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_header_sys_wait_h=yes
 else
@@ -1480,17 +1478,57 @@ 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:1484: checking for $ac_hdr" >&5
+echo "configure:1482: 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"
+#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; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+else
+  echo "$ac_t""no" 1>&6
+fi
+done
+
+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
 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 1489 "configure"
+#line 1527 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1494: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1532: \"$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,12 +1556,12 @@ done
 
 
 echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:1522: checking for working const" >&5
+echo "configure:1560: 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 1527 "configure"
+#line 1565 "configure"
 #include "confdefs.h"
 
 int main() {
@@ -1572,7 +1610,7 @@ ccp = (char const *const *) p;
 
 ; return 0; }
 EOF
-if { (eval echo configure:1576: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1614: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_const=yes
 else
@@ -1593,12 +1631,12 @@ EOF
 fi
 
 echo $ac_n "checking for off_t""... $ac_c" 1>&6
-echo "configure:1597: checking for off_t" >&5
+echo "configure:1635: 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 1602 "configure"
+#line 1640 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -1626,12 +1664,12 @@ EOF
 fi
 
 echo $ac_n "checking for size_t""... $ac_c" 1>&6
-echo "configure:1630: checking for size_t" >&5
+echo "configure:1668: 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 1635 "configure"
+#line 1673 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -1659,12 +1697,12 @@ EOF
 fi
 
 echo $ac_n "checking for st_rdev in struct stat""... $ac_c" 1>&6
-echo "configure:1663: checking for st_rdev in struct stat" >&5
+echo "configure:1701: 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 1668 "configure"
+#line 1706 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/stat.h>
@@ -1672,7 +1710,7 @@ int main() {
 struct stat s; s.st_rdev;
 ; return 0; }
 EOF
-if { (eval echo configure:1676: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1714: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_struct_st_rdev=yes
 else
@@ -1694,12 +1732,12 @@ fi
 
 
 echo $ac_n "checking for uint8_t""... $ac_c" 1>&6
-echo "configure:1698: checking for uint8_t" >&5
+echo "configure:1736: 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 1703 "configure"
+#line 1741 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -1727,12 +1765,12 @@ EOF
 fi
 
 echo $ac_n "checking for uint16_t""... $ac_c" 1>&6
-echo "configure:1731: checking for uint16_t" >&5
+echo "configure:1769: 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 1736 "configure"
+#line 1774 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -1760,12 +1798,12 @@ EOF
 fi
 
 echo $ac_n "checking for uint32_t""... $ac_c" 1>&6
-echo "configure:1764: checking for uint32_t" >&5
+echo "configure:1802: 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 1769 "configure"
+#line 1807 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -1794,7 +1832,7 @@ fi
 
 
 echo $ac_n "checking for long long""... $ac_c" 1>&6
-echo "configure:1798: checking for long long" >&5
+echo "configure:1836: 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
@@ -1805,13 +1843,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 1809 "configure"
+#line 1847 "configure"
 #include "confdefs.h"
 int main() {
 long long foo = 0;
 exit(sizeof(long long) < sizeof(long)); }
 EOF
-if { (eval echo configure:1815: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1853: \"$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
@@ -1840,12 +1878,12 @@ else
   long64='unsigned long';
 fi
 echo $ac_n "checking for uint64_t""... $ac_c" 1>&6
-echo "configure:1844: checking for uint64_t" >&5
+echo "configure:1882: 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 1849 "configure"
+#line 1887 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -1876,7 +1914,7 @@ fi
 
 
 echo $ac_n "checking size of uint8_t""... $ac_c" 1>&6
-echo "configure:1880: checking size of uint8_t" >&5
+echo "configure:1918: 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
@@ -1884,7 +1922,7 @@ else
   ac_cv_sizeof_uint8_t=0
 else
   cat > conftest.$ac_ext <<EOF
-#line 1888 "configure"
+#line 1926 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #ifdef STDC_HEADERS
@@ -1900,7 +1938,7 @@ main()
   exit(0);
 }
 EOF
-if { (eval echo configure:1904: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1942: \"$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
@@ -1921,7 +1959,7 @@ EOF
 
 
 echo $ac_n "checking size of uint16_t""... $ac_c" 1>&6
-echo "configure:1925: checking size of uint16_t" >&5
+echo "configure:1963: 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
@@ -1929,7 +1967,7 @@ else
   ac_cv_sizeof_uint16_t=0
 else
   cat > conftest.$ac_ext <<EOF
-#line 1933 "configure"
+#line 1971 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #ifdef STDC_HEADERS
@@ -1945,7 +1983,7 @@ main()
   exit(0);
 }
 EOF
-if { (eval echo configure:1949: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1987: \"$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
@@ -1966,7 +2004,7 @@ EOF
 
 
 echo $ac_n "checking size of uint32_t""... $ac_c" 1>&6
-echo "configure:1970: checking size of uint32_t" >&5
+echo "configure:2008: 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
@@ -1974,7 +2012,7 @@ else
   ac_cv_sizeof_uint32_t=0
 else
   cat > conftest.$ac_ext <<EOF
-#line 1978 "configure"
+#line 2016 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #ifdef STDC_HEADERS
@@ -1990,7 +2028,7 @@ main()
   exit(0);
 }
 EOF
-if { (eval echo configure:1994: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2032: \"$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
@@ -2011,7 +2049,7 @@ EOF
 
 
 echo $ac_n "checking size of uint64_t""... $ac_c" 1>&6
-echo "configure:2015: checking size of uint64_t" >&5
+echo "configure:2053: 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
@@ -2019,7 +2057,7 @@ else
   ac_cv_sizeof_uint64_t=0
 else
   cat > conftest.$ac_ext <<EOF
-#line 2023 "configure"
+#line 2061 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #ifdef STDC_HEADERS
@@ -2035,7 +2073,7 @@ main()
   exit(0);
 }
 EOF
-if { (eval echo configure:2039: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2077: \"$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
@@ -2059,12 +2097,12 @@ EOF
 for ac_func in strerror strtoul
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2063: checking for $ac_func" >&5
+echo "configure:2101: 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 2068 "configure"
+#line 2106 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -2087,7 +2125,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:2091: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2129: \"$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
index 111ba092a5e89bd51bbc122f23279760f88dccf4..c1b166a99acb41cc7bb50e1e91a459570da3006a 100644 (file)
@@ -41,6 +41,7 @@ AC_HEADER_STDC
 AC_HEADER_MAJOR
 AC_HEADER_SYS_WAIT
 AC_CHECK_HEADERS(unistd.h)
+AC_CHECK_HEADERS(locale.h)
 
 dnl Checks for typedefs, structures, and compiler characteristics.
 AC_C_CONST
index aebd9f958e1e8d469cd8a9f2f695f681e24596b3..55ad4a4f3059b136b891e58f7c8359eb6aa80c88 100644 (file)
@@ -36,7 +36,14 @@ 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.
+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.
 .IP date
 A four-byte value interpreted as a unix date.
 .IP beshort
@@ -205,4 +212,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.15 1998/08/13 17:32:24 christos Exp $
+.\" @(#)$Id: magic.man,v 1.16 1999/11/28 20:02:29 christos Exp $
index 743336d85f0bc7b84997a22bcafa58e7d08fe107..16da180861e0aa49df7365a2a3137fd95e8abb79 100644 (file)
@@ -3,90 +3,46 @@
 # commands:  file(1) magic for various shells and interpreters
 #
 0      string          :\ shell archive or commands for antique kernel text
-0      string          #!/bin/sh               Bourne shell script text
-0      string          #!\ /bin/sh             Bourne shell script text
-0      string          #!\     /bin/sh         Bourne shell script text
-0      string          #!/bin/csh              C shell script text
-0      string          #!\ /bin/csh            C shell script text
-0      string          #!\     /bin/csh        C shell script text
+0      string/b        #!\ /bin/sh             Bourne shell script text
+0      string/b        #!\ /bin/csh            C shell script text
 # korn shell magic, sent by George Wu, gwu@clyde.att.com
-0      string          #!/bin/ksh              Korn shell script text
-0      string          #!\ /bin/ksh            Korn shell script text
-0      string          #!\     /bin/ksh        Korn shell script text
-0      string          #!/bin/tcsh             Tenex C shell script text
-0      string          #!\ /bin/tcsh           Tenex C shell script text
-0      string          #!\     /bin/tcsh       Tenex C shell script text
-0      string          #!/usr/local/tcsh       Tenex C shell script text
-0      string          #!\ /usr/local/tcsh     Tenex C shell script text
-0      string          #!/usr/local/bin/tcsh   Tenex C shell script text
-0      string          #!\ /usr/local/bin/tcsh Tenex C shell script text
-0      string          #!\     /usr/local/bin/tcsh     Tenex C shell script text
+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
+
 #
 # zsh/ash/ae/nawk/gawk magic from cameron@cs.unsw.oz.au (Cameron Simpson)
-0      string          #!/usr/local/bin/zsh    Paul Falstad's zsh
-0      string          #!\ /usr/local/bin/zsh  Paul Falstad's zsh
-0      string          #!\     /usr/local/bin/zsh      Paul Falstad's zsh
-0      string          #!/usr/local/bin/ash    Neil Brown's ash
-0      string          #!\ /usr/local/bin/ash  Neil Brown's ash
-0      string          #!\     /usr/local/bin/ash      Neil Brown's ash
-0      string          #!/usr/local/bin/ae     Neil Brown's ae
-0      string          #!\ /usr/local/bin/ae   Neil Brown's ae
-0      string          #!\     /usr/local/bin/ae       Neil Brown's ae
-0      string          #!/bin/nawk             new awk script text
-0      string          #!\ /bin/nawk           new awk script text
-0      string          #!\     /bin/nawk               new awk script text
-0      string          #!/usr/bin/nawk         new awk script text
-0      string          #!\ /usr/bin/nawk       new awk script text
-0      string          #!\     /usr/bin/nawk   new awk script text
-0      string          #!/usr/local/bin/nawk   new awk script text
-0      string          #!\ /usr/local/bin/nawk new awk script text
-0      string          #!\     /usr/local/bin/nawk     new awk script text
-0      string          #!/bin/gawk             GNU awk script text
-0      string          #!\ /bin/gawk           GNU awk script text
-0      string          #!\     /bin/gawk               GNU awk script text
-0      string          #!/usr/bin/gawk         GNU awk script text
-0      string          #!\ /usr/bin/gawk       GNU awk script text
-0      string          #!\     /usr/bin/gawk   GNU awk script text
-0      string          #!/usr/local/bin/gawk   GNU awk script text
-0      string          #!\ /usr/local/bin/gawk GNU awk script text
-0      string          #!\     /usr/local/bin/gawk     GNU awk script text
+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          #!/bin/awk              awk commands text
-0      string          #!\ /bin/awk            awk commands text
-0      string          #!\     /bin/awk                awk commands text
-0      string          #!/usr/bin/awk          awk commands text
-0      string          #!\ /usr/bin/awk        awk commands text
-0      string          #!\     /usr/bin/awk    awk commands text
+0      string/b        #!\ /bin/awk            awk commands text
+0      string/b        #!\ /usr/bin/awk        awk commands text
 0      string          BEGIN                   awk commands 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          #!/bin/perl                     perl commands text
-0      string          #!\ /bin/perl                   perl commands text
-0      string          #!\     /bin/perl               perl commands text
+0      string/b        #!\ /bin/perl                   perl commands text
 0      string          eval\ "exec\ /bin/perl          perl commands text
-0      string          #!/usr/bin/perl                 perl commands text
-0      string          #!\ /usr/bin/perl               perl commands text
-0      string          #!\     /usr/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          #!/usr/local/bin/perl           perl commands text
-0      string          #!\ /usr/local/bin/perl         perl commands text
-0      string          #!\     /usr/local/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
 
 # AT&T Bell Labs' Plan 9 shell
-0      string          #!/bin/rc       Plan 9 rc shell script text
-0      string          #!\ /bin/rc     Plan 9 rc shell script text
-0      string          #!\     /bin/rc Plan 9 rc shell script text
+0      string/b        #!\ /bin/rc     Plan 9 rc shell script text
 
 # bash shell magic, from Peter Tobias (tobias@server.et-inf.fho-emden.de)
-0      string          #!/bin/bash     Bourne-Again shell script text
-0      string          #!\ /bin/bash   Bourne-Again shell script text
-0      string          #!\     /bin/bash       Bourne-Again shell script text
-0      string          #!/usr/local/bin/bash   Bourne-Again shell script text
-0      string          #!\ /usr/local/bin/bash Bourne-Again shell script text
-0      string          #!\     /usr/local/bin/bash     Bourne-Again shell script text
+0      string/b        #!\ /bin/bash   Bourne-Again shell script text
+0      string/b        #!\ /usr/local/bin/bash Bourne-Again shell script text
 
 # generic shell magic
 0      string          #!\ /                   a
index 91fc7f8d80268c72a245858c7513fd48e3b09118..d0dc225993c67d7a81a1c42598953089d0f0b431 100644 (file)
@@ -46,3 +46,6 @@
 7      belong          0x00564944      DOS code page font data (from Linux?)
 4098   string          DOSFONT         DOSFONT2 encrypted font data
 
+# downloadable fonts for browser (prints type) anthon@mnt.org
+0      string          PFR1            PFR1 font
+>102   string          >0              \b: %s
index 359b83b29eb566a56689da5159271813f40b8b39..e831c3c3f9e0339162dbac87d38f80a78a8437eb 100644 (file)
@@ -3,26 +3,18 @@
 # sgml:  file(1) magic for Standard Generalized Markup Language
 # HyperText Markup Language (HTML) is an SGML document type,
 # from Daniel Quinlan (quinlan@yggdrasil.com)
-0   string      \<!DOCTYPE\ HTML    HTML document text
-0   string      \<!doctype\ html    HTML document text
-0   string      \<HEAD      HTML document text
-0   string      \<head      HTML document text
-0   string      \<TITLE     HTML document text
-0   string      \<title     HTML document text
-0   string      \<html      HTML document text
-0   string      \<HTML      HTML document text
+# adapted to string extenstions by Anthon van der Neut <anthon@mnt.org)
+0   string/cB  \<!doctype\ html        HTML document text
+0   string/c   \<head                  HTML document text
+0   string/c   \<title                 HTML document text
+0   string/c   \<html                  HTML document text
 
 # Extensible markup language (XML), a subset of SGML
 # from Marc Prud'hommeaux (marc@apocalypse.org)
-0       string          \<?xml          XML document text
-0       string          \<?XML          XML document text
-0       string          \<?Xml          XML document text
-
-# SGML, mostly from rph@sq
-0   string      \<!DOCTYPE  exported SGML document text
-0   string      \<!doctype  exported SGML document text
-0   string      \<!SUBDOC   exported SGML subdocument text
-0   string      \<!subdoc   exported SGML subdocument text
-0   string      \<!--       exported SGML document text
+0   string/c   \<?xml                  XML document text
 
 
+# SGML, mostly from rph@sq
+0   string/c   \<!doctype              exported SGML document text
+0   string/c   \<!subdoc               exported SGML subdocument text
+0   string     \<!--                   exported SGML document text
diff --git a/magic/Magdir/vmware b/magic/Magdir/vmware
new file mode 100644 (file)
index 0000000..22291a6
--- /dev/null
@@ -0,0 +1,9 @@
+
+# -----------------------------------------------------------
+# 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       VMware virtual disk 
+>32    lelong x                (%d/
+>36    lelong x                \b%d/
+>40    lelong x                \b%d)
index 43df0768028a717231a18b736f0060b2accc1b47..4cd46b7fde4fe113d4ac075d38532451699019fc 100644 (file)
@@ -2,7 +2,7 @@
 #define PACKAGE "file"
 
 /* Autoheader needs me */
-#define VERSION "3.27"
+#define VERSION "3.29"
 
 /* Define if builtin ELF support is enabled.  */
 #undef BUILTIN_ELF
index 46ac353d129ceefb0d426e3d5c37dc02fb962871..07429c8ca134f4316b8448fdc017e109e9102a64 100644 (file)
@@ -33,7 +33,7 @@
 #include "file.h"
 
 #ifndef        lint
-FILE_RCSID("@(#)$Id: apprentice.c,v 1.29 1999/10/31 22:23:03 christos Exp $")
+FILE_RCSID("@(#)$Id: apprentice.c,v 1.30 1999/11/28 20:02:28 christos Exp $")
 #endif /* lint */
 
 #define        EATAB {while (isascii((unsigned char) *l) && \
@@ -336,6 +336,28 @@ int *ndx, check;
                ++l;
                m->mask = signextend(m, strtoul(l, &l, 0));
                eatsize(&l);
+       } else if (STRING == m->type) {
+               m->mask = 0L;
+               if (*l == '/') { 
+                       while (!isspace(*++l)) {
+                               switch (*l) {
+                               case CHAR_IGNORE_LOWERCASE:
+                                       m->mask |= STRING_IGNORE_LOWERCASE;
+                                       break;
+                               case CHAR_COMPACT_BLANK:
+                                       m->mask |= STRING_COMPACT_BLANK;
+                                       break;
+                               case CHAR_COMPACT_OPTIONAL_BLANK:
+                                       m->mask |=
+                                           STRING_COMPACT_OPTIONAL_BLANK;
+                                       break;
+                               default:
+                                       magwarn("string extension %c invalid",
+                                           *l);
+                                       return -1;
+                               }
+                       }
+               }
        } else
                m->mask = ~0L;
        EATAB;
index 355881f61832181a66413bea6fbf9bfa51d5144c..bda2391557d5031ed44b07f4d49a2e4627e1f5dd 100644 (file)
@@ -38,7 +38,7 @@
 #include "names.h"
 
 #ifndef        lint
-FILE_RCSID("@(#)$Id: ascmagic.c,v 1.24 1999/02/14 17:16:00 christos Exp $")
+FILE_RCSID("@(#)$Id: ascmagic.c,v 1.25 1999/11/28 20:02:29 christos Exp $")
 #endif /* lint */
 
                        /* an optimisation over plain strcmp() */
@@ -93,7 +93,7 @@ int nbytes;   /* size actually read */
 
        /* Make sure we are dealing with ascii text before looking for tokens */
        for (i = 0; i < nbytes; i++) {
-               if (!isascii(buf[i]))
+               if (!isascii(buf[i]) && !isalpha(buf[i]))
                        return 0;       /* not all ASCII */
        }
 
index 951f864f554a839f9f786951cd93d134e4ab81e6..7b73e315faa843bdfe044ad896408349ea7af0ad 100644 (file)
@@ -19,7 +19,7 @@
 #include <sys/wait.h>
 #endif
 #ifndef lint
-FILE_RCSID("@(#)$Id: compress.c,v 1.14 1999/10/31 22:23:03 christos Exp $")
+FILE_RCSID("@(#)$Id: compress.c,v 1.15 1999/11/28 20:02:29 christos Exp $")
 #endif
 
 
@@ -35,6 +35,7 @@ static struct {
     { "\037\240", 2, { "gzip", "-cdq", NULL }, 1 },    /* SCO LZH */
     /* the standard pack utilities do not accept standard input */
     { "\037\036", 2, { "gzip", "-cdq", NULL }, 0 },    /* packed */
+    { "BZh",      3, { "bzip2", "-d", NULL }, 1 },     /* bzip2-ed */
 };
 
 static int ncompr = sizeof(compr) / sizeof(compr[0]);
index dc64bdb1b9810c6321a72573898e2b8e2b192b3a..c32ccbefb3fc2364469dde952c8906a82f8140fa 100644 (file)
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>    /* for read() */
 #endif
+#ifdef HAVE_LOCALE_H
+#include <locale.h>
+#endif
 
 #include <netinet/in.h>                /* for byte swapping */
 
 #include "patchlevel.h"
 
 #ifndef        lint
-FILE_RCSID("@(#)$Id: file.c,v 1.47 1999/10/31 22:23:03 christos Exp $")
+FILE_RCSID("@(#)$Id: file.c,v 1.48 1999/11/28 20:02:29 christos Exp $")
 #endif /* lint */
 
 
@@ -110,6 +113,10 @@ main(argc, argv)
        int c;
        int check = 0, didsomefiles = 0, errflg = 0, ret = 0, app = 0;
 
+#ifdef LC_CTYPE
+       setlocale(LC_CTYPE, ""); /* makes islower etc work for other langs */
+#endif
+
        if ((progname = strrchr(argv[0], '/')) != NULL)
                progname++;
        else
index a481ef0d394fa378b939e1d42fba8e168ae2f90d..0206fa89d9eb53d8fe2bd62d2b00d4a6c8de6958 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * file.h - definitions for file(1) program
- * @(#)$Id: file.h,v 1.29 1999/02/14 17:16:06 christos Exp $
+ * @(#)$Id: file.h,v 1.30 1999/11/28 20:02:29 christos Exp $
  *
  * Copyright (c) Ian F. Darwin, 1987.
  * Written by Ian F. Darwin.
@@ -81,6 +81,15 @@ struct magic {
        char desc[MAXDESC];     /* description */
 };
 
+#define BIT(A)   (1 << (A))
+#define STRING_IGNORE_LOWERCASE                BIT(0)
+#define STRING_COMPACT_BLANK           BIT(1)
+#define STRING_COMPACT_OPTIONAL_BLANK  BIT(2)
+#define CHAR_IGNORE_LOWERCASE          'c'
+#define CHAR_COMPACT_BLANK             'B'
+#define CHAR_COMPACT_OPTIONAL_BLANK    'b'
+
+
 #include <stdio.h>     /* Include that here, to make sure __P gets defined */
 
 #ifndef __P
index d632767186852037dcb843325e68499b2391e75b..c5a05cfd241d97693a191def1467b08f5d8f1c67 100644 (file)
@@ -1,11 +1,15 @@
 #define        FILE_VERSION_MAJOR      3
-#define        patchlevel              28
+#define        patchlevel              29
 
 /*
  * Patchlevel file for Ian Darwin's MAGIC command.
- * $Id: patchlevel.h,v 1.28 1999/10/31 22:11:48 christos Exp $
+ * $Id: patchlevel.h,v 1.29 1999/11/28 20:02:29 christos Exp $
  *
  * $Log: patchlevel.h,v $
+ * Revision 1.29  1999/11/28 20:02:29  christos
+ * new string/[Bcb] magic from anton, and adjustments to the magic files to
+ * use it.
+ *
  * Revision 1.28  1999/10/31 22:11:48  christos
  * - add "char" type for compatibility with HP/UX
  * - recognize HP/UX syntax &=n etc.
index 03f9b0c5b04134594801d357e7e7dc88b2e42076..38dfcb3b18f107e1b6b0559e0b799280f8b46870 100644 (file)
@@ -41,7 +41,7 @@
 #include <time.h>
 
 #ifndef lint
-FILE_RCSID("@(#)$Id: print.c,v 1.29 1999/10/31 22:23:04 christos Exp $")
+FILE_RCSID("@(#)$Id: print.c,v 1.30 1999/11/28 20:02:29 christos Exp $")
 #endif  /* lint */
 
 #define SZOF(a)        (sizeof(a) / sizeof(a[0]))
@@ -68,8 +68,20 @@ struct magic *m;
        (void) fprintf(stderr, " %s%s", (m->flag & UNSIGNED) ? "u" : "",
                       /* Note: type is unsigned */
                       (m->type < SZOF(typ)) ? typ[m->type] : "*bad*");
-       if (m->mask != ~((uint32)0))
-               (void) fprintf(stderr, " & %.8x", m->mask);
+       if (m->mask != ~((uint32)0)) {
+               if(STRING != m->type)
+                       (void) fprintf(stderr, " & %.8x", m->mask);
+               else {
+                       (void) fputc('/', stderr); 
+                       if (m->mask & STRING_IGNORE_LOWERCASE) 
+                               (void) fputc(CHAR_IGNORE_LOWERCASE, stderr);
+                       if (m->mask & STRING_COMPACT_BLANK) 
+                               (void) fputc(CHAR_COMPACT_BLANK, stderr);
+                       if (m->mask & STRING_COMPACT_OPTIONAL_BLANK) 
+                               (void) fputc(CHAR_COMPACT_OPTIONAL_BLANK,
+                               stderr);
+               }
+       }
 
        (void) fprintf(stderr, ",%c", m->reln);
 
index 4a4ba80e8cc357c1cb790959efcc2b8291eb4d76..ea6fac5694c50c90c77a8930b99df739fec6a46c 100644 (file)
@@ -27,6 +27,7 @@
 
 #include <stdio.h>
 #include <string.h>
+#include <ctype.h>
 #include <stdlib.h>
 #include <time.h>
 #include <sys/types.h>
@@ -34,7 +35,7 @@
 #include "file.h"
 
 #ifndef        lint
-FILE_RCSID("@(#)$Id: softmagic.c,v 1.39 1999/02/14 17:16:12 christos Exp $")
+FILE_RCSID("@(#)$Id: softmagic.c,v 1.40 1999/11/28 20:02:30 christos Exp $")
 #endif /* lint */
 
 static int match       __P((unsigned char *, int));
@@ -428,30 +429,58 @@ struct magic *m;
                v = p->l;
                break;
 
-       case STRING:
-               l = 0;
-               /* What we want here is:
+       case STRING: {
+               /*
+                * What we want here is:
                 * v = strncmp(m->value.s, p->s, m->vallen);
                 * but ignoring any nulls.  bcmp doesn't give -/+/0
                 * and isn't universally available anyway.
                 */
+               register unsigned char *a = (unsigned char*)m->value.s;
+               register unsigned char *b = (unsigned char*)p->s;
+               register int len = m->vallen;
+               l = 0;
                v = 0;
-               {
-                       register unsigned char *a = (unsigned char*)m->value.s;
-                       register unsigned char *b = (unsigned char*)p->s;
-                       register int len = m->vallen;
-
+               if (0L == m->mask) { /* normal string: do it fast */
                        while (--len >= 0)
                                if ((v = *b++ - *a++) != '\0')
-                                       break;
+                                       break; 
+               } else { /* combine the others */
+                       while (--len >= 0) {
+                               if ((m->mask & STRING_IGNORE_LOWERCASE) &&
+                                   islower(*a)) {
+                                       if ((v = tolower(*b++) - *a++) != '\0')
+                                               break;
+                               } else if ((m->mask & STRING_COMPACT_BLANK) && 
+                                   isspace(*a)) { 
+                                       a++;
+                                       if (isspace(*b++)) {
+                                               while (isspace(*b))
+                                                       b++;
+                                       } else {
+                                               v = 1;
+                                               break;
+                                       }
+                               } else if (isspace(*a) &&
+                                   (m->mask & STRING_COMPACT_OPTIONAL_BLANK)) {
+                                       a++;
+                                       while (isspace(*b))
+                                               b++;
+                               } else {
+                                       if ((v = *b++ - *a++) != '\0')
+                                               break;
+                               }
+                       }
                }
                break;
+       }
        default:
                error("invalid type %d in mcheck().\n", m->type);
                return 0;/*NOTREACHED*/
        }
 
-       v = signextend(m, v) & m->mask;
+       if(m->type != STRING)
+               v = signextend(m, v) & m->mask;
 
        switch (m->reln) {
        case 'x':