home *** CD-ROM | disk | FTP | other *** search
/ ftp.barnyard.co.uk / 2015.02.ftp.barnyard.co.uk.tar / ftp.barnyard.co.uk / cpm / walnut-creek-CDROM / JSAGE / ZSUS / LBR / BOOZ4CPM.ARK / BOOZ.DOC < prev    next >
Text File  |  1988-09-05  |  7KB  |  147 lines

  1.                       Booz 1.02 -- Barebones Ooz
  2.                                   a
  3.                          Zoo Extractor/Lister
  4.                                   by
  5.                              Rahul Dhesi
  6.  
  7. Booz 1.02 is a small, memory-efficient Zoo archive extractor/lister. 
  8. It is not fancy.  It does not recognize the advanced features
  9. available in current versions of Zoo, such as long filenames,
  10. directory names, comments, and multiple file generations.  Extraction
  11. always uses a short MS-DOS format filename and all extracted files go
  12. into the current directory.
  13.  
  14. But Booz 1.02 is simple and portable and can be implemented in about
  15. fifteen minutes on any system with a reasonably good C compiler that
  16. provides **IX-compatible read(), write(), and lseek() functions.
  17. And Booz 1.02 can extract and list all archives created by all
  18. currently-existing versions of Zoo.
  19.  
  20. At compilation time, conditional compilation selects one of three
  21. levels of sophistication for Booz 1.02.  The three options are as
  22. follows.
  23.  
  24. The Tiny option:  Booz compiled with the Tiny option is very frugal
  25. and should compile and run under CP/M and other systems with limited
  26. memory.  Tiny Booz always extracts an entire archive at a time and
  27. does not attempt to prevent an exctracted file from overwriting
  28. another.  Tiny Booz requires you to type the entire filename of the
  29. archive being extracted, including the ".zoo" extension.
  30.  
  31. The Small option:  Booz compiled with the Small option is a little
  32. more sophisticated than Tiny Booz.  Small Booz assumes the default
  33. extension ".zoo" for an archive if it is not specified.  It will let
  34. you specify which files should be extracted from an archive.  Small
  35. Booz accepts these wildcard symbols in the names of files to be
  36. extracted:  "?" stands for any one character and "*" stands for any
  37. sequence of zero or more characters.  Combinations of these are
  38. permitted so, for example, "*c?t*h" matches filenames ending with "h"
  39. and containing "c" and "t" separated by one character.  Small Booz is
  40. nearly as memory-efficient as Tiny Booz and it very likely that it
  41. will compile and run under CP/M.
  42.  
  43. The Big option:  Booz compiled with the Big option does everything
  44. that Small Booz does and in addition it can give the directory
  45. listing of a Zoo archive or test its integrity.  Despite its name,
  46. Big Booz is still quite frugal.  Under MS-DOS, when compiled with
  47. the Microsoft C compiler version 3.00, it runs in about 50 kilobytes
  48. of free memory and occupies about 9.5 kilobytes on disk.
  49.  
  50.  
  51.                          COMPILING BOOZ 1.02
  52.  
  53. 1.
  54. Make sure that the two macros OPEN and CREATE are correctly defined
  55. for your system in file `oozio.h'.  Some sample macros are provided. 
  56. The macros must be defined to open files in binary mode (i.e.,
  57. without newline conversions).
  58.  
  59. The macro OPEN is supplied a filename and it must open the file for
  60. reading and return an open file descriptor, or -1 if the open fails. 
  61. It is used to open the archive being extracted or listed, and to test
  62. the existence of a file about to be extracted.
  63.  
  64. The macro CREATE is supplied a filename and it must create a new file
  65. for writing and return an open file descriptor, or -1 if the create
  66. fails.  It is used for creating each file that is extracted.
  67.  
  68. 2.
  69. If your C library does not provide the unlink() function (which
  70. deletes a file given its name), define an empty function by that
  71. name, or define a suitable (possibly empty) macro by that name in
  72. file `oozio.h'.
  73.  
  74. 3.
  75. Decide which of the three options, Tiny, Small, or Big, you will use.
  76. If memory is tight use the Tiny option first to get a Zoo extractor
  77. quickly running on your system.  Then experiment with the other
  78. options.  If memory is not tight, use the Big option.  Define any one
  79. of the symbols TINY, SMALL, or BIG in the file `options.h' (or
  80. alternatively define it on the command line that invokes your C
  81. compiler).  Exactly one of these three symbols must be defined.
  82.  
  83. 4.
  84. Choose appropriate sizes for the input/output buffers and for the
  85. size of the decompression stack in file `options.h'.  If memory
  86. permits, make the buffers 8192 each.   (Bigger sizes, perhaps up to
  87. 16384, could be used but they have not been tested and could
  88. conceivably cause overflow in certain bit-shift operations in file
  89. `lzd.c').  A reasonable stack size is 2000, but in pathological cases
  90. extraction of a file could require a larger stack.
  91.  
  92. If memory is tight, decrease the input/output buffers to 1024 each
  93. each and the stack to 1000.
  94.  
  95. 5.
  96. Compile and link all the C files.  Two makefiles are supplied, one
  97. suitable for **IX systems and the other for Microsoft C 3.0 under
  98. MS-DOS.  Modify these as necessary for your system.  Also supplied is
  99. a project file booz.prj for use with Turbo C 1.0 on MS-DOS.
  100.  
  101.  
  102.                           MACHINE DEPENDENCE
  103.  
  104. Booz is relatively independent of machine architecture, except that
  105. (a) the machine must be a 2's complement machine (all modern machines
  106. are) and (b) `char' must be exactly 8 bits, `int' must be 16 bits or
  107. larger, and `long' must be 32 bits or larger (though a `long' of a
  108. little less than 32 bits may work).
  109.  
  110. Booz makes no assumptions about the filename syntax of the host
  111. machine, except that Small and Big Booz assume that dot "." is used to
  112. separate the extension "zoo" from the rest of the name of the
  113. archive.  They will append ".zoo" to the archive name if it contains
  114. no dot;  this fails if an archive name of the type "../junk" is
  115. specified.  
  116.  
  117. If your system uses a different filename syntax, you may need to
  118. change the code.  Also, if your system cannot accept some of the
  119. characters legal in MS-DOS filenames, you may need to add a function
  120. that will fix the filename before extraction.  A sample function
  121. `fixfname()' is included in the file `oozext.c'.  It becomes activated
  122. only if the preprocessor symbol FIXFNAME is defined.
  123.  
  124.                  NOTE
  125.  
  126. This program does not attempt to be case-insensitive.  Therefore you
  127. will need to type names of files to be extracted in the correct
  128. case.  Note, however, that some operating systems (possibly CP/M) may
  129. fold command line arguments to uppercase.  If this happens, your
  130. best bet is to extract all files from an archive instead of
  131. specifying specific names.
  132.  
  133.                REVISION HISTORY
  134.  
  135. Version 1.00
  136.      Corresponded to just the Tiny booz 1.02
  137.  
  138. Version 1.01
  139.      Included TINY, SMALL, BIG compilation options.  Had a bug in
  140.      function needed() that sometimes cause file extraction to fail.
  141.  
  142. Version 1.02
  143.      Fixed bug in function needed().  Added support for Turbo C 1.0.
  144.      Revised this documentation and some comments in the source code.
  145.  
  146.                                 -- Rahul Dhesi 1988/08/25
  147.