Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/dist/file file 4.10
details: https://anonhg.NetBSD.org/src/rev/a0f2b5078400
branches: trunk
changeset: 569995:a0f2b5078400
user: pooka <pooka%NetBSD.org@localhost>
date: Thu Sep 16 13:43:21 2004 +0000
description:
file 4.10
minor fixes and improvements
diffstat:
dist/file/ChangeLog | 17 ++++
dist/file/magic/Makefile.am | 4 +-
dist/file/magic/magdir/adventure | 2 +-
dist/file/magic/magdir/amigaos | 16 +----
dist/file/magic/magdir/apple | 21 ++++++
dist/file/magic/magdir/archive | 15 ++++-
dist/file/magic/magdir/claris | 2 +-
dist/file/magic/magdir/communications | 2 +-
dist/file/magic/magdir/diff | 5 -
dist/file/magic/magdir/gnu | 18 -----
dist/file/magic/magdir/iff | 2 +
dist/file/magic/magdir/images | 5 +
dist/file/magic/magdir/jpeg | 111 ++++++++++++++++++++++++++++--
dist/file/magic/magdir/matroska | 14 ++++
dist/file/magic/magdir/msdos | 12 +++
dist/file/magic/magdir/printer | 2 +-
dist/file/magic/magdir/spec | 20 +++++
dist/file/magic/magdir/vorbis | 32 ++++++---
dist/file/magic/magic.mime | 119 +++++++++++++++++++++++++++++++++-
dist/file/src/compress.c | 7 +-
dist/file/src/funcs.c | 8 +-
dist/file/src/patchlevel.h | 9 +-
dist/file/src/softmagic.c | 55 +++++++++++----
23 files changed, 406 insertions(+), 92 deletions(-)
diffs (truncated from 912 to 300 lines):
diff -r 58f3987ec0ad -r a0f2b5078400 dist/file/ChangeLog
--- a/dist/file/ChangeLog Thu Sep 16 13:09:59 2004 +0000
+++ b/dist/file/ChangeLog Thu Sep 16 13:43:21 2004 +0000
@@ -1,3 +1,20 @@
+
+2004-07-24 16:33 Christos Zoulas <christos%zoulas.com@localhost>
+
+ * magic.mime update Danny Milosavljevic <danny.milo%gmx.net@localhost>
+
+ * FreeBSD version update Oliver Eikemeier <eikemeier%fillmore-labs.com@localhost>
+
+ * utime/utimes detection Ian Lance Taylor <ian%wasabisystems.com@localhost>
+
+ * errors reading elf magic Jakub Bogusz <qboosh%pld-linux.org@localhost>
+
+2004-04-12 10:55 Christos Zoulas <christos%zoulas.com@localhost>
+
+ * make sure that magic formats match magic types during compilation
+
+ * fix broken sgi magic file
+
2004-04-06 20:36 Christos Zoulas <christos%zoulas.com@localhost>
* detect present of mbstate_t Petter Reinholdtsen <pere%hungry.com@localhost>
diff -r 58f3987ec0ad -r a0f2b5078400 dist/file/magic/Makefile.am
--- a/dist/file/magic/Makefile.am Thu Sep 16 13:09:59 2004 +0000
+++ b/dist/file/magic/Makefile.am Thu Sep 16 13:43:21 2004 +0000
@@ -19,7 +19,7 @@
$(top_builddir)/src/file -C -m magic
magic.mime.mgc: magic.mime
- $(top_builddir)/src/file -C -m magic.mime
+ $(top_builddir)/src/file -C -m $(srcdir)/magic.mime
magic_FRAGMENTS = \
Magdir/acorn \
@@ -53,6 +53,7 @@
Magdir/citrus \
Magdir/claris \
Magdir/clipper \
+Magdir/spec \
Magdir/commands \
Magdir/communications \
Magdir/compress \
@@ -111,6 +112,7 @@
Magdir/mail.news \
Magdir/maple \
Magdir/mathematica \
+Magdir/matroska \
Magdir/mcrypt \
Magdir/mime \
Magdir/mips \
diff -r 58f3987ec0ad -r a0f2b5078400 dist/file/magic/magdir/adventure
--- a/dist/file/magic/magdir/adventure Thu Sep 16 13:09:59 2004 +0000
+++ b/dist/file/magic/magdir/adventure Thu Sep 16 13:43:21 2004 +0000
@@ -16,7 +16,7 @@
# Infocom
# (Note: to avoid false matches Z-machine version 1 and 2 are not
# recognized since only the oldest Zork I and II used them. Similarly
-# there are 4 Infocom games that use verion 4 that are not recognized.)
+# there are 4 Infocom games that use version 4 that are not recognized.)
#0 byte 3 Infocom game data (Z-machine 3,
#>2 beshort <0x7fff Release %3d,
#>26 beshort >0 Size %d*2
diff -r 58f3987ec0ad -r a0f2b5078400 dist/file/magic/magdir/amigaos
--- a/dist/file/magic/magdir/amigaos Thu Sep 16 13:09:59 2004 +0000
+++ b/dist/file/magic/magdir/amigaos Thu Sep 16 13:43:21 2004 +0000
@@ -3,9 +3,8 @@
#
# From ignatios%cs.uni-bonn.de@localhost (Ignatios Souvatzis)
-# Some formats are still missing: AmigaOS special IFF's, e.g.: FORM....CTLG
-# (the others should be separate, anyway)
#
+0 belong 0x000003fa AmigaOS shared library
0 belong 0x000003f3 AmigaOS loadseg()ble executable/binary
0 belong 0x000003e7 AmigaOS object/library data
#
@@ -44,19 +43,6 @@
0 belong 0x80001001 AmigaOS outline tag
0 string ##\ version catalog translation
-0 string FORM IFF data
->8 string CTLG \b, CTLG message catalog
->8 string PREF \b, PREF preferences
-
-0 string Rar! RAR archive data,
->44 byte x v%0x,
->35 byte 0 os: MS-DOS
->35 byte 1 os: OS/2
->35 byte 2 os: Win32
->35 byte 3 os: Unix
-
-0 belong 0x000003fa AmigaOS shared library
-
# Amiga disk types
#
0 string RDSK Rigid Disk Block
diff -r 58f3987ec0ad -r a0f2b5078400 dist/file/magic/magdir/apple
--- a/dist/file/magic/magdir/apple Thu Sep 16 13:09:59 2004 +0000
+++ b/dist/file/magic/magdir/apple Thu Sep 16 13:43:21 2004 +0000
@@ -127,3 +127,24 @@
# Beagle Bros. Apple Mechanic fonts
0 belong&0xFF00FFFF 0x6400D000 Apple Mechanic font
+
+# Apple Universal Disk Image Format (UDIF) - dmg files.
+# From Johan Gade.
+# These entries are disabled for now until we fix the following issues.
+#
+# Note there might be some problems with the "VAX COFF executable"
+# entry. Note this entry should be placed before the mac filesystem section,
+# particularly the "Apple Partition data" entry.
+#
+# The intended meaning of these tests is, that the file is only of the
+# specified type if both of the lines are correct - i.e. if the first
+# line matches and the second doesn't then it is not of that type.
+#
+#0 long 0x7801730d
+#>4 long 0x62626060 UDIF read-only zlib-compressed image (UDZO)
+#
+# Note that this entry is recognized correctly by the "Apple Partition
+# data" entry - however since this entry is more specific - this
+# information seems to be more useful.
+#0 long 0x45520200
+#>0x410 string disk\ image UDIF read/write image (UDRW)
diff -r 58f3987ec0ad -r a0f2b5078400 dist/file/magic/magdir/archive
--- a/dist/file/magic/magdir/archive Thu Sep 16 13:09:59 2004 +0000
+++ b/dist/file/magic/magdir/archive Thu Sep 16 13:43:21 2004 +0000
@@ -189,7 +189,12 @@
>20 byte x - header level %d
# RAR archiver (Greg Roelofs, newt%uchicago.edu@localhost)
-0 string Rar! RAR archive data
+0 string Rar! RAR archive data,
+>44 byte x v%0x,
+>35 byte 0 os: MS-DOS
+>35 byte 1 os: OS/2
+>35 byte 2 os: Win32
+>35 byte 3 os: Unix
# SQUISH archiver (Greg Roelofs, newt%uchicago.edu@localhost)
0 string SQSH squished archive data (Acorn RISCOS)
@@ -305,3 +310,11 @@
>5 leshort &0x8000 \b, solid
# Date in MS-DOS format (whatever that is)
#>18 lelong x Created on
+
+# sfArk : compression program for Soundfonts (sf2) by Dirk Jagdmann
+# <doj%cubic.org@localhost>
+0x1A string sfArk sfArk compressed Soundfont
+>0x15 string 2
+>>0x1 string >\0 Version %s
+>>0x2A string >\0 : %s
+
diff -r 58f3987ec0ad -r a0f2b5078400 dist/file/magic/magdir/claris
--- a/dist/file/magic/magdir/claris Thu Sep 16 13:09:59 2004 +0000
+++ b/dist/file/magic/magdir/claris Thu Sep 16 13:43:21 2004 +0000
@@ -32,7 +32,7 @@
# a t r i s t sp ^ S cr nl d i v sp #
# .mth Thesaurus
-# statrts with \0 but no magic header
+# starts with \0 but no magic header
# .chy Hyphenation file
# I am not sure: 000 210 034 000 000
diff -r 58f3987ec0ad -r a0f2b5078400 dist/file/magic/magdir/communications
--- a/dist/file/magic/magdir/communications Thu Sep 16 13:09:59 2004 +0000
+++ b/dist/file/magic/magdir/communications Thu Sep 16 13:43:21 2004 +0000
@@ -1,6 +1,6 @@
#----------------------------------------------------------------------------
-# communcation
+# communication
# TTCN is the Tree and Tabular Combined Notation described in ISO 9646-3.
# It is used for conformance testing of communication protocols.
diff -r 58f3987ec0ad -r a0f2b5078400 dist/file/magic/magdir/diff
--- a/dist/file/magic/magdir/diff Thu Sep 16 13:09:59 2004 +0000
+++ b/dist/file/magic/magdir/diff Thu Sep 16 13:43:21 2004 +0000
@@ -6,8 +6,3 @@
0 string ***\ 'diff' output text
0 string Only\ in\ 'diff' output text
0 string Common\ subdirectories:\ 'diff' output text
-
-# xdelta is like diff(1) for binary files (works for text, too).
-# Available from: ftp://ftp.xcf.berkeley.edu/pub/xdelta/
-0 string %XDZ xdelta diff file
->4 string >% version %.3s
diff -r 58f3987ec0ad -r a0f2b5078400 dist/file/magic/magdir/gnu
--- a/dist/file/magic/magdir/gnu Thu Sep 16 13:09:59 2004 +0000
+++ b/dist/file/magic/magdir/gnu Thu Sep 16 13:43:21 2004 +0000
@@ -22,21 +22,3 @@
# This entry is only semi-helpful, as Gnumeric compresses its files, so
# they will ordinarily reported as "compressed", but at least -z helps
39 string =<gmr:Workbook Gnumeric spreadsheet
-
-#------------------------------------------------------------------------------
-# gcc: file(1) magic for GCC special files
-#
-0 string gpch GCC precompiled header
-
-# The version field is annoying. It's 3 characters, not zero-terminated.
->5 byte x (version %c
->6 byte x \b%c
->7 byte x \b%c)
-
-# 67 = 'C', 111 = 'o', 43 = '+', 79 = 'O'
->4 byte 67 for C
->4 byte 111 for Objective C
->4 byte 43 for C++
->4 byte 79 for Objective C++
-
-
diff -r 58f3987ec0ad -r a0f2b5078400 dist/file/magic/magdir/iff
--- a/dist/file/magic/magdir/iff Thu Sep 16 13:09:59 2004 +0000
+++ b/dist/file/magic/magdir/iff Thu Sep 16 13:43:21 2004 +0000
@@ -28,3 +28,5 @@
>8 string TDDD \b, TDDD 3-D rendering
# other formats
>8 string FTXT \b, FTXT formatted text
+>8 string CTLG \b, CTLG message catalog
+>8 string PREF \b, PREF preferences
diff -r 58f3987ec0ad -r a0f2b5078400 dist/file/magic/magdir/images
--- a/dist/file/magic/magdir/images Thu Sep 16 13:09:59 2004 +0000
+++ b/dist/file/magic/magdir/images Thu Sep 16 13:43:21 2004 +0000
@@ -514,3 +514,8 @@
# From: Jason Bacon <bacon%smithers.neuro.mcw.edu@localhost>
0 beshort 0x3020 character Computer Graphics Metafile
+
+
+# From: Tom Hilinski <tom.hilinski%comcast.net@localhost>
+# http://www.unidata.ucar.edu/packages/netcdf/
+0 string CDF\001 netcdf file
diff -r 58f3987ec0ad -r a0f2b5078400 dist/file/magic/magdir/jpeg
--- a/dist/file/magic/magdir/jpeg Thu Sep 16 13:09:59 2004 +0000
+++ b/dist/file/magic/magdir/jpeg Thu Sep 16 13:43:21 2004 +0000
@@ -10,22 +10,113 @@
#
0 beshort 0xffd8 JPEG image data
>6 string JFIF \b, JFIF standard
->6 string Exif \b, EXIF standard
# The following added by Erik Rossen <rossen%freesurf.ch@localhost> 1999-09-06
# in a vain attempt to add image size reporting for JFIF. Note that these
# tests are not fool-proof since some perfectly valid JPEGs are currently
# impossible to specify in magic(4) format.
# First, a little JFIF version info:
->11 byte x \b %d.
->12 byte x \b%02d
+>>11 byte x \b %d.
+>>12 byte x \b%02d
# Next, the resolution or aspect ratio of the image:
-#>13 byte 0 \b, aspect ratio
-#>13 byte 1 \b, resolution (DPI)
-#>13 byte 2 \b, resolution (DPCM)
-#>4 beshort x \b, segment length %d
+#>>13 byte 0 \b, aspect ratio
+#>>13 byte 1 \b, resolution (DPI)
+#>>13 byte 2 \b, resolution (DPCM)
+#>>4 beshort x \b, segment length %d
# Next, show thumbnail info, if it exists:
->18 byte !0 \b, thumbnail %dx
->>19 byte x \b%d
+>>18 byte !0 \b, thumbnail %dx
+>>>19 byte x \b%d
+
+# EXIF moved down here to avoid reporting a bogus version number,
+# and EXIF version number printing added.
+# - Patrik R=E5dman <patrik+file-magic%iki.fi@localhost>
+>6 string Exif \b, EXIF standard
+# Look for EXIF IFD offset in IFD 0, and then look for EXIF version tag in EXIF IFD.
+# All possible combinations of entries have to be enumerated, since no looping
+# is possible. And both endians are possible...
+# The combinations included below are from real-world JPEGs.
+# Little-endian
+>>12 string II
+# IFD 0 Entry #5:
+>>>70 leshort 0x8769
+# EXIF IFD Entry #1:
+>>>>(78.l+14) leshort 0x9000
+>>>>>(78.l+23) byte x %c
+>>>>>(78.l+24) byte x \b.%c
+>>>>>(78.l+25) byte !0x30 \b%c
+# IFD 0 Entry #9:
+>>>118 leshort 0x8769
+# EXIF IFD Entry #3:
+>>>>(126.l+38) leshort 0x9000
+>>>>>(126.l+47) byte x %c
+>>>>>(126.l+48) byte x \b.%c
+>>>>>(126.l+49) byte !0x30 \b%c
+# IFD 0 Entry #10
+>>>130 leshort 0x8769
+# EXIF IFD Entry #3:
+>>>>(138.l+38) leshort 0x9000
+>>>>>(138.l+47) byte x %c
+>>>>>(138.l+48) byte x \b.%c
+>>>>>(138.l+49) byte !0x30 \b%c
+# EXIF IFD Entry #4:
Home |
Main Index |
Thread Index |
Old Index