In addition, the /etc/magic file is built from a subdirectory
for easier maintenance. I will act as a clearinghouse for
magic numbers assigned to all sorts of data files that
-are in reasonable circulation. Send your whacko magic numbers,
-in magic(4) format please(!), to the author, Ian Darwin,
+are in reasonable circulation. Send your magic numbers,
+in magic(4) format please, to the author, Ian Darwin,
{utzoo|ihnp4}!darwin!ian, ian@sq.com.
LEGAL.NOTICE - read this first.
README - read this second (you are currently reading this file).
-PORTING - read this next.
+PORTING - read this only if the program won't compile.
Makefile - read this next, adapt it as needed (particularly
+ the location of the old existing file command and
the man page layouts), type "make" to compile,
"make test" to try it out against your old version.
Expect some diffs, particularly since your original
ascmagic.c - third & last set of tests, based on hardwired assumptions.
core - not included in distribution due to mailer limitations.
debug.c - includes -c printout routine
-file.1 - man page
-magic.4 - another man page, courtesy Guy Harris.
+file.1 - man page for the command
+magic.4 - man page for the magic file, courtesy Guy Harris.
Install as magic.4 on USG and magic.5 on V7 or Berkeley; cf Makefile.
file.c - main program
-file.h - fairly standard header file
+file.h - header file
fsmagic.c - first set of tests the program runs, based on filesystem info
-is_tar.c - knows about tarchives (courtesy of John Gilmore).
+is_tar.c - knows about tarchives (courtesy John Gilmore).
magdir - directory of /etc/magic pieces
names.h - header file for ascmagic.c
softmagic.c - 2nd set of tests, based on /etc/magic
Portability of the new file(1) command:
-Obviously if you are running the old Ritchie compiler or
-something else that doesn't know about void, you will have
-to un-comment-out the definition of `void=int' in the Makefile.
+Read this file only if the program doesn't compile on your system.
I had hoped to be able to make a file command that
didn't have any system-dependant #ifdefs, no special libraries,
and the name of the header file that *does* include
this "standard" definition.
+If you are running the old Ritchie PDP-11 C compiler or
+some other compiler that doesn't know about `void', you will have
+to un-comment-out the definition of `void=int' in the Makefile.
+
Other than this, there should be no portability problems,
but one never knows these days. Please let me know of any
other problems you find porting to a UNIX system. I don't much