1 --- file-4.20/doc/file.man.orig 2007-01-25 22:05:46.000000000 +0100
2 +++ file-4.20/doc/file.man 2007-03-18 13:32:16.817249006 +0100
5 Exceptions are well-known file formats (core files, tar archives)
6 that are known to contain binary data.
7 -When modifying the file
9 -or the program itself, make sure to
10 +When adding local definitions to
12 .Em "preserve these keywords" .
13 People depend on knowing that all the readable files in a directory
16 has been applied by extension to data files.
17 Any file with some invariant identifier at a small fixed
18 offset into the file can usually be described in this way.
19 -The information identifying these files is read from the compiled
20 +The information identifying these files is read from
27 The order of entries in the magic file is significant.
28 Depending on what system you are using, the order that
29 they are put together may be incorrect.
32 -command uses a magic file,
33 -keep the old magic file around for comparison purposes
35 -.Pa __MAGIC__.orig ).
37 .Bd -literal -offset indent
38 $ file file.c file /dev/{wd0a,hda}
42 .Dv /pub/file/file-X.YZ.tar.gz
44 +This version contains some extensions from
46 +(mainly new magic entries).
47 --- file-4.07.orig/magic/Header
48 +++ file-4.07/magic/Header
51 # Magic data for file(1) command.
52 -# Machine-generated from src/cmd/file/magdir/*; edit there only!
53 -# Format is described in magic(files), where:
54 -# files is 5 on V7 and BSD, 4 on SV, and ?? in the SVID.
55 +# Format is described in magic(5).
56 +# Don't edit this file, edit /etc/magic or send your suggested inclusions to
57 +# this file as a wishlist bug against file (using the reportbug utility).
59 --- file-4.21/magic/magic.mime.orig 2007-04-03 23:11:32.000000000 +0200
60 +++ file-4.21/magic/magic.mime 2007-05-26 19:23:17.258702418 +0200
62 # modified by Joerg Jenderek
63 # GRR the original test are too common for many DOS files
64 # so test 1 <= kbits nibble <= E
66 +0 beshort&0xffe0 =0xfffa
68 >>2 ubyte&0xF0 <0xE1 audio/mpeg
71 # because it tries to uncompress it to figure out what's inside.
73 # standard unix compress
74 -0 string \037\235 application/x-compress
75 +#0 string \037\235 application/x-compress
77 # gzip (GNU zip, not to be confused with [Info-ZIP/PKWARE] zip archiver)
78 -0 string \037\213 application/x-gzip
79 +#0 string \037\213 application/x-gzip
81 0 string PK\003\004 application/x-zip
84 0 beshort 0xffd8 image/jpeg
86 # PC bitmaps (OS/2, Windoze BMP files) (Greg Roelofs, newt@uchicago.edu)
87 -0 string BM image/bmp
88 +0 string BM image/x-ms-bmp
89 #>14 byte 12 (OS/2 1.x format)
90 #>14 byte 64 (OS/2 2.x format)
91 #>14 byte 40 (Windows 3.x format)
95 >3 byte x application/x-shockwave-flash
96 +0 string CWS application/x-shockwave-flash
98 # The following paramaters are created for Namazu.
99 # <http://www.namazu.org/>
101 # Symbian installation files
102 8 lelong 0x10000419 application/vnd.symbian.install
103 0 lelong 0x10201A7A x-epoc/x-sisx-app
105 +# Gnumeric spreadsheet
106 +# This entry is only semi-helpful, as Gnumeric compresses its files, so
107 +# they will ordinarily reported as "compressed", but at least -z helps
108 +39 string =<gmr:Workbook application/x-gnumeric
109 --- file-4.07.orig/magic/magic.local
110 +++ file-4.07/magic/magic.local
112 +# Magic local data for file(1) command.
113 +# Insert here your local magic data. Format is described in magic(5).
115 --- file-4.18/src/magic.c.orig 2006-10-31 20:37:17.000000000 +0100
116 +++ file-4.18/src/magic.c 2006-11-13 16:15:31.219505000 +0100
122 + struct stat sb, *st = &sb;
123 ssize_t nbytes = 0; /* number of bytes read from a datafile */
127 if (file_reset(ms) == -1)
130 - switch (file_fsmagic(ms, inname, &sb)) {
131 + switch (file_fsmagic(ms, inname, st)) {
134 case 0: /* nothing found */