1 --- file-4.15/doc/file.man.orig 2005-08-18 17:18:22.000000000 +0200
2 +++ file-4.15/doc/file.man 2005-08-28 22:16:00.615271312 +0200
4 -.TH FILE __CSECTION__ "Copyright but distributable"
5 +.TH FILE __CSECTION__ "August 2005" "Copyrighted but distributable"
10 meaning anything else (data is usually `binary' or non-printable).
11 Exceptions are well-known file formats (core files, tar archives)
12 that are known to contain binary data.
13 -When modifying the file
15 -or the program itself,
16 -.B "preserve these keywords" .
17 +When adding local definitions to
19 +.BR "preserve these keywords" .
20 People depend on knowing that all the readable files in a directory
21 have the word ``text'' printed.
22 Don't do as Berkeley did and change ``shell commands text''
24 The concept of `magic number' has been applied by extension to data files.
25 Any file with some invariant identifier at a small fixed
26 offset into the file can usually be described in this way.
27 -The information identifying these files is read from the compiled
28 +The information identifying these files is read from
35 The order of entries in the magic file is significant.
36 Depending on what system you are using, the order that
37 they are put together may be incorrect.
40 -command uses a magic file,
41 -keep the old magic file around for comparison purposes
43 -.IR __MAGIC__.orig ).
46 $ file file.c file /dev/{wd0a,hda}
50 .I /pub/file/file-X.YZ.tar.gz
52 +This version contains some extensions from
54 +(mainly new magic entries).
55 --- file-4.07.orig/src/Makefile.am
56 +++ file-4.07/src/Makefile.am
61 -AM_CPPFLAGS = -DMAGIC='"$(MAGIC)"'
62 +AM_CPPFLAGS = -DMAGIC='"/etc/magic:$(MAGIC)"'
64 libmagic_la_SOURCES = magic.c apprentice.c softmagic.c ascmagic.c \
65 compress.c is_tar.c readelf.c print.c fsmagic.c \
66 --- file-4.07.orig/magic/Header
67 +++ file-4.07/magic/Header
70 # Magic data for file(1) command.
71 -# Machine-generated from src/cmd/file/magdir/*; edit there only!
72 -# Format is described in magic(files), where:
73 -# files is 5 on V7 and BSD, 4 on SV, and ?? in the SVID.
74 +# Format is described in magic(5).
75 +# Don't edit this file, edit /etc/magic or send your suggested inclusions to
76 +# this file as a wishlist bug against file (using the reportbug utility).
78 --- file-4.14/magic/magic.mime.orig 2005-06-25 17:39:18.000000000 +0200
79 +++ file-4.14/magic/magic.mime 2005-07-18 22:02:05.196917536 +0200
81 0 beshort 0x4DE1 audio/MP4A-LATM
83 # MPEG Layer 3 sound files
84 -0 beshort &0xffe0 audio/mpeg
85 +0 beshort&0xfffe =0xfffa audio/mpeg
87 0 string ID3 audio/mpeg
90 # because it tries to uncompress it to figure out what's inside.
92 # standard unix compress
93 -0 string \037\235 application/x-compress
94 +#0 string \037\235 application/x-compress
96 # gzip (GNU zip, not to be confused with [Info-ZIP/PKWARE] zip archiver)
97 -0 string \037\213 application/x-gzip
98 +#0 string \037\213 application/x-gzip
100 0 string PK\003\004 application/x-zip
102 @@ -398,19 +398,14 @@
104 # from Daniel Quinlan <quinlan@yggdrasil.com>
106 -0 string \<HEAD text/html
107 -0 string \<head text/html
108 -0 string \<TITLE text/html
109 -0 string \<title text/html
110 -0 string \<html text/html
111 -0 string \<HTML text/html
112 +0 string/cB \<!DOCTYPE\ html text/html
113 +0 string/cb \<head text/html
114 +0 string/cb \<title text/html
115 +0 string/bc \<html text/html
116 0 string \<!-- text/html
117 -0 string \<h1 text/html
118 -0 string \<H1 text/html
119 -0 string \<!doctype\ HTML text/html
120 -0 string \<!DOCTYPE\ HTML text/html
121 -0 string \<!doctype\ html text/html
122 -0 string \<!doctype\ HTML text/html
123 +0 string/c \<h1 text/html
125 +0 string \<?xml text/xml
127 #------------------------------------------------------------------------------
128 # images: file(1) magic for image formats (see also "c-lang" for XPM bitmaps)
130 0 beshort 0xffd8 image/jpeg
132 # PC bitmaps (OS/2, Windoze BMP files) (Greg Roelofs, newt@uchicago.edu)
133 -0 string BM image/bmp
134 +0 string BM image/x-ms-bmp
135 #>14 byte 12 (OS/2 1.x format)
136 #>14 byte 64 (OS/2 2.x format)
137 #>14 byte 40 (Windows 3.x format)
141 >3 byte x application/x-shockwave-flash
142 +0 string CWS application/x-shockwave-flash
144 # The following paramaters are created for Namazu.
145 # <http://www.namazu.org/>
148 # From: Tilman Sauerbeck <tilman@code-monkey.de>
149 0 belong 0x1ee7ff00 application/x-eet
151 +# Gnumeric spreadsheet
152 +# This entry is only semi-helpful, as Gnumeric compresses its files, so
153 +# they will ordinarily reported as "compressed", but at least -z helps
154 +39 string =<gmr:Workbook application/x-gnumeric
155 --- file-4.07.orig/magic/magic.local
156 +++ file-4.07/magic/magic.local
158 +# Magic local data for file(1) command.
159 +# Insert here your local magic data. Format is described in magic(5).
161 --- file-4.14/src/magic.c.debian 2005-06-25 17:52:14.000000000 +0200
162 +++ file-4.14/src/magic.c 2005-07-14 09:43:18.000000000 +0200
168 + struct stat sb, *st = &sb;
169 ssize_t nbytes = 0; /* number of bytes read from a datafile */
173 if (file_reset(ms) == -1)
176 - switch (file_fsmagic(ms, inname, &sb)) {
177 + switch (file_fsmagic(ms, inname, st)) {