]>
Commit | Line | Data |
---|---|---|
702702a0 JB |
1 | --- file-4.19/doc/file.man.orig 2006-11-17 17:11:10.000000000 +0100 |
2 | +++ file-4.19/doc/file.man 2006-12-20 19:19:10.027798813 +0100 | |
f8c6f9ed AM |
3 | @@ -1,4 +1,4 @@ |
4 | -.TH FILE __CSECTION__ "Copyright but distributable" | |
702702a0 | 5 | +.TH FILE __CSECTION__ "November 2006" "Copyright but distributable" |
f8c6f9ed AM |
6 | .\" $Id$ |
7 | .SH NAME | |
8 | file | |
9 | @@ -56,10 +56,9 @@ | |
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 | |
14 | -.I __MAGIC__ | |
15 | -or the program itself, | |
16 | -.B "preserve these keywords" . | |
17 | +When adding local definitions to | |
18 | +.IR /etc/magic , | |
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'' | |
23 | @@ -98,7 +97,9 @@ | |
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 | |
29 | +.I /etc/magic | |
30 | +and the compiled | |
31 | magic file | |
32 | .I __MAGIC__.mgc , | |
33 | or | |
702702a0 | 34 | @@ -373,12 +374,6 @@ |
f8c6f9ed AM |
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. | |
38 | -If your old | |
39 | -.B file | |
40 | -command uses a magic file, | |
41 | -keep the old magic file around for comparison purposes | |
42 | -(rename it to | |
43 | -.IR __MAGIC__.orig ). | |
44 | .SH EXAMPLES | |
45 | .nf | |
46 | $ file file.c file /dev/{wd0a,hda} | |
702702a0 | 47 | @@ -532,3 +527,7 @@ |
f8c6f9ed AM |
48 | .B ftp.astron.com |
49 | in the directory | |
50 | .I /pub/file/file-X.YZ.tar.gz | |
51 | +.PP | |
cc7e8ae4 | 52 | +This version contains some extensions from |
f8c6f9ed | 53 | +.B Debian |
cc7e8ae4 | 54 | +(mainly new magic entries). |
9ccb4ffe JB |
55 | --- file-4.07.orig/magic/Header |
56 | +++ file-4.07/magic/Header | |
f8c6f9ed AM |
57 | @@ -1,5 +1,5 @@ |
58 | -# Magic | |
59 | # Magic data for file(1) command. | |
60 | -# Machine-generated from src/cmd/file/magdir/*; edit there only! | |
61 | -# Format is described in magic(files), where: | |
62 | -# files is 5 on V7 and BSD, 4 on SV, and ?? in the SVID. | |
63 | +# Format is described in magic(5). | |
64 | +# Don't edit this file, edit /etc/magic or send your suggested inclusions to | |
65 | +# this file as a wishlist bug against file (using the reportbug utility). | |
66 | + | |
702702a0 JB |
67 | --- file-4.19/magic/magic.mime.orig 2006-11-25 19:26:08.000000000 +0100 |
68 | +++ file-4.19/magic/magic.mime 2006-12-20 19:27:11.023209179 +0100 | |
69 | @@ -193,7 +193,7 @@ | |
6db7617c | 70 | 0 beshort 0x4De1 audio/MP4A-LATM |
bc7258b3 | 71 | |
9ccb4ffe JB |
72 | # MPEG Layer 3 sound files |
73 | -0 beshort &0xffe0 audio/mpeg | |
74 | +0 beshort&0xfffe =0xfffa audio/mpeg | |
75 | #MP3 with ID3 tag | |
76 | 0 string ID3 audio/mpeg | |
77 | # Ogg/Vorbis | |
702702a0 | 78 | @@ -293,10 +293,10 @@ |
f8c6f9ed AM |
79 | # because it tries to uncompress it to figure out what's inside. |
80 | ||
81 | # standard unix compress | |
82 | -0 string \037\235 application/x-compress | |
83 | +#0 string \037\235 application/x-compress | |
84 | ||
85 | # gzip (GNU zip, not to be confused with [Info-ZIP/PKWARE] zip archiver) | |
86 | -0 string \037\213 application/x-gzip | |
87 | +#0 string \037\213 application/x-gzip | |
88 | ||
89 | 0 string PK\003\004 application/x-zip | |
90 | ||
702702a0 | 91 | @@ -469,7 +469,7 @@ |
f8c6f9ed AM |
92 | 0 beshort 0xffd8 image/jpeg |
93 | ||
94 | # PC bitmaps (OS/2, Windoze BMP files) (Greg Roelofs, newt@uchicago.edu) | |
95 | -0 string BM image/bmp | |
96 | +0 string BM image/x-ms-bmp | |
97 | #>14 byte 12 (OS/2 1.x format) | |
98 | #>14 byte 64 (OS/2 2.x format) | |
99 | #>14 byte 40 (Windows 3.x format) | |
702702a0 | 100 | @@ -788,6 +788,7 @@ |
de676a81 | 101 | # |
702702a0 | 102 | 0 string FWS |
de676a81 JB |
103 | >3 byte x application/x-shockwave-flash |
104 | +0 string CWS application/x-shockwave-flash | |
9ccb4ffe | 105 | |
de676a81 JB |
106 | # The following paramaters are created for Namazu. |
107 | # <http://www.namazu.org/> | |
702702a0 JB |
108 | @@ -936,3 +937,8 @@ |
109 | ||
110 | # | |
111 | 128 string DICM application/dicom | |
7cbf251c | 112 | + |
f8c6f9ed AM |
113 | +# Gnumeric spreadsheet |
114 | +# This entry is only semi-helpful, as Gnumeric compresses its files, so | |
115 | +# they will ordinarily reported as "compressed", but at least -z helps | |
116 | +39 string =<gmr:Workbook application/x-gnumeric | |
9ccb4ffe JB |
117 | --- file-4.07.orig/magic/magic.local |
118 | +++ file-4.07/magic/magic.local | |
f8c6f9ed AM |
119 | @@ -0,0 +1,3 @@ |
120 | +# Magic local data for file(1) command. | |
121 | +# Insert here your local magic data. Format is described in magic(5). | |
122 | + | |
d554f87e JB |
123 | --- file-4.18/src/magic.c.orig 2006-10-31 20:37:17.000000000 +0100 |
124 | +++ file-4.18/src/magic.c 2006-11-13 16:15:31.219505000 +0100 | |
125 | @@ -238,7 +238,7 @@ | |
7ec63bd1 AM |
126 | int fd = 0; |
127 | int rv = -1; | |
128 | unsigned char *buf; | |
129 | - struct stat sb; | |
130 | + struct stat sb, *st = &sb; | |
131 | ssize_t nbytes = 0; /* number of bytes read from a datafile */ | |
d554f87e | 132 | int ispipe = 0; |
7ec63bd1 | 133 | |
d554f87e | 134 | @@ -253,7 +253,7 @@ |
7ec63bd1 AM |
135 | if (file_reset(ms) == -1) |
136 | goto done; | |
137 | ||
138 | - switch (file_fsmagic(ms, inname, &sb)) { | |
139 | + switch (file_fsmagic(ms, inname, st)) { | |
d554f87e | 140 | case -1: /* error */ |
7ec63bd1 | 141 | goto done; |
d554f87e | 142 | case 0: /* nothing found */ |