aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid E. O'Brien <obrien@FreeBSD.org>2000-11-26 21:26:20 +0000
committerDavid E. O'Brien <obrien@FreeBSD.org>2000-11-26 21:26:20 +0000
commitebb4cbb2d07cb859f8c05af7a1bb550300cfd54f (patch)
tree61d93e2c9098ed331e5b94506d00de38ec7809ef
parent75a6cdb3a2a12f1d03a30f3a08dbba598739dcb4 (diff)
downloadsrc-ebb4cbb2d07cb859f8c05af7a1bb550300cfd54f.tar.gz
src-ebb4cbb2d07cb859f8c05af7a1bb550300cfd54f.zip
Virgin import of Christos Zoulas FILE 3.33.vendor/file/3.33
Notes
Notes: svn path=/vendor/file/dist/; revision=69216 svn path=/vendor/file/3.33/; revision=69218; tag=vendor/file/3.33
-rw-r--r--contrib/file/Magdir/audio24
-rw-r--r--contrib/file/Magdir/ctags5
-rw-r--r--contrib/file/Magdir/elf24
-rw-r--r--contrib/file/Magdir/images24
-rw-r--r--contrib/file/Magdir/macintosh18
-rw-r--r--contrib/file/Magdir/msdos49
-rw-r--r--contrib/file/Magdir/netbsd3
-rw-r--r--contrib/file/Magdir/riff2
-rw-r--r--contrib/file/Magdir/sgi11
-rw-r--r--contrib/file/Magdir/varied.out3
-rw-r--r--contrib/file/Makefile.in15
-rw-r--r--contrib/file/Makefile.std4
-rw-r--r--contrib/file/acconfig.h2
-rw-r--r--contrib/file/ascmagic.c4
-rwxr-xr-xcontrib/file/configure2
-rw-r--r--contrib/file/configure.in2
-rw-r--r--contrib/file/file.c3
-rw-r--r--contrib/file/file.h5
-rw-r--r--contrib/file/file.man96
-rw-r--r--contrib/file/mkinstalldirs39
-rw-r--r--contrib/file/patchlevel.h18
-rw-r--r--contrib/file/readelf.c4
22 files changed, 242 insertions, 115 deletions
diff --git a/contrib/file/Magdir/audio b/contrib/file/Magdir/audio
index cb051c8efb3f..0ee9f1fd9938 100644
--- a/contrib/file/Magdir/audio
+++ b/contrib/file/Magdir/audio
@@ -102,8 +102,9 @@
1080 string 8CHN 8-channel Fasttracker module sound data
1080 string CD81 8-channel Oktalyzer module sound data
1080 string OKTA 8-channel Oktalyzer module sound data
-1082 string CH
->1080 string >/0 %.2s-channel Fasttracker "oktalyzer" module sound data
+# Not good enough.
+#1082 string CH
+#>1080 string >/0 %.2s-channel Fasttracker "oktalyzer" module sound data
1080 string 16CN 16-channel Taketracker module sound data
1080 string 32CN 32-channel Taketracker module sound data
@@ -118,3 +119,22 @@
>14 beshort =1 single song,
>14 beshort >1 %d songs,
>16 beshort >0 default song: %d
+
+
+# IRCAM <mpruett@sgi.com>
+0 belong 0x64a30400 IRCAM file (NeXT)
+0 belong 0x64a30200 IRCAM file (Sun)
+0 belong 0x64a30300 IRCAM file (MIPS little-endian)
+0 belong 0x0001a364 IRCAM file
+
+# NIST SPHERE <mpruett@sgi.com>
+0 string NIST_1A\n\ \ \ 1024\n NIST SPHERE file
+
+# Sample Vision <mpruett@sgi.com>
+0 string SOUND\ SAMPLE\ DATA\ Sample Vision file
+
+# Audio Visual Research <mpruett@sgi.com>
+0 string 2BIT Audio Visual Research file
+
+# From Felix von Leitner <leitner@fefe.de>
+0 string OggS Ogg-Vorbis compressed sound file
diff --git a/contrib/file/Magdir/ctags b/contrib/file/Magdir/ctags
new file mode 100644
index 000000000000..8d439718aaa0
--- /dev/null
+++ b/contrib/file/Magdir/ctags
@@ -0,0 +1,5 @@
+
+# ----------------------------------------------------------------------------
+# ctags: file (1) magic for Exuberant Ctags files
+# From: Alexander Mai <mai@migdal.ikp.physik.tu-darmstadt.de>
+0 string !_TAG Exuberant Ctags tag file
diff --git a/contrib/file/Magdir/elf b/contrib/file/Magdir/elf
index f890acf98245..df7eab85ca92 100644
--- a/contrib/file/Magdir/elf
+++ b/contrib/file/Magdir/elf
@@ -12,12 +12,31 @@
0 string \177ELF ELF
>4 byte 0 invalid class
>4 byte 1 32-bit
-# only for MIPS R3000_BE
+# only for MIPS
>>18 beshort 8
+>>18 beshort 10
>>>36 belong &0x20 N32
>4 byte 2 64-bit
>5 byte 0 invalid byte order
>5 byte 1 LSB
+# only for MIPS R3000_BE
+>>18 leshort 8
+# only for 32-bit
+>>>4 byte 1
+>>>>36 lelong&0xf0000000 0x00000000 mips-1
+>>>>36 lelong&0xf0000000 0x10000000 mips-2
+>>>>36 lelong&0xf0000000 0x20000000 mips-3
+>>>>36 lelong&0xf0000000 0x30000000 mips-4
+>>>>36 lelong&0xf0000000 0x40000000 mips-5
+>>>>36 lelong&0xf0000000 0x50000000 mips-6
+# only for 64-bit
+>>>4 byte 2
+>>>>48 lelong&0xf0000000 0x00000000 mips-1
+>>>>48 lelong&0xf0000000 0x10000000 mips-2
+>>>>48 lelong&0xf0000000 0x20000000 mips-3
+>>>>48 lelong&0xf0000000 0x30000000 mips-4
+>>>>48 lelong&0xf0000000 0x40000000 mips-5
+>>>>48 lelong&0xf0000000 0x50000000 mips-6
>>16 leshort 0 no file type,
>>16 leshort 1 relocatable,
>>16 leshort 2 executable,
@@ -36,7 +55,8 @@
>>18 leshort 5 Motorola 88000 - invalid byte order,
>>18 leshort 6 Intel 80486,
>>18 leshort 7 Intel 80860,
->>18 leshort 8 MIPS R3000_BE - invalid byte order,
+# "officially" big endian, but binutils bfd only emits magic #8 for MIPS.
+>>18 leshort 8 MIPS R3000_LE [bfd bug],
>>18 leshort 9 Amdahl - invalid byte order,
>>18 leshort 10 MIPS R3000_LE,
>>18 leshort 11 RS6000 - invalid byte order,
diff --git a/contrib/file/Magdir/images b/contrib/file/Magdir/images
index 7b5e6cb7ebb2..b5b4e0c32877 100644
--- a/contrib/file/Magdir/images
+++ b/contrib/file/Magdir/images
@@ -24,12 +24,24 @@
# PBMPLUS images
# The next byte following the magic is always whitespace.
-0 string P1 PBM image text
-0 string P2 PGM image text
-0 string P3 PPM image text
-0 string P4 PBM "rawbits" image data
-0 string P5 PGM "rawbits" image data
-0 string P6 PPM "rawbits" image data
+0 string P1 Netpbm PBM image text
+0 string P2 Netpbm PGM image text
+0 string P3 Netpbm PPM image text
+0 string P4 Netpbm PBM "rawbits" image data
+0 string P5 Netpbm PGM "rawbits" image data
+0 string P6 Netpbm PPM "rawbits" image data
+0 string P7 Netpbm PAM image file
+
+# From: bryanh@giraffe-data.com (Bryan Henderson)
+0 string \117\072 Solitaire Image Recorder format
+>4 string \013 MGI Type 11
+>4 string \021 MGI Type 17
+0 string .MDA MicroDesign data
+>21 byte 48 version 2
+>21 byte 51 version 3
+0 string .MDP MicroDesign page data
+>21 byte 48 version 2
+>21 byte 51 version 3
# NIFF (Navy Interchange File Format, a modification of TIFF) images
0 string IIN1 NIFF image data
diff --git a/contrib/file/Magdir/macintosh b/contrib/file/Magdir/macintosh
index 841deb23c4de..b6dc91c84704 100644
--- a/contrib/file/Magdir/macintosh
+++ b/contrib/file/Magdir/macintosh
@@ -222,3 +222,21 @@
# Just in case...
102 string mBIN MacBinary III data with surprising version number
+
+# sas magic from Bruce Foster (bef@nwu.edu)
+#
+#0 string SAS SAS
+#>8 string x %s
+0 string SAS SAS
+>24 string DATA data file
+>24 string CATALOG catalog
+>24 string INDEX data file index
+>24 string VIEW data view
+# spss magic for SPSS system and portable files,
+# from Bruce Foster (bef@nwu.edu).
+
+0 long 0xc1e2c3c9 SPSS Portable File
+>40 string x %s
+
+0 string $FL2 SPSS System File
+>24 string x %s
diff --git a/contrib/file/Magdir/msdos b/contrib/file/Magdir/msdos
index 358831ee8d3e..a161daee4f83 100644
--- a/contrib/file/Magdir/msdos
+++ b/contrib/file/Magdir/msdos
@@ -175,10 +175,6 @@
>4 belong 0x06040600 wk1 document data
>4 belong 0x06800200 fmt document data
-# WordPerfect documents - Trevor Johnson <trevor@jpj.net>
-#
-1 string WPC WordPerfect document
-
# Help files
0 string ?_\3\0 MS Windows Help Data
@@ -266,3 +262,48 @@
>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.
+
+# From Doug Lee via a FreeBSD pr
+9 string GERBILDOC First Choice document
+9 string GERBILDB First Choice database
+9 string GERBILCLIP First Choice database
+0 string GERBIL First Choice device file
+9 string RABBITGRAPH RabbitGraph file
+0 string DCU1 Borland Delphi .DCU file
+0 string !<spell> MKS Spell hash list (old format)
+0 string !<spell2> MKS Spell hash list
+0 string AH Halo(TM) bitmapped font file
+0 leshort 0x601A Atari ST contiguous executable
+>14 lelong &gt;0 - not stripped
+0 leshort 0x601B Atari ST non-contig executable
+>14 lelong &gt;0 - not stripped
+0 lelong 0x08086b70 TurboC BGI file
+0 lelong 0x08084b50 TurboC Font file
+
+# WARNING: below line conflicts with Infocom game data Z-machine 3
+0 byte 0x03 DBase 3 data file
+>0x04 lelong 0 (no records)
+>0x04 lelong >0 (%ld records)
+0 byte 0x83 DBase 3 data file with memo(s)
+>0x04 lelong 0 (no records)
+>0x04 lelong >0 (%ld records)
+0 leshort 0x0006 DBase 3 index file
+0 string PMCC Windows 3.x .GRP file
+1 string RDC-meg MegaDots
+>8 byte >0x2F version %c
+>9 byte >0x2F \b.%c file
+0 lelong 0x4C
+>4 lelong 0x00021401 Windows shortcut file
+
+# DOS EPS Binary File Header
+# From: Ed Sznyter <ews@Black.Market.NET>
+0 belong 0xC5D0D3C6 DOS EPS Binary File
+>4 long >0 Postscript starts at byte %d
+>>8 long >0 length %d
+>>>12 long >0 Metafile starts at byte %d
+>>>>16 long >0 length %d
+>>>20 long >0 TIFF starts at byte %d
+>>>>24 long >0 length %d
+
+# TNEF magic From "Joomy" <joomy@se-ed.net>
+0 leshort 0x223e9f78 TNEF
diff --git a/contrib/file/Magdir/netbsd b/contrib/file/Magdir/netbsd
index 590efc1ea181..27c6a74dc84b 100644
--- a/contrib/file/Magdir/netbsd
+++ b/contrib/file/Magdir/netbsd
@@ -98,6 +98,9 @@
>12 string >\0 from '%s'
>32 lelong !0 (signal %d)
+0 belong&0377777777 045200507 NetBSD/powerpc core
+>12 string >\0 from '%s'
+
0 belong&0377777777 042400413 NetBSD/sparc demand paged
>0 byte &0x80
>>20 belong <8192 shared library
diff --git a/contrib/file/Magdir/riff b/contrib/file/Magdir/riff
index 6bf127d41f0b..8f1c3d0f4cfc 100644
--- a/contrib/file/Magdir/riff
+++ b/contrib/file/Magdir/riff
@@ -91,3 +91,5 @@
# Notation Interchange File Format (big-endian only)
>8 string NIFF \b, Notation Interchange File Format
+# SoundFont 2 <mpruett@sgi.com>
+>8 string sfbk SoundFont 2
diff --git a/contrib/file/Magdir/sgi b/contrib/file/Magdir/sgi
index 39fadae66cb6..1983f0da154e 100644
--- a/contrib/file/Magdir/sgi
+++ b/contrib/file/Magdir/sgi
@@ -167,8 +167,11 @@
#
0 string \#Inventor V IRIS Inventor 1.0 file
0 string \#Inventor V2 Open Inventor 2.0 file
-# XXX - I don't know what next thing is! It is likely to be an image
-# (or movie) format
+# GLF is OpenGL stream encoding
0 string glfHeadMagic(); GLF_TEXT
-4 belong 0x41010000 GLF_BINARY_LSB_FIRST
-4 belong 0x00000141 GLF_BINARY_MSB_FIRST
+4 belong 0x7d000000 GLF_BINARY_LSB_FIRST
+4 belong 0x0000007d GLF_BINARY_MSB_FIRST
+# GLS is OpenGL stream encoding; GLS is the successor of GLF
+0 string glsBeginGLS( GLS_TEXT
+4 belong 0x10000000 GLS_BINARY_LSB_FIRST
+4 belong 0x00000010 GLS_BINARY_MSB_FIRST
diff --git a/contrib/file/Magdir/varied.out b/contrib/file/Magdir/varied.out
index 564fc0112eac..03ca5103d5d3 100644
--- a/contrib/file/Magdir/varied.out
+++ b/contrib/file/Magdir/varied.out
@@ -23,3 +23,6 @@
# ava assembler/linker Uros Platise <uros.platise@ijs.si>
0 string avaobj AVR assembler object code
>7 string >\0 version '%s'
+# gnu gmon magic From: Eugen Dedu <dedu@ese-metz.fr>
+0 string gmon GNU prof performance data
+>4 long x - version %ld
diff --git a/contrib/file/Makefile.in b/contrib/file/Makefile.in
index b0444b249627..72bc94d03747 100644
--- a/contrib/file/Makefile.in
+++ b/contrib/file/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 = :
@@ -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/contrib/file/Makefile.std b/contrib/file/Makefile.std
index 8df917973307..cb376e69f938 100644
--- a/contrib/file/Makefile.std
+++ b/contrib/file/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.9 2000/08/05 17:36:47 christos Exp $
+# @(#)$Id: Makefile.std,v 1.10 2000/11/13 00:30:49 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.
@@ -22,7 +22,7 @@
#
# 4. This notice may not be removed or altered.
#
-VERSION = 3.32
+VERSION = 3.33
SHELL = /bin/sh
#MAGIC = /etc/magic
MAGIC = /usr/local/etc/magic
diff --git a/contrib/file/acconfig.h b/contrib/file/acconfig.h
index 1f4f5d2cfcbb..820902580d6e 100644
--- a/contrib/file/acconfig.h
+++ b/contrib/file/acconfig.h
@@ -2,7 +2,7 @@
#define PACKAGE "file"
/* Autoheader needs me */
-#define VERSION "3.32"
+#define VERSION "3.33"
/* Define if builtin ELF support is enabled. */
#undef BUILTIN_ELF
diff --git a/contrib/file/ascmagic.c b/contrib/file/ascmagic.c
index 2a76a63378ff..df048aaae6df 100644
--- a/contrib/file/ascmagic.c
+++ b/contrib/file/ascmagic.c
@@ -46,7 +46,7 @@
#include "names.h"
#ifndef lint
-FILE_RCSID("@(#)$Id: ascmagic.c,v 1.28 2000/08/05 17:36:47 christos Exp $")
+FILE_RCSID("@(#)$Id: ascmagic.c,v 1.29 2000/08/05 19:00:11 christos Exp $")
#endif /* lint */
typedef unsigned long unichar;
@@ -69,11 +69,9 @@ ascmagic(buf, nbytes)
int nbytes; /* size actually read */
{
int i;
- unsigned char *s;
char nbuf[HOWMANY+1]; /* one extra for terminating '\0' */
unichar ubuf[HOWMANY+1]; /* one extra for terminating '\0' */
int ulen;
- char *token;
struct names *p;
char *code = NULL;
diff --git a/contrib/file/configure b/contrib/file/configure
index 65590e5bbdb3..0614d097362b 100755
--- a/contrib/file/configure
+++ b/contrib/file/configure
@@ -696,7 +696,7 @@ fi
PACKAGE=file
-VERSION=3.32
+VERSION=3.33
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; }
diff --git a/contrib/file/configure.in b/contrib/file/configure.in
index 22d90974996c..1c8d1a75bf6a 100644
--- a/contrib/file/configure.in
+++ b/contrib/file/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.32)
+AM_INIT_AUTOMAKE(file, 3.33)
AM_CONFIG_HEADER(config.h)
AC_MSG_CHECKING(for builtin ELF support)
diff --git a/contrib/file/file.c b/contrib/file/file.c
index 6af9ad529950..ac770d1de172 100644
--- a/contrib/file/file.c
+++ b/contrib/file/file.c
@@ -26,6 +26,7 @@
*/
#include <stdio.h>
#include <stdlib.h>
+#include <unistd.h>
#include <string.h>
#include <sys/types.h>
#include <sys/param.h> /* for MAXPATHLEN */
@@ -55,7 +56,7 @@
#include "patchlevel.h"
#ifndef lint
-FILE_RCSID("@(#)$Id: file.c,v 1.54 2000/08/05 18:30:26 christos Exp $")
+FILE_RCSID("@(#)$Id: file.c,v 1.55 2000/08/05 19:00:12 christos Exp $")
#endif /* lint */
diff --git a/contrib/file/file.h b/contrib/file/file.h
index 1cca4e7e9533..c8ed40319254 100644
--- a/contrib/file/file.h
+++ b/contrib/file/file.h
@@ -1,6 +1,6 @@
/*
* file.h - definitions for file(1) program
- * @(#)$Id: file.h,v 1.32 2000/05/14 22:58:53 christos Exp $
+ * @(#)$Id: file.h,v 1.34 2000/11/13 00:30:49 christos Exp $
*
* Copyright (c) Ian F. Darwin, 1987.
* Written by Ian F. Darwin.
@@ -119,7 +119,6 @@ extern int tryit __P((unsigned char *, int, int));
extern int zmagic __P((unsigned char *, int));
extern void ckfprintf __P((FILE *, const char *, ...));
extern uint32 signextend __P((struct magic *, unsigned int32));
-extern int internatmagic __P((unsigned char *, int));
extern void tryelf __P((int, unsigned char *, int));
extern char *progname; /* the program name */
@@ -156,7 +155,7 @@ static const char *rcsid(const char *p) { \
return rcsid(p = id); \
}
#else
-#define FILE_RCSID(id) static char *rcsid[] = id;
+#define FILE_RCSID(id) static char rcsid[] = id;
#endif
#endif /* __file_h__ */
diff --git a/contrib/file/file.man b/contrib/file/file.man
index 198a14c2a678..6f1c261d5eb3 100644
--- a/contrib/file/file.man
+++ b/contrib/file/file.man
@@ -1,5 +1,5 @@
.TH FILE __CSECTION__ "Copyright but distributable"
-.\" $Id: file.man,v 1.36 2000/08/05 17:36:48 christos Exp $
+.\" $Id: file.man,v 1.37 2000/08/07 20:08:55 christos Exp $
.SH NAME
file
\- determine file type
@@ -51,6 +51,12 @@ People depend on knowing that all the readable files in a directory
have the word ``text'' printed.
Don't do as Berkeley did and change ``shell commands text''
to ``shell script''.
+Note that the file
+.I __MAGIC__
+is built mechanically from a large number of small files in
+the subdirectory
+.I Magdir
+in the source distribution of this program.
.PP
The filesystem tests are based on examining the return from a
.BR stat (2)
@@ -155,7 +161,7 @@ traditional human readable ones. Thus it may say
``text/plain; charset=us-ascii''
rather
than ``ASCII text''. In order for this option to work, file changes the way
-it handles files recognised by the command it's self (such as many of the
+it handles files recognised by the command itself (such as many of the
text file types, directories etc), and makes use of an alternative
``magic'' file.
(See ``FILES'' section, below).
@@ -168,8 +174,8 @@ Specify an alternate list of files containing magic numbers.
This can be a single file, or a colon-separated list of files.
.TP 8
.B \-n
-Force stdout to be flushed after check a file. This is only useful if
-checking a list of files. It is intended to be used by programs want
+Force stdout to be flushed after checking each file. This is only useful if
+checking a list of files. It is intended to be used by programs that want
filetype output from a pipe.
.TP 8
.B \-v
@@ -313,42 +319,19 @@ the external list of magic number types.
This slowed the program down slightly but made it a lot more flexible.
.PP
This program, based on the System V version,
-was written by Ian Darwin without looking at anybody else's source code.
+was written by Ian Darwin <ian@darwinsys.com>
+without looking at anybody else's source code.
.PP
John Gilmore revised the code extensively, making it better than
the first version.
Geoff Collyer found several inadequacies
and provided some magic file entries.
-The program has undergone continued evolution since.
-.SH AUTHOR
-Written by Ian F. Darwin, UUCP address {utzoo | ihnp4}!darwin!ian,
-Internet address ian@sq.com,
-postal address: P.O. Box 603, Station F, Toronto, Ontario, CANADA M4Y 2L8.
-.PP
-Altered by Rob McMahon, cudcv@warwick.ac.uk, 1989, to extend the `&' operator
-from simple `x&y != 0' to `x&y op z'.
+Contributions by the `&' operator by Rob McMahon, cudcv@warwick.ac.uk, 1989.
.PP
-Altered by Guy Harris, guy@netapp.com, 1993, to:
-.RS
-.PP
-put the ``old-style'' `&'
-operator back the way it was, because 1) Rob McMahon's change broke the
-previous style of usage, 2) the SunOS ``new-style'' `&' operator,
-which this version of
-.B file
-supports, also handles `x&y op z', and 3) Rob's change wasn't documented
-in any case;
+Guy Harris, guy@netapp.com, made many changes from 1993 to the present.
.PP
-put in multiple levels of `>';
-.PP
-put in ``beshort'', ``leshort'', etc. keywords to look at numbers in the
-file in a specific byte order, rather than in the native byte order of
-the process running
-.BR file .
-.RE
-.PP
-Changes by Ian Darwin and various authors including
-Christos Zoulas (christos@astron.com), 1990-1999.
+Primary development and maintenance from 1990 to the present by
+Christos Zoulas (christos@astron.com).
.PP
Altered by Chris Lowth, chris@lowth.com, 2000:
Handle the ``-i'' option to output mime type strings and using an alternative
@@ -357,45 +340,14 @@ magic file and internal logic.
Altered by Eric Fischer (enf@pobox.com), July, 2000,
to identify character codes and attempt to identify the languages
of non-ASCII files.
-.SH LEGAL NOTICE
-Copyright (c) Ian F. Darwin, Toronto, Canada,
-1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993.
.PP
-This software is not subject to and may not be made subject to any
-license of the American Telephone and Telegraph Company, Sun
-Microsystems Inc., Digital Equipment Inc., Lotus Development Inc., the
-Regents of the University of California, The X Consortium or MIT, or
-The Free Software Foundation.
-.PP
-This software is not subject to any export provision of the United States
-Department of Commerce, and may be exported to any country or planet.
-.PP
-Permission is granted to anyone to use this software for any purpose on
-any computer system, and to alter it and redistribute it freely, subject
-to the following restrictions:
-.PP
-1. The author is not responsible for the consequences of use of this
-software, no matter how awful, even if they arise from flaws in it.
-.PP
-2. The origin of this software must not be misrepresented, either by
-explicit claim or by omission. Since few users ever read sources,
-credits must appear in the documentation.
-.PP
-3. Altered versions must be plainly marked as such, and must not be
-misrepresented as being the original software. Since few users
-ever read sources, credits must appear in the documentation.
-.PP
-4. This notice may not be removed or altered.
-.\" .PP
-.\" A few support files (\fIgetopt\fP, \fIstrtok\fP)
-.\" distributed with this package
-.\" are by Henry Spencer and are subject to the same terms as above.
-.\" .PP
-.\" A few simple support files (\fIstrtol\fP, \fIstrchr\fP)
-.\" distributed with this package
-.\" are in the public domain; they are so marked.
-.\"
-.\" enf: commented out because these support files don't seem to be included
+The list of contributors to the "Magdir" directory (source for the
+/etc/magic
+file) is too long to include here. You know who you are; thank you.
+.SH LEGAL NOTICE
+Copyright (c) Ian F. Darwin, Toronto, Canada, 1986-1999.
+Covered by the standard Berkeley Software Distribution copyright; see the file
+LEGAL.NOTICE in the source distribution.
.PP
The files
.I tar.h
@@ -403,7 +355,7 @@ and
.I is_tar.c
were written by John Gilmore from his public-domain
.B tar
-program, and are not covered by the above restrictions.
+program, and are not covered by the above license.
.SH BUGS
There must be a better way to automate the construction of the Magic
file from all the glop in Magdir. What is it?
diff --git a/contrib/file/mkinstalldirs b/contrib/file/mkinstalldirs
index e69de29bb2d1..922a27e8097a 100644
--- a/contrib/file/mkinstalldirs
+++ b/contrib/file/mkinstalldirs
@@ -0,0 +1,39 @@
+#! /bin/sh
+# mkinstalldirs --- make directory hierarchy
+# Author: Noah Friedman <friedman@prep.ai.mit.edu>
+# Created: 1993-05-16
+# Public domain
+
+# $Id: mkinstalldirs,v 1.2 2000/11/13 00:30:49 christos Exp $
+
+errstatus=0
+
+for file
+do
+ set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
+ shift
+
+ pathcomp=
+ for d
+ do
+ pathcomp="$pathcomp$d"
+ case "$pathcomp" in
+ -* ) pathcomp=./$pathcomp ;;
+ esac
+
+ if test ! -d "$pathcomp"; then
+ echo "mkdir $pathcomp"
+
+ mkdir "$pathcomp" || lasterr=$?
+
+ if test ! -d "$pathcomp"; then
+ errstatus=$lasterr
+ fi
+ fi
+
+ pathcomp="$pathcomp/"
+ done
+done
+
+exit $errstatus
+
diff --git a/contrib/file/patchlevel.h b/contrib/file/patchlevel.h
index 26e1db24faca..0b075452e8f4 100644
--- a/contrib/file/patchlevel.h
+++ b/contrib/file/patchlevel.h
@@ -1,11 +1,25 @@
#define FILE_VERSION_MAJOR 3
-#define patchlevel 32
+#define patchlevel 33
/*
* Patchlevel file for Ian Darwin's MAGIC command.
- * $Id: patchlevel.h,v 1.32 2000/08/05 18:24:18 christos Exp $
+ * $Id: patchlevel.h,v 1.33 2000/11/13 00:30:50 christos Exp $
*
* $Log: patchlevel.h,v $
+ * Revision 1.33 2000/11/13 00:30:50 christos
+ * - wordperfect magic fix: freebsd pr 9388
+ * - more msdos fixes from freebsd pr's 20131 and 20812
+ * - sas and spss magic [Bruce Foster]
+ * - mkinstalldirs [John Fremlin]
+ * - sgi opengl fixes [Michael Pruett]
+ * - netbsd magic fixes [Ignatios Souvatzis]
+ * - audio additions [Michael Pruett]
+ * - fix problem with non ansi RCSID [Andreas Ley]
+ * - oggs magic [Felix von Leitner]
+ * - gmon magic [Eugen Dedu]
+ * - TNEF magic [Joomy]
+ * - netpbm magic and misc other image stuff [Bryan Henderson]
+ *
* Revision 1.32 2000/08/05 18:24:18 christos
* Correct indianness detection in elf (Charles Hannum)
* FreeBSD elf core support (Guy Harris)
diff --git a/contrib/file/readelf.c b/contrib/file/readelf.c
index 52dcec3b72a9..3c5c41436878 100644
--- a/contrib/file/readelf.c
+++ b/contrib/file/readelf.c
@@ -14,7 +14,7 @@
#include "readelf.h"
#ifndef lint
-FILE_RCSID("@(#)$Id: readelf.c,v 1.16 2000/08/05 18:18:50 christos Exp $")
+FILE_RCSID("@(#)$Id: readelf.c,v 1.17 2000/08/05 19:00:12 christos Exp $")
#endif
#ifdef ELFCORE
@@ -394,8 +394,6 @@ dophn_core(class, swap, fd, off, num, size)
offset += nh_descsz;
offset = ((offset + 3)/4)*4;
}
- out:
- ;
}
}
#endif