Booz is a small, memory-efficient, public domain Zoo archive extractor and lister. It is not fancy. It currently does not recognize any of the advanced features available in current versions of Zoo, such as long filenames, directory names, comments, and multiple file generations. Extraction always uses a short MS-DOS format filename and all extracted files go into the current directory.
But it is simple and portable and can be implemented in about fifteen minutes on any system with a reasonably good C compiler that provides very basic string and input/output functions. And it will extract all archives created by all versions of zoo including version 2.1, which uses a newer compression method.
-
Make sure that the two macros OPEN and CREATE are correctly defined for your system in the file `booz.h'. Some sample macros are provided. The macros must be defined to open files in binary mode (i.e., without newline conversions).
The macro OPEN is supplied a filename and it must open the file for reading and return an open file pointer, or NULL if the open fails. It is used to open the archive being extracted or listed, and to test the existence of a file about to be extracted.
The macro CREATE is supplied a filename and it must create a new file for writing and return an open file pointer, or NULL if the create fails. It is used for creating each file that is extracted.
-
Make sure that a symbol T_UINT16 is defined in `booz.h' that is an unsigned data type whose size is exactly 16 bits. In most cases this will be "unsigned short".
-
If your C library does not provide the unlink() function (which deletes a file given its name), define an empty function by that name, or define a suitable macro by that name in file `booz.h.h'.
-
Compile and link all the C files. A **IX-compatible makefile is supplied.
Booz is relatively independent of machine architecture, except that
(a) the machine must be a 2's complement machine (all modern machines
are) and (b) char' must be exactly 8 bits,
int' must be 16 bits or
larger, and `long' must be 32 bits or larger, and there must be some
unsigned data type (e.g. "unsigned short") holding exactly 16 bits.
Booz makes no assumptions about the filename syntax of the host machine, except that it assumes that a dot "." is used to separate the extension "zoo" from the rest of the name of the archive. It will append ".zoo" to the archive name if it contains no dot. (This fails if an archive name of the type "../junk" is specified.)
If your system uses a different filename syntax, you may need to change
the code. Also, if your system cannot accept some of the characters
legal in MS-DOS filenames, you may need to add a function that will fix
the filename before extraction. A sample function fixfname()
is
included in the file oozext.c
. It becomes activated only if the
preprocessor symbol FIXFNAME is defined.
This program does not attempt to be case-insensitive. Therefore you will need to type names of files to be extracted in the correct case.
-- Rahul Dhesi 1991/07/08