]>
Commit | Line | Data |
---|---|---|
440bd198 A |
1 | $NetBSD: README,v 1.6 1998/09/20 15:27:15 christos Exp $ |
2 | ** README for file(1) Command ** | |
3 | @(#) Id: README,v 1.22 1997/11/05 16:03:18 christos Exp | |
4 | ||
5 | This is Release 3.x of Ian Darwin's (copyright but distributable) | |
6 | file(1) command. This version is the standard "file" command for Linux, | |
7 | *BSD, and other systems. (See "patchlevel.h" for the exact release number). | |
8 | ||
9 | UNIX is a trademark of UNIX System Laboratories. | |
10 | ||
11 | The prime contributor to Release 3.8 was Guy Harris, who put in megachanges | |
12 | including byte-order independance. | |
13 | ||
14 | The prime contributor to Release 3.0 was Christos Zoulas, who put | |
15 | in hundreds of lines of source code changes, including his own | |
16 | ANSIfication of the code (I liked my own ANSIfication better, but | |
17 | his (__P()) is the "Berkeley standard" way of doing it, and I wanted UCB | |
18 | to include the code...), his HP-like "indirection" (a feature of | |
19 | the HP file command, I think), and his mods that finally got the | |
20 | uncompress (-z) mode finished and working. | |
21 | ||
22 | This release has compiled in numerous environments; see PORTING | |
23 | for a list and problems. | |
24 | ||
25 | This fine freeware file(1) follows the USG (System V) model of the file | |
26 | command, rather than the Research (V7) version or the V7-derived 4.[23] | |
27 | Berkeley one. That is, the file /etc/magic contains much of the ritual | |
28 | information that is the source of this program's power. My version | |
29 | knows a little more magic (including tar archives) than System V; the | |
30 | /etc/magic parsing seems to be compatible with the (poorly documented) | |
31 | System V /etc/magic format (with one exception; see the man page). | |
32 | ||
33 | In addition, the /etc/magic file is built from a subdirectory | |
34 | for easier(?) maintenance. I will act as a clearinghouse for | |
35 | magic numbers assigned to all sorts of data files that | |
36 | are in reasonable circulation. Send your magic numbers, | |
37 | in magic(4) format please, to the maintainer, Christos Zoulas. | |
38 | ||
39 | LEGAL.NOTICE - read this first. | |
40 | README - read this second (you are currently reading this file). | |
41 | PORTING - read this only if the program won't compile. | |
42 | Makefile - read this next, adapt it as needed (particularly | |
43 | the location of the old existing file command and | |
44 | the man page layouts), type "make" to compile, | |
45 | "make try" to try it out against your old version. | |
46 | Expect some diffs, particularly since your original | |
47 | file(1) may not grok the imbedded-space ("\ ") in | |
48 | the current magic file, or may even not use the | |
49 | magic file. | |
50 | apprentice.c - parses /etc/magic to learn magic | |
51 | ascmagic.c - third & last set of tests, based on hardwired assumptions. | |
52 | core - not included in distribution due to mailer limitations. | |
53 | debug.c - includes -c printout routine | |
54 | file.1 - man page for the command | |
55 | magic.4 - man page for the magic file, courtesy Guy Harris. | |
56 | Install as magic.4 on USG and magic.5 on V7 or Berkeley; cf Makefile. | |
57 | file.c - main program | |
58 | file.h - header file | |
59 | fsmagic.c - first set of tests the program runs, based on filesystem info | |
60 | is_tar.c, tar.h - knows about tarchives (courtesy John Gilmore). | |
61 | magdir - directory of /etc/magic pieces | |
62 | magdir/Makefile - ADJUST THIS FOR YOUR CONFIGURATION | |
63 | names.h - header file for ascmagic.c | |
64 | softmagic.c - 2nd set of tests, based on /etc/magic | |
65 | readelf.[ch] - Standalone elf parsing code. | |
66 | compress.c - on-the-fly decompression. | |
67 | internat.c - recognize international `text' files. | |
68 | print.c - print results, errors, warnings. | |
69 | ||
70 | If your gzip sometimes fails to decompress things complaining about a short | |
71 | file, apply this patch [which is going to be in the next version of gzip]: | |
72 | *** - Tue Oct 29 02:06:35 1996 | |
73 | --- util.c Sun Jul 21 21:51:38 1996 | |
74 | *** 106,111 **** | |
75 | --- 108,114 ---- | |
76 | ||
77 | if (insize == 0) { | |
78 | if (eof_ok) return EOF; | |
79 | + flush_window(); | |
80 | read_error(); | |
81 | } | |
82 | bytes_in += (ulg)insize; | |
83 | ||
84 | E-mail: christos@astron.com, moraes@deshaw.com | |
85 | ||
86 | Phone: Do not even think of telephoning me about this program. Send cash first! | |
87 | ||
88 | Parts of this software were developed at SoftQuad Inc., 56 Aberfoyle | |
89 | Cres, # 810, Toronto, Ontario CANADA M8X 2W4. Phone: 416-239-4801 or | |
90 | 800-387-2777. Email: mail@sq.com. Call for information on SGML editing | |
91 | and browsing, Unix text processing, and customised products on Unix, | |
92 | DOS and Mac. |