From: Christos Zoulas Date: Mon, 13 Nov 2000 00:30:49 +0000 (+0000) Subject: - wordperfect magic fix: freebsd pr 9388 X-Git-Tag: FILE3_33~1 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3cf230e212f4075e7eac4f522c06eaa0b308c72c;p=file - 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] --- diff --git a/Makefile.in b/Makefile.in index b0444b24..72bc94d0 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 = : @@ -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/configure b/configure index 65590e5b..0614d097 100755 --- a/configure +++ b/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/configure.in b/configure.in index 22d90974..1c8d1a75 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.32) +AM_INIT_AUTOMAKE(file, 3.33) AM_CONFIG_HEADER(config.h) AC_MSG_CHECKING(for builtin ELF support) diff --git a/magic/Magdir/audio b/magic/Magdir/audio index bf02c546..0ee9f1fd 100644 --- a/magic/Magdir/audio +++ b/magic/Magdir/audio @@ -119,3 +119,22 @@ >14 beshort =1 single song, >14 beshort >1 %d songs, >16 beshort >0 default song: %d + + +# IRCAM +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 +0 string NIST_1A\n\ \ \ 1024\n NIST SPHERE file + +# Sample Vision +0 string SOUND\ SAMPLE\ DATA\ Sample Vision file + +# Audio Visual Research +0 string 2BIT Audio Visual Research file + +# From Felix von Leitner +0 string OggS Ogg-Vorbis compressed sound file diff --git a/magic/Magdir/ctags b/magic/Magdir/ctags new file mode 100644 index 00000000..8d439718 --- /dev/null +++ b/magic/Magdir/ctags @@ -0,0 +1,5 @@ + +# ---------------------------------------------------------------------------- +# ctags: file (1) magic for Exuberant Ctags files +# From: Alexander Mai +0 string !_TAG Exuberant Ctags tag file diff --git a/magic/Magdir/elf b/magic/Magdir/elf index f890acf9..df7eab85 100644 --- a/magic/Magdir/elf +++ b/magic/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/magic/Magdir/images b/magic/Magdir/images index 7b5e6cb7..b5b4e0c3 100644 --- a/magic/Magdir/images +++ b/magic/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/magic/Magdir/macintosh b/magic/Magdir/macintosh index 841deb23..b6dc91c8 100644 --- a/magic/Magdir/macintosh +++ b/magic/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/magic/Magdir/msdos b/magic/Magdir/msdos index 358831ee..b8d45145 100644 --- a/magic/Magdir/msdos +++ b/magic/Magdir/msdos @@ -175,10 +175,6 @@ >4 belong 0x06040600 wk1 document data >4 belong 0x06800200 fmt document data -# WordPerfect documents - Trevor Johnson -# -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 ! MKS Spell hash list (old format) +0 string ! MKS Spell hash list +0 string AH Halo(TM) bitmapped font file +0 leshort 0x601A Atari ST contiguous executable +>14 lelong >0 - not stripped +0 leshort 0x601B Atari ST non-contig executable +>14 lelong >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 +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" +0 leshort 0x223e9f78 TNEF diff --git a/magic/Magdir/netbsd b/magic/Magdir/netbsd index 590efc1e..27c6a74d 100644 --- a/magic/Magdir/netbsd +++ b/magic/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/magic/Magdir/riff b/magic/Magdir/riff index 6bf127d4..8f1c3d0f 100644 --- a/magic/Magdir/riff +++ b/magic/Magdir/riff @@ -91,3 +91,5 @@ # Notation Interchange File Format (big-endian only) >8 string NIFF \b, Notation Interchange File Format +# SoundFont 2 +>8 string sfbk SoundFont 2 diff --git a/magic/Magdir/sgi b/magic/Magdir/sgi index 39fadae6..1983f0da 100644 --- a/magic/Magdir/sgi +++ b/magic/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/magic/Magdir/varied.out b/magic/Magdir/varied.out index 564fc011..03ca5103 100644 --- a/magic/Magdir/varied.out +++ b/magic/Magdir/varied.out @@ -23,3 +23,6 @@ # ava assembler/linker Uros Platise 0 string avaobj AVR assembler object code >7 string >\0 version '%s' +# gnu gmon magic From: Eugen Dedu +0 string gmon GNU prof performance data +>4 long x - version %ld diff --git a/mkinstalldirs b/mkinstalldirs index e69de29b..922a27e8 100644 --- a/mkinstalldirs +++ b/mkinstalldirs @@ -0,0 +1,39 @@ +#! /bin/sh +# mkinstalldirs --- make directory hierarchy +# Author: Noah Friedman +# 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/src/Makefile.std b/src/Makefile.std index 8df91797..cb376e69 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.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/src/acconfig.h b/src/acconfig.h index 1f4f5d2c..82090258 100644 --- a/src/acconfig.h +++ b/src/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/src/file.h b/src/file.h index 413073c3..c8ed4031 100644 --- a/src/file.h +++ b/src/file.h @@ -1,6 +1,6 @@ /* * file.h - definitions for file(1) program - * @(#)$Id: file.h,v 1.33 2000/08/07 17:40:14 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. @@ -155,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/src/patchlevel.h b/src/patchlevel.h index 26e1db24..0b075452 100644 --- a/src/patchlevel.h +++ b/src/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)