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.04
details: https://anonhg.NetBSD.org/src/rev/f1b7f5df818d
branches: trunk
changeset: 552431:f1b7f5df818d
user: pooka <pooka%NetBSD.org@localhost>
date: Thu Sep 25 17:58:02 2003 +0000
description:
file 4.04
fixes, patches and more magic
diffstat:
dist/file/ChangeLog | 25 ++++++++++
dist/file/doc/libmagic.3 | 22 +++++++-
dist/file/magic/Makefile.am | 10 +++-
dist/file/magic/magdir/archive | 46 ++++++++++++++---
dist/file/magic/magdir/c64 | 27 ++++++++++
dist/file/magic/magdir/commands | 11 ----
dist/file/magic/magdir/compress | 6 +-
dist/file/magic/magdir/fonts | 4 +
dist/file/magic/magdir/gcc | 16 ++++++
dist/file/magic/magdir/mach | 7 ++-
dist/file/magic/magdir/macintosh | 90 +++++++++++++++++++----------------
dist/file/magic/magdir/mathematica | 2 +-
dist/file/magic/magdir/msdos | 6 +-
dist/file/magic/magdir/printer | 4 +
dist/file/magic/magdir/revision | 5 ++
dist/file/magic/magdir/sgi | 59 +++++++++++++++++++++++
dist/file/magic/magdir/sun | 5 +-
dist/file/magic/magdir/varied.out | 7 ++-
dist/file/magic/magdir/varied.script | 12 ++++
dist/file/magic/magdir/vorbis | 17 ++++--
dist/file/magic/magdir/xwindows | 25 ++++++++++
dist/file/magic/magic.mime | 2 +-
dist/file/src/apprentice.c | 28 +++++++----
dist/file/src/apptype.c | 25 +++++----
dist/file/src/file.c | 25 +++++++--
dist/file/src/funcs.c | 6 +--
dist/file/src/magic.h | 31 ++++++++----
dist/file/src/patchlevel.h | 9 ++-
dist/file/src/print.c | 7 +-
dist/file/src/softmagic.c | 14 ++--
30 files changed, 408 insertions(+), 145 deletions(-)
diffs (truncated from 1126 to 300 lines):
diff -r ecd77cd25fc5 -r f1b7f5df818d dist/file/ChangeLog
--- a/dist/file/ChangeLog Thu Sep 25 17:38:00 2003 +0000
+++ b/dist/file/ChangeLog Thu Sep 25 17:58:02 2003 +0000
@@ -1,3 +1,28 @@
+2003-09-12 15:09 Christos Zoulas <christos%zoulas.com@localhost>
+
+ * update magic files.
+ * remove largefile support from file.h; it breaks things on most OS's
+
+2003-08-10 10:25 Christos Zoulas <christos%zoulas.com@localhost>
+
+ * fix unmapping'ing of mmaped files.
+
+2003-07-10 12:03 Christos Zoulas <christos%zoulas.com@localhost>
+
+ * don't exit with -1 on error; always exit 1 (Marty Leisner)
+ * restore utimes code.
+
+2003-06-10 17:03 Christos Zoulas <christos%zoulas.com@localhost>
+
+ * make sure we don't access uninitialized memory.
+ * pass lint
+ * #ifdef __cplusplus in magic.h
+
+2003-05-25 19:23 Christos Zoulas <christos%zoulas.com@localhost>
+
+ * rename cvs magic file to revision to deal with
+ case insensitive filesystems.
+
2003-05-23 17:03 Christos Zoulas <christos%zoulas.com@localhost>
* documentation fixes from Michael Piefel <piefel%debian.org@localhost>
diff -r ecd77cd25fc5 -r f1b7f5df818d dist/file/doc/libmagic.3
--- a/dist/file/doc/libmagic.3 Thu Sep 25 17:38:00 2003 +0000
+++ b/dist/file/doc/libmagic.3 Thu Sep 25 17:58:02 2003 +0000
@@ -1,4 +1,4 @@
-.\" $NetBSD: libmagic.3,v 1.1.1.2 2003/05/25 21:27:29 pooka Exp $
+.\" $NetBSD: libmagic.3,v 1.1.1.3 2003/09/25 17:58:56 pooka Exp $
.\"
.\"
.\" Copyright (c) Christos Zoulas 2003.
@@ -56,7 +56,7 @@
.Fn magic_file "magic_t cookie, const char *filename"
.Ft const char *
.Fn magic_buffer "magic_t cookie, const void *buffer, size_t length"
-.Ft void
+.Ft int
.Fn magic_setflags "magic_t cookie, int flags"
.Ft int
.Fn magic_check "magic_t cookie, const char *filename"
@@ -95,6 +95,12 @@
Return all matches, not just the first.
.It Dv MAGIC_CHECK
Check the magic database for consistency and print warnings to stderr.
+.It Dv MAGIC_PRESERVE_ATIME
+On systems that support
+.Xr utime 2
+or
+.Xr utimes 2 ,
+attempt to preserve the access time of files analyzed.
.El
.Pp
The
@@ -160,7 +166,8 @@
The function
.Fn magic_open
returns a magic cookie on success and NULL on failure setting errno to
-an appropriate value.
+an appropriate value. It will set errno to EINVAL if an unsupported
+value for flags was given.
The
.Fn magic_load ,
.Fn magic_compile ,
@@ -175,6 +182,15 @@
.Fn magic_error
function returns a textual description of the errors of the above
functions, or NULL if there was no error.
+Finally,
+.Fn magic_setflags
+returns -1 on systems that don't support
+.Xr utime 2 ,
+or
+.Xr utimes 2
+when
+.Dv MAGIC_PRESERVE_ATIME
+is set.
.Sh FILES
.Bl -tag -width /usr/share/misc/magic.mime.mgc -compact
.It Pa /usr/share/misc/magic.mime
diff -r ecd77cd25fc5 -r f1b7f5df818d dist/file/magic/Makefile.am
--- a/dist/file/magic/Makefile.am Thu Sep 25 17:38:00 2003 +0000
+++ b/dist/file/magic/Makefile.am Thu Sep 25 17:58:02 2003 +0000
@@ -38,12 +38,14 @@
Magdir/asterix \
Magdir/att3b \
Magdir/audio \
+Magdir/audio.orig \
Magdir/bFLT \
Magdir/blender \
Magdir/blit \
Magdir/bout \
Magdir/bsdi \
Magdir/c-lang \
+Magdir/c64 \
Magdir/cddb \
Magdir/chi \
Magdir/chord \
@@ -57,7 +59,6 @@
Magdir/console \
Magdir/convex \
Magdir/ctags \
-Magdir/cvs \
Magdir/database \
Magdir/diamond \
Magdir/diff \
@@ -77,6 +78,7 @@
Magdir/freebsd \
Magdir/fsav \
Magdir/games \
+Magdir/gcc \
Magdir/gimp \
Magdir/gnu \
Magdir/grace \
@@ -103,6 +105,7 @@
Magdir/lisp \
Magdir/mach \
Magdir/macintosh \
+Magdir/macintosh.orig \
Magdir/magic \
Magdir/mail.news \
Magdir/maple \
@@ -146,6 +149,7 @@
Magdir/pulsar \
Magdir/pyramid \
Magdir/python \
+Magdir/revision \
Magdir/riff \
Magdir/rpm \
Magdir/rtf \
@@ -153,6 +157,7 @@
Magdir/sccs \
Magdir/sendmail \
Magdir/sequent \
+Magdir/sgi \
Magdir/sgml \
Magdir/sharc \
Magdir/sinclair \
@@ -176,15 +181,18 @@
Magdir/unknown \
Magdir/uuencode \
Magdir/varied.out \
+Magdir/varied.script \
Magdir/vax \
Magdir/vicar \
Magdir/visx \
Magdir/vms \
Magdir/vmware \
Magdir/vorbis \
+Magdir/vorbis.orig \
Magdir/vxl \
Magdir/wordprocessors \
Magdir/xdelta \
Magdir/xenix \
+Magdir/xwindows \
Magdir/zilog \
Magdir/zyxel
diff -r ecd77cd25fc5 -r f1b7f5df818d dist/file/magic/magdir/archive
--- a/dist/file/magic/magdir/archive Thu Sep 25 17:38:00 2003 +0000
+++ b/dist/file/magic/magdir/archive Thu Sep 25 17:58:02 2003 +0000
@@ -262,16 +262,44 @@
# Felix von Leitner <felix-file%fefe.de@localhost>
0 string d8:announce BitTorrent file
-# ACE archive (Nikolay Petrov, nik%techlab.office1.bg@localhost)
-7 string **ACE** Winace archive data
-
# Atari MSA archive - Teemu Hukkanen <tjhukkan%iki.fi@localhost>
0 beshort 0x0e0f Atari MSA archive data
->2 beshort x \b, %d sectors per track
->4 beshort 0 \b, 1 sided
->4 beshort 1 \b, 2 sided
->6 beshort x \b, starting track: %d
->8 beshort x \b, ending track: %d
+>2 beshort x \b, %d sectors per track
+>4 beshort 0 \b, 1 sided
+>4 beshort 1 \b, 2 sided
+>6 beshort x \b, starting track: %d
+>8 beshort x \b, ending track: %d
# Alternate ZIP string (amc%arwen.cs.berkeley.edu@localhost)
-0 string PK00PK\003\004 Zip archive data
+0 string PK00PK\003\004 Zip archive data
+
+# ACE archive (from http://www.wotsit.org/download.asp?f=ace)
+# by Stefan `Sec` Zehl <sec%42.org@localhost>
+7 string **ACE** ACE compressed archive
+>15 byte >0 version %d
+>16 byte =0x00 \b, from MS-DOS
+>16 byte =0x01 \b, from OS/2
+>16 byte =0x02 \b, from Win/32
+>16 byte =0x03 \b, from Unix
+>16 byte =0x04 \b, from MacOS
+>16 byte =0x05 \b, from WinNT
+>16 byte =0x06 \b, from Primos
+>16 byte =0x07 \b, from AppleGS
+>16 byte =0x08 \b, from Atari
+>16 byte =0x09 \b, from Vax/VMS
+>16 byte =0x0A \b, from Amiga
+>16 byte =0x0B \b, from Next
+>14 byte x \b, version %d to extract
+>5 leshort &0x0080 \b, multiple volumes,
+>>17 byte x \b (part %d),
+>5 leshort &0x0002 \b, contains comment
+>5 leshort &0x0200 \b, sfx
+>5 leshort &0x0400 \b, small dictionary
+>5 leshort &0x0800 \b, multi-volume
+>5 leshort &0x1000 \b, contains AV-String
+>>30 string\x16*UNREGISTERED\x20VERSION* (unregistered)
+>5 leshort &0x2000 \b, with recovery record
+>5 leshort &0x4000 \b, locked
+>5 leshort &0x8000 \b, solid
+# Date in MS-DOS format (whatever that is)
+#>18 lelong x Created on
diff -r ecd77cd25fc5 -r f1b7f5df818d dist/file/magic/magdir/c64
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/dist/file/magic/magdir/c64 Thu Sep 25 17:58:02 2003 +0000
@@ -0,0 +1,27 @@
+
+#------------------------------------------------------------------------------
+# c64: file(1) magic for various commodore 64 related files
+#
+# From <doj%cubic.org@localhost>
+
+0x16500 belong 0x12014100 D64 Image
+0x16500 belong 0x12014180 D71 Image
+0x61800 belong 0x28034400 D81 Image
+0 string C64\40CARTRIDGE CCS C64 Emultar Cartridge Image
+0 belong 0x43154164 X64 Image
+
+0 string GCR-1541 GCR Image
+>8 byte x version: $i
+>9 byte x tracks: %i
+
+9 string PSUR ARC archive (c64)
+2 string -LH1- LHA archive (c64)
+
+0 string C64File PC64 Emulator file
+>8 string >\0 "%s"
+0 string C64Image PC64 Freezer Image
+
+0 beshort 0x38CD C64 PCLink Image
+0 string CBM\144\0\0 Power 64 C64 Emulator Snapshot
+
+0 belong 0xFF424CFF WRAptor packer (c64)
diff -r ecd77cd25fc5 -r f1b7f5df818d dist/file/magic/magdir/commands
--- a/dist/file/magic/magdir/commands Thu Sep 25 17:38:00 2003 +0000
+++ b/dist/file/magic/magdir/commands Thu Sep 25 17:58:02 2003 +0000
@@ -42,17 +42,6 @@
0 string #!\ /usr/bin/env a
>16 string >\0 %s script text executable
-
-# generic shell magic
-0 string #!\ / a
->3 string >\0 %s script text executable
-0 string #!\ / a
->3 string >\0 %s script text executable
-0 string #!/ a
->2 string >\0 %s script text executable
-0 string #!\ script text executable
->3 string >\0 for %s
-
# PHP scripts
# Ulf Harnhammar <ulfh%update.uu.se@localhost>
0 string/c =<?php PHP script text
diff -r ecd77cd25fc5 -r f1b7f5df818d dist/file/magic/magdir/compress
--- a/dist/file/magic/magdir/compress Thu Sep 25 17:38:00 2003 +0000
+++ b/dist/file/magic/magdir/compress Thu Sep 25 17:58:02 2003 +0000
@@ -46,10 +46,8 @@
>2 belong >1 \b, %d characters originally
>2 belong =1 \b, %d character originally
#
-# This magic number is byte-order-independent. XXX - Does that mean this
-# is big-endian, little-endian, either, or that you can't tell?
-# this short is valid for SunOS
-0 short 017437 old packed data
+# This magic number is byte-order-independent.
+0 short 0x1f1f old packed data
# XXX - why *two* entries for "compacted data", one of which is
# byte-order independent, and one of which is byte-order dependent?
diff -r ecd77cd25fc5 -r f1b7f5df818d dist/file/magic/magdir/fonts
--- a/dist/file/magic/magdir/fonts Thu Sep 25 17:38:00 2003 +0000
+++ b/dist/file/magic/magdir/fonts Thu Sep 25 17:58:02 2003 +0000
@@ -55,3 +55,7 @@
0 string \007\001\001\000Copyright\ (c)\ 199 Adobe Multiple Master font
0 string \012\001\001\000Copyright\ (c)\ 199 Adobe Multiple Master font
+
+# Opentype font data from Avi Bercovich
Home |
Main Index |
Thread Index |
Old Index