home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1994 March / Source_Code_CD-ROM_Walnut_Creek_March_1994.iso / compsrcs / misc / volume34 / unzip50 / patch01 < prev    next >
Encoding:
Text File  |  1993-01-18  |  75.7 KB  |  2,105 lines

  1. Newsgroups: comp.sources.misc
  2. From: Info-ZIP group (zip-bugs@wkuvx1.bitnet)
  3. Subject: v34i124:  unzip50 - Info-ZIP portable UnZip, version 5.0, Patch01
  4. Message-ID: <1993Jan19.040513.27713@sparky.imd.sterling.com>
  5. X-Md4-Signature: 20984326977f40d15917f01025eb6a89
  6. Date: Tue, 19 Jan 1993 04:05:13 GMT
  7. Approved: kent@sparky.imd.sterling.com
  8.  
  9. Submitted-by: Info-ZIP group (zip-bugs@wkuvx1.bitnet)
  10. Posting-number: Volume 34, Issue 124
  11. Archive-name: unzip50/patch01
  12. Environment: UNIX, VMS, OS/2, MS-DOS, MACINTOSH, WIN-NT, LINUX, MINIX, COHERENT, !ATARI, symlink, SGI, DEC, Cray, Convex, Amdahl, Sun
  13. Patch-To: unzip50: Volume 31, Issue 104-117
  14.  
  15. UnZip version 5.0, patchlevel 1, 15 January 1993
  16.  
  17. This patch mainly fixes two compatibility problems with PKZIP 2.04c
  18. and one old bug in the password-checking of the decryption code.  (Note
  19. that the zcrypt19 sources, also posted in comp.sources.misc volume 31,
  20. are still required for decryption support.)  The full list of changes
  21. is as follows:
  22.  
  23.  - inflate:  various bugfixes
  24.     - fixed to work with PKZIP 2.04c (allow empty code sets in huft_build)
  25.     - ifdef'd fixes to deal with PKZIP beta bugs (PKZIP_BUG_WORKAROUND)
  26.     - inflate_entry -> inflate; fixed comment; removed memory error message
  27.  - funzip:  various bugfixes
  28.     - added final exit(0) to avoid gnutar problem
  29.     - OS/2 and MS-DOS read/write modes
  30.     - improved/fixed inflation error messages; inflate_entry() -> inflate()
  31.     - fixed crypt/store bug
  32.     - fixed decryption check (single byte)
  33.  - updated decryption password test to work with PKZIP 2.04c
  34.  - fixed decryption header bug (double decryption of header in some cases)
  35.  - fixed non-definition of UNIX macro under Xenix and Convex Unix
  36.  - MS-DOS/Windows:  fixed DISPLAY bug in misc.c
  37.  - fixed ecrec offsets reported by zipinfo -v (real, expected were reversed)
  38.  - fixed extract.c error messages for explode(), inflate()
  39.  - removed extraneous ')' for 386BSD in misc.c
  40.  - various Makefile changes/fixes
  41.  - updated Contents, README, Where files
  42.  
  43. Other changes:
  44.  
  45.  - renamed Readme to README as per comp.sources.misc guidelines
  46.  - renamed thinkc.rsrc.hqx to thinkc_rsrc.hqx (fatal bug in MS-DOS SHEZ80)
  47.  
  48. These changes have been contributed by various people, but Mark Adler
  49. (inflate) and Jean-loup Gailly (crypt) are due extra credit.  Thanks
  50. to the entire Info-ZIP beta test group, as well.
  51.  
  52. Please report problems with UnZip (and Zip) to zip-bugs@wkuvx1.bitnet.
  53.  
  54. Greg Roelofs (Info-ZIP UnZip guy)
  55. roe2@midway.uchicago.edu
  56. ----------------------------------
  57. diff -cb unzip50/Contents unz50p1/Contents
  58. *** unzip50/Contents    Fri Aug 21 08:19:52 1992
  59. --- unz50p1/Contents    Sun Jan 10 21:48:38 1993
  60. ***************
  61. *** 1,10 ****
  62. ! Contents of the UnZip 5.0 archive (the OS-specific subdirectories at the
  63.   end contain their own Contents listings):
  64.   
  65.     Contents    this file
  66. !   Readme    what UnZip is; general information
  67.     Where        where Zip/UnZip and encryption/decryption support can be found
  68. !   History.500    new features and fixes in this release
  69.     ZipRules    Info-ZIP guidelines on contributions to the cause
  70.     BUGS        known bugs, problems, and (possible) features to be added
  71.     unzip.1    UnZip manual page, nroff format
  72. --- 1,10 ----
  73. ! Contents of the UnZip 5.0p1 archive (the OS-specific subdirectories at the
  74.   end contain their own Contents listings):
  75.   
  76.     Contents    this file
  77. !   README    what UnZip is; general information
  78.     Where        where Zip/UnZip and encryption/decryption support can be found
  79. !   History.501    new features and fixes in this release
  80.     ZipRules    Info-ZIP guidelines on contributions to the cause
  81.     BUGS        known bugs, problems, and (possible) features to be added
  82.     unzip.1    UnZip manual page, nroff format
  83. ***************
  84. *** 31,37 ****
  85.     unzip.h    main UnZip header file (required*)
  86.     zip.h        header for using crypt.c with UnZip (required for decryption)
  87.     zipinfo.c    zipfile information utility (useful, but optional)
  88. !   Makefile    main Unix and OS/2 makefile (required)
  89.     AMIGA/    support files for compiling on Amiga (not recently tested)
  90.     ATARI/    support files for compiling v4.1 on Atari ST
  91.     MAC/        support files for compiling on Macintosh
  92. --- 31,37 ----
  93.     unzip.h    main UnZip header file (required*)
  94.     zip.h        header for using crypt.c with UnZip (required for decryption)
  95.     zipinfo.c    zipfile information utility (useful, but optional)
  96. !   Makefile    main Unix makefile (required)
  97.     AMIGA/    support files for compiling on Amiga (not recently tested)
  98.     ATARI/    support files for compiling v4.1 on Atari ST
  99.     MAC/        support files for compiling on Macintosh
  100. ***************
  101. *** 42,55 ****
  102.   
  103.   Files marked "required*" are also needed to compile ZipInfo.  There are Unix
  104.   and MS-DOS targets to make ZipInfo in Makefile (zipinfo, zi_indigo, zi_gcc, 
  105. ! zi_dos).  FUnZip is a new, last-minute program of limited capabilities; for
  106. ! now, it can only extract the first member in a zipfile from stdin and send
  107. ! it to stdout, and only if the member is either deflated or stored.  It will 
  108. ! probably have evolved by the time you read this, and it may even be absorbed 
  109. ! into UnZip itself.
  110.   
  111.   The Atari ST support is in the form of patches against UnZip 4.1; there
  112.   are more details in the ATARI sub-archive Contents file.  Amiga support
  113. ! has not been tested since version 4.1 or earlier (the makefiles, however,
  114. ! have been updated to reflect the new code structure, and any changes
  115. ! required shouldn't be TOO extensive).
  116. --- 42,54 ----
  117.   
  118.   Files marked "required*" are also needed to compile ZipInfo.  There are Unix
  119.   and MS-DOS targets to make ZipInfo in Makefile (zipinfo, zi_indigo, zi_gcc, 
  120. ! zi_dos).  FUnZip is a new program of limited capabilities; for now, it can 
  121. ! only extract the first member in a zipfile from stdin and send it to stdout,
  122. ! and only if the member is either deflated or stored.  It works under Unix,
  123. ! OS/2 and MS-DOS, at least, although it doesn't appear in all of the makefiles
  124. ! yet.  It may eventually be absorbed into UnZip itself.
  125.   
  126.   The Atari ST support is in the form of patches against UnZip 4.1; there
  127.   are more details in the ATARI sub-archive Contents file.  Amiga support
  128. ! is only partial for this release, but full support is almost complete in 
  129. ! the current UnZip 5.1 betas.
  130. diff -cb unzip50/History.501 unz50p1/History.501
  131. *** unzip50/History.501    Sun Jan 10 22:07:58 1993
  132. --- unz50p1/History.501    Tue Jan 12 19:45:01 1993
  133. ***************
  134. *** 0 ****
  135. --- 1,30 ----
  136. + UnZip version 5.0p1, 12 January 1993
  137. + Bugs fixed:
  138. +  - inflate:  various bugfixes
  139. +     - fixed to work with PKZIP 2.04c (allow empty code sets in huft_build)
  140. +     - ifdef'd fixes to deal with PKZIP beta bugs (PKZIP_BUG_WORKAROUND)
  141. +     - inflate_entry -> inflate; fixed comment; removed memory error message
  142. +  - funzip:  various bugfixes
  143. +     - added final exit(0) to avoid gnutar problem
  144. +     - OS/2 and MS-DOS read/write modes
  145. +     - improved/fixed inflation error messages; inflate_entry() -> inflate()
  146. +     - fixed crypt/store bug
  147. +     - fixed decryption check (single byte)
  148. +  - updated decryption password test to work with PKZIP 2.04c
  149. +  - fixed decryption header bug (double decryption of header in some cases)
  150. +  - fixed non-definition of UNIX macro under Xenix and Convex Unix
  151. +  - MS-DOS/Windows:  fixed DISPLAY bug in misc.c
  152. +  - fixed ecrec offsets reported by zipinfo -v (real, expected were reversed)
  153. +  - fixed extract.c error messages for explode(), inflate()
  154. +  - removed extraneous ')' for 386BSD in misc.c
  155. +  - various Makefile changes/fixes
  156. +  - updated Contents, README, Where files
  157. + Other changes:
  158. +  - renamed Readme to README as per comp.sources.misc guidelines
  159. +  - renamed thinkc.rsrc.hqx to thinkc_rsrc.hqx (fatal bug in MS-DOS SHEZ80)
  160. + Greg Roelofs (a.k.a. Cave Newt)
  161. diff -cb unzip50/Makefile unz50p1/Makefile
  162. *** unzip50/Makefile    Thu Aug 20 09:09:22 1992
  163. --- unz50p1/Makefile    Sun Jan 10 12:51:24 1993
  164. ***************
  165. *** 409,415 ****
  166.   #     LF="/noi/nol" LF2=",unzip;"
  167.   
  168.   msc_dos:    rsp
  169. !     $(MAKE) unzip.exe CF="-Ox $(LOC) -nologo" CC=cl LD=link E=.exe\
  170.        O=.obj LOBJS="" LF="@rsp" LF2=""
  171.       del rsp
  172.   
  173. --- 409,415 ----
  174.   #     LF="/noi/nol" LF2=",unzip;"
  175.   
  176.   msc_dos:    rsp
  177. !     $(MAKE) unzip.exe CF="-Oait -Gs $(LOC) -nologo" CC=cl LD=link E=.exe\
  178.        O=.obj LOBJS="" LF="@rsp" LF2=""
  179.       del rsp
  180.   
  181. ***************
  182. *** 521,527 ****
  183.       $(MAKE) zipinfo CF="-cckr -O -DUNIX $(LOC)"
  184.   
  185.   zi_dos:            # MSC 6.0 + nmake, MS-DOS
  186. !     $(MAKE) zipinfo.exe CF="-Ox -nologo $(LOC) -G2" CC=cl\
  187.        LD=link E=.exe O=.obj ZL="/noi /nol" ZL2=",zipinfo;"\
  188.        LN="copy" RM="DEL"
  189.   
  190. --- 521,527 ----
  191.       $(MAKE) zipinfo CF="-cckr -O -DUNIX $(LOC)"
  192.   
  193.   zi_dos:            # MSC 6.0 + nmake, MS-DOS
  194. !     $(MAKE) zipinfo.exe CF="-Oait -Gs -nologo $(LOC)" CC=cl\
  195.        LD=link E=.exe O=.obj ZL="/noi /nol" ZL2=",zipinfo;"\
  196.        LN="copy" RM="DEL"
  197.   
  198. diff -cb unzip50/Readme unz50p1/README
  199. *** unzip50/Readme    Fri Aug 21 09:49:20 1992
  200. --- unz50p1/README    Sun Jan 10 21:53:36 1993
  201. ***************
  202. *** 1,11 ****
  203. ! File Readme for:
  204.   
  205. ! unzip50.zip    generic Unix/VMS/OS2/MSDOS/Mac/Windows[/Amiga/Atari] UnZip 5.0
  206. ! unzip50.zoo    same as above, but ZOO format
  207. ! unzip50.tar.Z    same as above, but compressed tar format
  208.   
  209.   A public distribution version of the Info-ZIP project's generic UnZip
  210. ! utility; 21 August 1992.
  211.   
  212.   __________________________________________________________________________
  213.   
  214. --- 1,11 ----
  215. ! File README for:
  216.   
  217. ! unz50p1.zip    portable UnZip (zipfile extraction utility), version 5.0p1
  218. ! unz50p1.zoo    same as above, but ZOO format
  219. ! unz50p1.tar.Z    same as above, but compressed tar format
  220.   
  221.   A public distribution version of the Info-ZIP project's generic UnZip
  222. ! utility; 10 January 1993.
  223.   
  224.   __________________________________________________________________________
  225.   
  226. ***************
  227. *** 12,33 ****
  228.   BEFORE YOU ASK:  UnZip, its companion utility Zip, and related utilities
  229.   and support files can be found in many places; read the file "Where" for
  230.   further details.  To contact the authors with suggestions, bug reports, or
  231. ! fixes, continue reading this file (Readme) and the file "ZipRules".  For
  232.   a list of known bugs and possible future features, read "BUGS".  And for a
  233.   commented listing of the files included in the source distribution, read
  234.   "Contents" in said distribution.
  235.   
  236. ! ALSO NOTE:  Info-ZIP's mailing addresses and ftp site will be changing
  237. ! within the next month.  The current e-mail addresses should hold for a
  238. ! while via mail-forwarding, but watch for the new addresses in our next
  239. ! release.
  240.   __________________________________________________________________________
  241.   
  242.   
  243. ! This version of UnZip has been ported to a wide array of Unix and other
  244. ! mainframes, minis, and micros (including VMS, OS/2, Minix, MSDOS, Windows,
  245. ! Amiga (not tested recently), and Macintosh).  Although highly compatible 
  246. ! with PKware's PKZIP and PKUNZIP utilities of MSDOS fame, our primary ob-
  247.   jective has been one of portability and other-than-MSDOS functionality.  
  248.   Features not found in the PKWare version include default extraction of 
  249.   directory trees (with a switch to defeat this, rather than the other way 
  250. --- 12,34 ----
  251.   BEFORE YOU ASK:  UnZip, its companion utility Zip, and related utilities
  252.   and support files can be found in many places; read the file "Where" for
  253.   further details.  To contact the authors with suggestions, bug reports, or
  254. ! fixes, continue reading this file (README) and the file "ZipRules".  For
  255.   a list of known bugs and possible future features, read "BUGS".  And for a
  256.   commented listing of the files included in the source distribution, read
  257.   "Contents" in said distribution.
  258.   
  259. ! ALSO NOTE:  Info-ZIP's mailing addresses have changed!  The most important
  260. ! one:  zip-bugs@wkuvx1.bitnet (or zip-bugs%wkuvx1.bitnet@ukcc.uky.edu, for
  261. ! those without a direct Bitnet connection).  See below for other addresses.
  262.   __________________________________________________________________________
  263.   
  264.   
  265. ! This version of UnZip has been ported to a wide array of hardware--from 
  266. ! micros to supercomputers--and operating systems:  Unix (many flavors),
  267. ! VMS, OS/2, Minix, MSDOS, Windows, NT, Amiga (partially) and Macintosh.
  268. ! [The current 5.1 beta has additionally been ported to TOPS-20 and Atari
  269. ! TOS, and the Amiga port has been completed.]  Although highly compatible
  270. ! with PKWARE's PKZIP and PKUNZIP utilities of MSDOS fame, our primary ob-
  271.   jective has been one of portability and other-than-MSDOS functionality.  
  272.   Features not found in the PKWare version include default extraction of 
  273.   directory trees (with a switch to defeat this, rather than the other way 
  274. ***************
  275. *** 40,46 ****
  276.   you're not compiling under Unix.
  277.   
  278.   New features in this version include support for deflation (the new, high-
  279. ! performance compression method introduced in the PKZIP 1.93 alpha); much
  280.   faster decompression; relaxed copyright restrictions, due to rewritten
  281.   code (see COPYING for details); multiple password guessing, for encrypted
  282.   zipfiles; support for options stored in an environment variable, to change
  283. --- 41,47 ----
  284.   you're not compiling under Unix.
  285.   
  286.   New features in this version include support for deflation (the new, high-
  287. ! performance compression method introduced in the PKZIP 1.93a beta); much
  288.   faster decompression; relaxed copyright restrictions, due to rewritten
  289.   code (see COPYING for details); multiple password guessing, for encrypted
  290.   zipfiles; support for options stored in an environment variable, to change
  291. ***************
  292. *** 48,64 ****
  293.   Many bugs were fixed as well.  The History file details the changes, and 
  294.   BUGS indicates the ones we haven't nailed just yet. :-)
  295.   
  296. ! See unzip.1 or unzip.man for usage (or zipinfo.1/zipinfo.man for ZipInfo
  297. ! usage, or funzip.1/funzip.man--do you sense a pattern here?--for FUnZip
  298.   usage).  Unfortunately the VMS versions of these documents are out of date
  299. ! now; we hope to correct this soon.
  300.   
  301.   All bug reports and patches (context diffs only, please!) should go to 
  302. ! zip-bugs@cs.ucla.edu, and suggestions for new features can be sent to 
  303. ! info-zip@cs.ucla.edu (although we don't promise to use all suggestions).
  304.   If it's something which is manifestly useful, sending the required patches 
  305.   to zip-bugs directly is likely to produce a quicker response than asking 
  306. ! us to do it.  Those directly responsible for updating the code are somewhat
  307.   short on time these days.  If you're considering a port, however, please 
  308.   check in with Info-ZIP FIRST, since the code is constantly being updated 
  309.   behind the scenes.  We'll arrange to send you the latest source.  The 
  310. --- 49,65 ----
  311.   Many bugs were fixed as well.  The History file details the changes, and 
  312.   BUGS indicates the ones we haven't nailed just yet. :-)
  313.   
  314. ! See unzip.1 or unzip.doc for usage (or zipinfo.1/zipinfo.doc for ZipInfo
  315. ! usage, or funzip.1/funzip.doc--do you sense a pattern here?--for FUnZip
  316.   usage).  Unfortunately the VMS versions of these documents are out of date
  317. ! now; we hope to correct this some day. :-)
  318.   
  319.   All bug reports and patches (context diffs only, please!) should go to 
  320. ! zip-bugs@wkuvx1.bitnet, and suggestions for new features can be sent to 
  321. ! info-zip@wkuvx1.bitnet (although we don't promise to use all suggestions).
  322.   If it's something which is manifestly useful, sending the required patches 
  323.   to zip-bugs directly is likely to produce a quicker response than asking 
  324. ! us to do it.  Those directly responsible for updating the code are very
  325.   short on time these days.  If you're considering a port, however, please 
  326.   check in with Info-ZIP FIRST, since the code is constantly being updated 
  327.   behind the scenes.  We'll arrange to send you the latest source.  The 
  328. ***************
  329. *** 67,74 ****
  330.   
  331.   If you'd like to keep up to date with our UnZip (and companion Zip utility)
  332.   development, join the ranks of BETA testers, add your own thoughts and con-
  333. ! tributions, etc., send your request to Info-ZIP-Request@cs.ucla.edu and 
  334. ! Rich Wales will add you to the Info-ZIP newsletter mailing list.
  335.   
  336.   Greg Roelofs (Cave Newt), UnZip maintainer,
  337.   with inspiration from David Kirschbaum
  338. --- 68,79 ----
  339.   
  340.   If you'd like to keep up to date with our UnZip (and companion Zip utility)
  341.   development, join the ranks of BETA testers, add your own thoughts and con-
  342. ! tributions, etc., send a two-line mail message containing the commands HELP
  343. ! and LIST (on separate lines in the body of the message, not on the subject
  344. ! line) to listserv@wkuvx1.bitnet.  You'll receive two messages listing the 
  345. ! various Info-ZIP mailing-list formats which are available (and also various
  346. ! unrelated lists) and instructions on how to subscribe to one or more of them
  347. ! (courtesy of Hunter Goatley).
  348.   
  349.   Greg Roelofs (Cave Newt), UnZip maintainer,
  350.   with inspiration from David Kirschbaum
  351. diff -cb unzip50/Where unz50p1/Where
  352. *** unzip50/Where    Thu Aug 20 09:04:58 1992
  353. --- unz50p1/Where    Thu Jan 14 12:40:56 1993
  354. ***************
  355. *** 1,37 ****
  356.   __________________________________________________________________________
  357.   
  358. !   This is the Info-ZIP file ``Where,'' last updated on 20 August 1992.
  359.   __________________________________________________________________________
  360.   
  361.   
  362.     SITE OWNERS:  If you're listed in here but the information is not
  363.     correct (or if you're a big site but aren't listed at all), please
  364. !   let us know!  E-mail to zip-bugs at the address given in Readme
  365.     and we'll update this file.
  366.   
  367.   Basic source-archive names for Info-ZIP's portable Zip, UnZip, and related
  368.   utilities (on some ftp sites, the .zip files may have a .zoo equivalent
  369. ! in zoo 2.10 format):
  370.   
  371. !     zip19.zip    Zip 1.9 (includes zipnote and zipsplit)
  372. !     zip19.tar.Z    ditto, compress'd tar format
  373.   
  374. !     unzip50.zip    UnZip 5.0 (includes zipinfo and funzip)
  375. !     unzip50.tar.Z    ditto, compress'd tar format
  376.   
  377. !     wunz12sr.zip    WizUnZip 1.2 support files for Windows 3.1, UnZip 5.0
  378.   
  379.       zcrypt19.zip    encryption/decryption support (includes zipcloak)
  380.   
  381.   Related archives and files:
  382.   
  383. !     UnzpHist.zip    changes history of UnZip, back to 2.0
  384.   
  385. !     zip19x.zip      MSDOS executables and docs for zip, zipnote, zipsplit
  386. !     unzip50.exe     MSDOS executable for unzip
  387.   
  388. !     zip19_16.zip    OS/2 1.x 16-bit executables and docs
  389. !     zip19_32.zip    OS/2 2.x 32-bit executables and docs
  390.       unz50_16.exe    OS/2 1.x 16-bit executable
  391.       unz50_32.exe    OS/2 2.x 32-bit executable
  392.   
  393. --- 1,45 ----
  394.   __________________________________________________________________________
  395.   
  396. !   This is the Info-ZIP file ``Where,'' last updated on 14 January 1993.
  397.   __________________________________________________________________________
  398.   
  399. +    Note that some ftp sites may not yet have the latest versions of
  400. +    Zip and UnZip when you read this.  The latest versions, including
  401. +    the crypt sources, are always in the comp.sources.misc archives.
  402.   
  403.      SITE OWNERS:  If you're listed in here but the information is not
  404.      correct (or if you're a big site but aren't listed at all), please
  405. !    let us know!  E-mail to zip-bugs at the address given in README
  406.      and we'll update this file.
  407. + __________________________________________________________________________
  408.   
  409.   Basic source-archive names for Info-ZIP's portable Zip, UnZip, and related
  410.   utilities (on some ftp sites, the .zip files may have a .zoo equivalent
  411. ! in Zoo 2.10 format):
  412.   
  413. !    zip19p1.zip     Zip 1.9, patchlevel 1 (deflation; includes zipnote, zipsplit)
  414. !    zip19p1.tar.Z   ditto, compress'd tar format
  415.   
  416. !    zip11.zip       Zip 1.1 (shrinking, implosion; compatible with PKUNZIP 1.1)
  417. !    zip11.tar.Z     ditto, compress'd tar format
  418.   
  419. !    unz50p1.zip     UnZip 5.0, patchlevel 1 (all methods; incl. zipinfo, funzip)
  420. !    unz50p1.tar.Z   ditto, compress'd tar format
  421.   
  422. +    wunz13sr.zip    WizUnZip 1.3 support files for Windows 3.1, UnZip 5.0
  423.      zcrypt19.zip    encryption/decryption support (includes zipcloak)
  424.   
  425.   Related archives and files:
  426.   
  427. !    UnzpHist.zip    complete changes history of UnZip and precursors
  428.   
  429. !    zip19p1x.zip    MSDOS executables and docs for zip, zipnote, zipsplit
  430. !    unz50p1.exe     MSDOS self-extracting executable (contains unzip, docs)
  431.   
  432. !    zip19x16.zip    OS/2 1.x 16-bit executables and docs
  433. !    zip19x32.zip    OS/2 2.x 32-bit executables and docs
  434.      unz50_16.exe    OS/2 1.x 16-bit executable
  435.      unz50_32.exe    OS/2 2.x 32-bit executable
  436.   
  437. ***************
  438. *** 38,56 ****
  439.       zip19vms.zip    VMS executables and docs for zip, zipnote, zipsplit
  440.       unz50vms.exe    VMS executable for unzip
  441.   
  442. !     zip_unzip.hqx   Macinstosh executables (zip 1.0 only, 1.9 not ready)
  443.   
  444. !     winunz12.zip    Windows 3.1 executables (zip 1.0 only, 1.9 not ready)
  445.   
  446. !     pkz110eu.exe    MS-DOS PKZIP/PKUNZIP 1.1 (self-extracting archive)
  447.       pkz193a.exe    MS-DOS PKZIP/PKUNZIP beta 1.93 (self-extracting)
  448.       pkz102-2.exe    OS/2 PKZIP/PKUNZIP 1.02 (self-extracting)
  449.   
  450. ! ftp sites for the US-exportable sources and executables.  Look for
  451. ! the file names given above in the following directories.  Some sites
  452. ! like to use slightly different names, such as zip-1.9.tar-z instead
  453. ! of zip19.tar.Z.
  454.   
  455.       wuarchive.wustl.edu:/packages/compression/...
  456.       wuarchive.wustl.edu:/mirrors/misc/unix/...
  457.       wuarchive.wustl.edu:/mirrors/misc/vaxvms/...
  458. --- 46,69 ----
  459.      zip19vms.zip    VMS executables and docs for zip, zipnote, zipsplit
  460.      unz50vms.exe    VMS executable for unzip
  461.   
  462. !    zip_unzip.hqx   Macintosh executables (zip 1.0 only, 1.9 not ready)
  463.   
  464. !    wunz13.zip      Windows 3.1 executable and docs for unzip (WizUnZip)
  465.   
  466. !    pkz204c.exe     MS-DOS PKZIP/PKUNZIP 2.04c (self-extracting archive)
  467. !    pkz110eu.exe    MS-DOS PKZIP/PKUNZIP 1.1 (self-extracting)
  468.      pkz193a.exe     MS-DOS PKZIP/PKUNZIP beta 1.93 (self-extracting)
  469.      pkz102-2.exe    OS/2 PKZIP/PKUNZIP 1.02 (self-extracting)
  470.   
  471. ! ftp sites for the US-exportable sources and executables:
  472.   
  473. +    NOTE:  Look for the file names given above in the following
  474. +    directories.  Some sites like to use slightly different names,
  475. +    such as zip-1.9p1.tar-z instead of zip19p1.tar.Z.  In the case
  476. +    of comp.sources.misc archive sites, directories may be used
  477. +    (zip19/part01.Z ... part11.Z, zip19/patch01.Z).
  478. +    wuarchive.wustl.edu:/usenet/comp.sources.misc/volume31/...
  479.      wuarchive.wustl.edu:/packages/compression/...
  480.      wuarchive.wustl.edu:/mirrors/misc/unix/...
  481.      wuarchive.wustl.edu:/mirrors/misc/vaxvms/...
  482. ***************
  483. *** 57,82 ****
  484.       wuarchive.wustl.edu:/mirrors/msdos/zip/...
  485.       wuarchive.wustl.edu:/mirrors/msdos/windows3/...
  486.   
  487.       ftp.uu.net:/pub/zip/...
  488.   
  489.       ftp-os2.nmsu.edu:/pub/os2/2.0/archivers/...
  490.       ftp-os2.nmsu.edu:/pub/os2/all/archivers/...
  491.   
  492. -     Zip 1.9 and UnZip 5.0 will also be available at any comp.sources.misc
  493. -     archive site as soon as they are posted.
  494.       wuarchive.wustl.edu:/mirrors/msdos/zip/pkz110eu.exe
  495.       ux1.cso.uiuc.edu:/pc/exec-pc/pkz193a.exe    [128.174.5.59]
  496.   
  497. ! ftp sites for the encryption and decryption sources:
  498.   
  499. !     NOTE:  Non-US users, please do NOT ftp from the US site (US
  500.       regulations and all that).  Likewise, US users, please do not
  501.       ftp from the European sites (it's not illegal, but it sure is
  502.       a waste of expensive bandwidth).
  503.   
  504.       From the US:
  505. !        wuarchive.wustl.edu:/mirrors3/garbo.uwasa.fi/arcutil/zcrypt19.zip
  506.   
  507.       Outside the US:
  508.          garbo.uwasa.fi:/pc/arcutil/zcrypt19.zip
  509. --- 70,100 ----
  510.      wuarchive.wustl.edu:/mirrors/msdos/zip/...
  511.      wuarchive.wustl.edu:/mirrors/msdos/windows3/...
  512.   
  513. +    ftp.uu.net:/usenet/comp.sources.misc/volume31/...
  514.      ftp.uu.net:/pub/zip/...
  515.   
  516.      ftp-os2.nmsu.edu:/pub/os2/2.0/archivers/...
  517.      ftp-os2.nmsu.edu:/pub/os2/all/archivers/...
  518. +    ftp-os2.nmsu.edu:/pub/downloads/Info-ZIP/...
  519.   
  520.      wuarchive.wustl.edu:/mirrors/msdos/zip/pkz110eu.exe
  521.      ux1.cso.uiuc.edu:/pc/exec-pc/pkz193a.exe        [128.174.5.59]
  522.   
  523. ! ftp sites for the encryption and decryption sources and/or executables:
  524.   
  525. !    NOTE 1:  Non-US users, please do NOT ftp from the US sites (US
  526.      regulations and all that).  Likewise, US users, please do not
  527.      ftp from the European sites (it's not illegal, but it sure is
  528.      a waste of expensive bandwidth).
  529.   
  530. +    NOTE 2:  Some sites may carry both encryption and non-encryption
  531. +    executables with slightly different names; for example, zip19c32.zip
  532. +    instead of zip19x32.zip ("c" == crypt version).
  533.      From the US:
  534. !       wuarchive.wustl.edu:/mirrors/garbo.uwasa.fi/arcutil/zcrypt19.zip
  535. !       wuarchive.wustl.edu:/usenet/comp.sources.misc/volume31/zcrypt19/part01.Z
  536. !       ftp.uu.net:/usenet/comp.sources.misc/volume31/zcrypt19/part01.Z
  537.   
  538.      Outside the US:
  539.         garbo.uwasa.fi:/pc/arcutil/zcrypt19.zip
  540. ***************
  541. *** 85,90 ****
  542. --- 103,125 ----
  543.         ftp.informatik.tu-muenchen.de:/pub/utils/archiver/zcrypt19.zip
  544.            (mail server at ftp-mailer@ftp.informatik.tu-muenchen.de)
  545.   
  546. +       ftp.uni-erlangen.de:/pub/pc/msdos/utilities/zip/...
  547. +       ftp.uni-erlangen.de:/pub/pc/os2/fauern/arc/...
  548. +          (131.188.1.43, 131.188.31.3, 131.188.34.43, 131.188.44.43)
  549. + ftp site for VMS-format Zip/UnZip package (sources and executables, no
  550. + encryption/decryption--see also "Mail servers" section below):
  551. +    The ZIP-UNZIP package for VMS is available via anonymous ftp from
  552. +    ftp.spc.edu [192.107.46.27]; the following files are needed:
  553. +    [.MACRO32]AAAREADME.TXT
  554. +    [.MACRO32]LZDCMP.EXE
  555. +    [.MACRO32.SAVESETS]ZIP-UNZIP.BCK_Z
  556. +    VMS sources and object files are also available from vmsnet.sources
  557. +    archives (e.g., black.cerritos.edu:[.mailserv.zip_unzip]*.*).
  558.   To find other ftp sites:
  559.   
  560.      The "archie" ftp database utility can be used to find an ftp site
  561. ***************
  562. *** 94,99 ****
  563. --- 129,135 ----
  564.   
  565.   UUCP sites:
  566.   
  567. +     uunet!~/usenet/comp.sources.misc/volume31/...
  568.       uunet!~/pub/zip/ ...
  569.   
  570.   Mail servers:
  571. ***************
  572. *** 103,122 ****
  573.       listserv@vm1.nodak.edu or listserv@vm.ecs.rpi.edu in order to
  574.       get a copy via e-mail:
  575.   
  576. !     /pdget mail pd:<misc.unix>unzip50.tar-z uuencode
  577. !     /pdget mail pd:<misc.unix>zip19.zip uuencode
  578. !    or:    /pdget mail pd:<misc.unix>zip19.tar-z uuencode
  579.   
  580. !     To get the encryption source by email, send the following commands
  581.       to ftp-mailer@ftp.informatik.tu-muenchen.de:
  582.   
  583.       get /pub/utils/archiver/zcrypt19.zip
  584.           quit
  585.   
  586.   __________________________________________________________________________
  587.   
  588. ! Again, if someone repackages any of the source or executable archives in
  589. ! VMS-, Mac- or Atari-specific formats, please let us know (send e-mail to 
  590. ! zip-bugs at the address listed in README).
  591.   __________________________________________________________________________
  592.   
  593. --- 139,165 ----
  594.      listserv@vm1.nodak.edu or listserv@vm.ecs.rpi.edu in order to
  595.      get a copy via e-mail:
  596.   
  597. !       /pdget mail pd8:<misc.unix>unz50p1.tar-z uuencode
  598. !       /pdget mail pd8:<misc.unix>zip19p1.tar-z uuencode
  599.   
  600. !    To get the encryption source by e-mail, send the following commands
  601.      to ftp-mailer@ftp.informatik.tu-muenchen.de:
  602.   
  603.         get /pub/utils/archiver/zcrypt19.zip
  604.         quit
  605.   
  606. +    To get the VMS Zip/UnZip package by e-mail, send the following
  607. +    commands in the body of a mail message to fileserv@wkuvx1.bitnet
  608. +    or fileserv%wkuvx1.bitnet@ukcc.uky.edu (the "HELP" command is
  609. +    also accepted):
  610. +       SEND ZIP-UNZIP
  611. +       SEND FILESERV_TOOLS
  612.   __________________________________________________________________________
  613.   
  614. !    Again, if someone repackages any of the source or executable archives
  615. !    in Mac-, Amiga- or Atari-specific formats, please let us know (send
  616. !    e-mail to zip-bugs at the address listed in README).
  617.   __________________________________________________________________________
  618.   
  619. diff -cb unzip50/extract.c unz50p1/extract.c
  620. *** unzip50/extract.c    Fri Aug 14 05:49:58 1992
  621. --- unz50p1/extract.c    Mon Jan 11 23:47:42 1993
  622. ***************
  623. *** 4,10 ****
  624.   
  625.     This file contains the high-level routines ("driver routines") for extrac-
  626.     ting and testing zipfile members.  It calls the low-level routines in files
  627. !   inflate.c, unimplod.c, unreduce.c and unshrink.c.
  628.   
  629.     ---------------------------------------------------------------------------*/
  630.   
  631. --- 4,10 ----
  632.   
  633.     This file contains the high-level routines ("driver routines") for extrac-
  634.     ting and testing zipfile members.  It calls the low-level routines in files
  635. !   explode.c, inflate.c, unreduce.c and unshrink.c.
  636.   
  637.     ---------------------------------------------------------------------------*/
  638.   
  639. ***************
  640. *** 584,590 ****
  641.   #ifdef S_IFLNK
  642.       int symlnk=FALSE;
  643.   #endif /* S_IFLNK */
  644. !     int error=0;
  645.       UWORD b;
  646.   
  647.   
  648. --- 584,590 ----
  649.   #ifdef S_IFLNK
  650.       int symlnk=FALSE;
  651.   #endif /* S_IFLNK */
  652. !     int r, error=0;
  653.       UWORD b;
  654.   
  655.   
  656. ***************
  657. *** 745,751 ****
  658.               error = 1;          /* 1:  warning error */
  659.           }
  660.   #endif /* S_IFLNK */
  661. !         explode();   /* ignore return code for now */
  662.           break;
  663.   
  664.       case DEFLATED:
  665. --- 745,761 ----
  666.               error = 1;          /* 1:  warning error */
  667.           }
  668.   #endif /* S_IFLNK */
  669. !         if (((r = explode()) != 0) && (r != 5)) {   /* ignore 5 if seekable */
  670. !             if ((tflag && quietflg) || (!tflag && (quietflg > 1)))
  671. !                 fprintf(stderr, "  error:  %s%s\n", r == 3?
  672. !                   "not enough memory to explode " :
  673. !                   "invalid compressed (imploded) data for ", filename);
  674. !             else
  675. !                 fprintf(stderr, "\n  error:  %s\n", r == 3?
  676. !                   "not enough memory for explode operation" :
  677. !                   "invalid compressed data for explode format");
  678. !             error = (r == 3)? 5 : 2;
  679. !         }
  680.           break;
  681.   
  682.       case DEFLATED:
  683. ***************
  684. *** 761,767 ****
  685.               error = 1;          /* 1:  warning error */
  686.           }
  687.   #endif /* S_IFLNK */
  688. !         inflate();
  689.           break;
  690.   
  691.       default:   /* should never get to this point */
  692. --- 771,787 ----
  693.               error = 1;          /* 1:  warning error */
  694.           }
  695.   #endif /* S_IFLNK */
  696. !         if ((r = inflate()) != 0) {
  697. !             if ((tflag && quietflg) || (!tflag && (quietflg > 1)))
  698. !                 fprintf(stderr, "  error:  %s%s\n", r == 3?
  699. !                   "not enough memory to inflate " :
  700. !                   "invalid compressed (deflated) data for ", filename);
  701. !             else
  702. !                 fprintf(stderr, "\n  error:  %s\n", r == 3?
  703. !                   "not enough memory for inflate operation" :
  704. !                   "invalid compressed data for inflate format");
  705. !             error = (r == 3)? 5 : 2;
  706. !         }
  707.           break;
  708.   
  709.       default:   /* should never get to this point */
  710. ***************
  711. *** 809,814 ****
  712. --- 829,837 ----
  713.       } /* endif (!symlnk) */
  714.   #endif /* S_IFLNK */
  715.   
  716. +     if (error > 1)   /* don't print redundant CRC error if error already */
  717. +         return error;
  718.       /* logical-AND crc32val for 64-bit machines */
  719.       if ((crc32val = ((~crc32val) & 0xFFFFFFFFL)) != lrec.crc32) {
  720.           /* if quietflg is set, we haven't output the filename yet:  do it */
  721. ***************
  722. *** 848,858 ****
  723.       byte h[12];
  724.   
  725.   
  726. !     /* get header once */
  727.       for (n = 0; n < 12; n++) {
  728.           ReadByte(&b);
  729.           h[n] = (byte) b;
  730.       }
  731.   
  732.       /* if have key already, test it; else allocate memory for it */
  733.       if (key) {
  734. --- 871,884 ----
  735.       byte h[12];
  736.   
  737.   
  738. !     /* get header once (turn off "encrypted" flag temporarily so we don't
  739. !      * try to decrypt the same data twice) */
  740. !     pInfo->encrypted = FALSE;
  741.       for (n = 0; n < 12; n++) {
  742.           ReadByte(&b);
  743.           h[n] = (byte) b;
  744.       }
  745. +     pInfo->encrypted = TRUE;
  746.   
  747.       /* if have key already, test it; else allocate memory for it */
  748.       if (key) {
  749. ***************
  750. *** 900,906 ****
  751.   static int testp(h)   /* return -1 if bad password; 0 if OK */
  752.       byte *h;
  753.   {
  754. !     UWORD b, c;
  755.       int n, t;
  756.       byte *p;
  757.   
  758. --- 926,932 ----
  759.   static int testp(h)   /* return -1 if bad password; 0 if OK */
  760.       byte *h;
  761.   {
  762. !     UWORD b;
  763.       int n, t;
  764.       byte *p;
  765.   
  766. ***************
  767. *** 908,916 ****
  768.       init_keys(key);
  769.   
  770.       /* check password */
  771. !     for (n = 0; n < 11; n++)
  772. !         c = DECRYPT(h[n]);
  773. !     b = DECRYPT(h[11]);
  774.   
  775.   #ifdef CRYPT_DEBUG
  776.       printf("   lrec.crc = %08lx  crec.crc = %08lx  pInfo->ExtLocHdr = %s\n",
  777. --- 934,941 ----
  778.       init_keys(key);
  779.   
  780.       /* check password */
  781. !     for (n = 0; n < 12; n++)
  782. !         b = DECRYPT(h[n]);
  783.   
  784.   #ifdef CRYPT_DEBUG
  785.       printf("   lrec.crc = %08lx  crec.crc = %08lx  pInfo->ExtLocHdr = %s\n",
  786. ***************
  787. *** 917,929 ****
  788.         lrec.crc32, pInfo->crc, pInfo->ExtLocHdr? "true":"false");
  789.       printf("   incnt = %d  unzip offset into zipfile = %ld\n", incnt,
  790.         cur_zipfile_bufstart+(inptr-inbuf));
  791. !     printf("   (c | (b<<8)) = %04x  (crc >> 16) = %04x  lrec.time = %04x\n",
  792. !       (UWORD)(c | (b<<8)), (UWORD)(lrec.crc32 >> 16), lrec.last_mod_file_time);
  793.   #endif /* CRYPT_DEBUG */
  794.   
  795. !     /* same test as in zipbare() in crypt.c: */
  796. !     if ((UWORD)(c | (b<<8)) != (pInfo->ExtLocHdr? lrec.last_mod_file_time :
  797. !         (UWORD)(lrec.crc32 >> 16)))
  798.           return -1;  /* bad */
  799.   
  800.       /* password OK:  decrypt current buffer contents before leaving */
  801. --- 942,954 ----
  802.         lrec.crc32, pInfo->crc, pInfo->ExtLocHdr? "true":"false");
  803.       printf("   incnt = %d  unzip offset into zipfile = %ld\n", incnt,
  804.         cur_zipfile_bufstart+(inptr-inbuf));
  805. !     printf("   b = %02x  (crc >> 24) = %02x  (lrec.time >> 8) = %02x\n",
  806. !       b, (UWORD)(lrec.crc32 >> 24), (lrec.last_mod_file_time >> 8));
  807.   #endif /* CRYPT_DEBUG */
  808.   
  809. !     /* same test as in zipbare() in crypt.c (now check only one byte): */
  810. !     if (b != (pInfo->ExtLocHdr? lrec.last_mod_file_time >> 8 :
  811. !         (UWORD)(lrec.crc32 >> 24)))
  812.           return -1;  /* bad */
  813.   
  814.       /* password OK:  decrypt current buffer contents before leaving */
  815. ***************
  816. *** 967,973 ****
  817.           return 0;
  818.   
  819.       if (mem_o_offset + outcnt <= mem_o_size) {
  820. !         memcpy((char *)(mem_o_buffer+mem_o_offset), (char *)outbuf, outcnt);
  821.           mem_o_offset += outcnt;
  822.           return 0;
  823.       } else
  824. --- 992,999 ----
  825.           return 0;
  826.   
  827.       if (mem_o_offset + outcnt <= mem_o_size) {
  828. !         memcpy((char *)(mem_o_buffer+(UWORD)mem_o_offset), (char *)outbuf,
  829. !           outcnt);
  830.           mem_o_offset += outcnt;
  831.           return 0;
  832.       } else
  833. ***************
  834. *** 988,993 ****
  835. --- 1014,1020 ----
  836.   {
  837.       UWORD method, error = 0;
  838.       ULONG crc, oldcrc;
  839. +     int r;
  840.   
  841.       method = makeword(src);
  842.       crc = makelong(src+2);
  843. ***************
  844. *** 1014,1020 ****
  845.               memcpy(tgt, src + 2 + 4, (extent) (srcsize - 2 - 4));
  846.               break;
  847.           case DEFLATED:
  848. !             inflate();
  849.               FlushOutput();
  850.               break;
  851.           default:
  852. --- 1041,1052 ----
  853.               memcpy(tgt, src + 2 + 4, (extent) (srcsize - 2 - 4));
  854.               break;
  855.           case DEFLATED:
  856. !             if ((r = inflate()) != 0) {
  857. !                 fprintf(stderr, "error:  %s\n", r == 3 ?
  858. !                   "not enough memory for inflate operation" :
  859. !                   "invalid compressed data for the inflate format");
  860. !                 error = (r == 3)? 5 : 2;
  861. !             }
  862.               FlushOutput();
  863.               break;
  864.           default:
  865. diff -cb unzip50/file_io.c unz50p1/file_io.c
  866. *** unzip50/file_io.c    Wed Aug 19 12:17:34 1992
  867. --- unz50p1/file_io.c    Mon Jan 11 23:36:04 1993
  868. ***************
  869. *** 9,15 ****
  870.     ---------------------------------------------------------------------------*/
  871.   
  872.   
  873. ! #ifndef __GO32__
  874.   #  define const
  875.   #endif
  876.   
  877. --- 9,15 ----
  878.     ---------------------------------------------------------------------------*/
  879.   
  880.   
  881. ! #if (!defined(__GO32__) && !defined(NeXT))
  882.   #  define const
  883.   #endif
  884.   
  885. diff -cb unzip50/funzip.c unz50p1/funzip.c
  886. *** unzip50/funzip.c    Sun Aug 16 04:40:06 1992
  887. --- unz50p1/funzip.c    Sun Jan 10 16:14:18 1993
  888. ***************
  889. *** 1,7 ****
  890. ! /* funzip.c -- Not copyrighted 1992 by Mark Adler
  891. !    version 1.3, 16 August 1992 */
  892.   
  893.   
  894.   /* You can do whatever you like with this source file, though I would
  895.      prefer that if you modify it and redistribute it that you include
  896.      comments to that effect with your name and the date.  Thank you.
  897. --- 1,8 ----
  898. ! /* funzip.c -- Not copyrighted 1992 by Mark Adler */
  899.   
  900. + #define VERSION "1.3p1 of 10 January 1993"
  901.   
  902.   /* You can do whatever you like with this source file, though I would
  903.      prefer that if you modify it and redistribute it that you include
  904.      comments to that effect with your name and the date.  Thank you.
  905. ***************
  906. *** 17,23 ****
  907.                                       entries, added more help.
  908.       1.3  16 Aug 92  M. Adler        removed redundant #define's, added
  909.                                       decryption.
  910.    */
  911.   
  912.   
  913. --- 18,32 ----
  914.                                       entries, added more help.
  915.       1.3  16 Aug 92  M. Adler        removed redundant #define's, added
  916.                                       decryption.
  917. !    1.3p1 10 Jan 93  G. Roelofs      incorporated fixes from 2.2 beta:
  918. !            [1.4]    G. Roelofs        added exit(0).
  919. !            [1.5]    K. U. Rommel      changed read/write modes for OS/2.
  920. !            [1.7]    G. Roelofs        changed to use DOS_OS2.
  921. !            [1.8]    M. Adler          improved inflation error msgs.
  922. !            [1.9]    G. Roelofs        changed ULONG/UWORD/byte to ulg/ush/uch;
  923. !                                       renamed inflate_entry() to inflate().
  924. !            [2.1]    J. Gailly         fixed crypt/store bug,
  925. !                     G. Roelofs        fixed decryption check (single byte).
  926.    */
  927.   
  928.   
  929. ***************
  930. *** 37,48 ****
  931.   #include "unzip.h"
  932.   
  933.   /* enforce binary i/o if recognized */
  934. ! #ifdef __STDC__
  935.   #  define FOPR "rb"
  936. ! #  define FOPW "w+b"
  937.   #else
  938.   #  define FOPR "r"
  939. ! #  define FOPW "w+"
  940.   #endif
  941.   
  942.   /* PKZIP header definitions */
  943. --- 46,61 ----
  944.   #include "unzip.h"
  945.   
  946.   /* enforce binary i/o if recognized */
  947. ! #if defined(__STDC__) || defined(DOS_OS2)
  948. ! #  define BINIO
  949. ! #endif
  950. ! #ifdef BINIO
  951.   #  define FOPR "rb"
  952. ! #  define FOPW "wb"
  953.   #else
  954.   #  define FOPR "r"
  955. ! #  define FOPW "w"
  956.   #endif
  957.   
  958.   /* PKZIP header definitions */
  959. ***************
  960. *** 60,65 ****
  961. --- 73,80 ----
  962.   #define LOCHDR 30               /* size of local header, including sig */
  963.   #define EXTHDR 16               /* size of extended local header, inc sig */
  964.   
  965. + #define RAND_HEAD_LEN 12        /* length of encryption header */
  966.   /* Macros for getting two byte and four byte header values */
  967.   #define SH(p) ((UWORD)(byte)((p)[0]) | ((UWORD)(byte)((p)[1]) << 8))
  968.   #define LG(p) ((ULONG)(SH(p)) | ((ULONG)(SH((p)+2)) << 16))
  969. ***************
  970. *** 66,72 ****
  971.   
  972.   /* Function prototypes */
  973.   ULONG updcrc OF((byte *, int));
  974. ! int inflate_entry OF((void));
  975.   void err OF((int, char *));
  976.   void main OF((int, char **));
  977.   
  978. --- 81,87 ----
  979.   
  980.   /* Function prototypes */
  981.   ULONG updcrc OF((byte *, int));
  982. ! int inflate OF((void));
  983.   void err OF((int, char *));
  984.   void main OF((int, char **));
  985.   
  986. ***************
  987. *** 202,208 ****
  988.     if (outcnt)
  989.     {
  990.       updcrc(outbuf, outcnt);
  991. !     if (fwrite(outbuf, 1, outcnt, out) != outcnt)
  992.         err(9, "out of space on stdout");
  993.       outsiz += outcnt;
  994.       outptr = outbuf;
  995. --- 217,223 ----
  996.     if (outcnt)
  997.     {
  998.       updcrc(outbuf, outcnt);
  999. !     if (fwrite((char *)outbuf, 1,outcnt,out) != outcnt)
  1000.         err(9, "out of space on stdout");
  1001.       outsiz += outcnt;
  1002.       outptr = outbuf;
  1003. ***************
  1004. *** 222,228 ****
  1005.     /* if stdin not redirected, give the user help */
  1006.     if (isatty(0))
  1007.     {
  1008. !     fprintf(stderr,
  1009.   #ifdef CRYPT
  1010.         "usage: funzip [password] < infile.zip > outfile\n");
  1011.   #else /* !CRYPT */
  1012. --- 237,243 ----
  1013.     /* if stdin not redirected, give the user help */
  1014.     if (isatty(0))
  1015.     {
  1016. !     fprintf(stderr, "FUnZip (Filter UnZip), version %s\n%s", VERSION,
  1017.   #ifdef CRYPT
  1018.         "usage: funzip [password] < infile.zip > outfile\n");
  1019.   #else /* !CRYPT */
  1020. ***************
  1021. *** 236,243 ****
  1022. --- 251,264 ----
  1023.     /* prepare to be a binary filter */
  1024.     if ((outbuf = (byte *)malloc(OUTBUFSIZ)) == NULL)
  1025.       err(1, "out of memory");
  1026. + #ifdef DOS_OS2
  1027. +   setmode(0, O_BINARY); /* some buggy C libraries require BOTH :-( the  */
  1028. + #endif                  /*  setmode() call AND the fdopen() in binary mode */
  1029.     if ((in = fdopen(0, FOPR)) == NULL)
  1030.       err(2, "cannot find stdin");
  1031. + #ifdef DOS_OS2
  1032. +   setmode(1, O_BINARY);
  1033. + #endif
  1034.     if ((out = fdopen(1, FOPW)) == NULL)
  1035.       err(2, "cannot write to stdout");
  1036.   
  1037. ***************
  1038. *** 257,268 ****
  1039.       if (argc < 2)
  1040.         err(3, "need password on command line for encrypted entry");
  1041.       init_keys(argv[1]);
  1042. !     for (i = 0; i < 10; i++)
  1043.         ReadByte(&e);
  1044. !     ReadByte(&e);
  1045. !     ReadByte(&i);
  1046. !     e += i << 8;
  1047. !     if (e != (h[LOCFLG] & EXTFLG ? SH(h + LOCTIM) : SH(h + LOCCRC + 2)))
  1048.         err(3, "incorrect password for first entry");
  1049.     }
  1050.   #else /* !CRYPT */
  1051. --- 278,286 ----
  1052.       if (argc < 2)
  1053.         err(3, "need password on command line for encrypted entry");
  1054.       init_keys(argv[1]);
  1055. !     for (i = 0; i < RAND_HEAD_LEN; i++)
  1056.         ReadByte(&e);
  1057. !     if (e != (ush)(h[LOCFLG] & EXTFLG ? h[LOCTIM + 1] : h[LOCCRC + 3]))
  1058.         err(3, "incorrect password for first entry");
  1059.     }
  1060.   #else /* !CRYPT */
  1061. ***************
  1062. *** 278,285 ****
  1063.     /* decompress */
  1064.     if (h[LOCHOW])
  1065.     {                             /* deflated entry */
  1066. !     if (inflate_entry())
  1067. !       err(4, "invalid compressed data or out of memory");
  1068.     }
  1069.     else
  1070.     {                             /* stored entry */
  1071. --- 296,308 ----
  1072.     /* decompress */
  1073.     if (h[LOCHOW])
  1074.     {                             /* deflated entry */
  1075. !     int r;
  1076. !  
  1077. !     if ((r = inflate()) != 0)
  1078. !       if (r == 3)
  1079. !         err(1, "out of memory");
  1080. !       else
  1081. !         err(4, "invalid compressed data--format violated");
  1082.     }
  1083.     else
  1084.     {                             /* stored entry */
  1085. ***************
  1086. *** 286,296 ****
  1087.       register ULONG n;
  1088.   
  1089.       n = LG(h + LOCLEN);
  1090. !     if (n != LG(h + LOCSIZ))
  1091.         err(4, "invalid compressed data--length mismatch");
  1092. -     while (n--)
  1093. -       OUTB(getc(in));
  1094.     }
  1095.     FlushOutput();
  1096.     fflush(out);
  1097.   
  1098. --- 309,327 ----
  1099.       register ULONG n;
  1100.   
  1101.       n = LG(h + LOCLEN);
  1102. !     if (n != LG(h + LOCSIZ) - (decrypt ? RAND_HEAD_LEN : 0)) {
  1103. !       fprintf(stderr, "len %ld, siz %ld\n", n, LG(h + LOCSIZ));
  1104.         err(4, "invalid compressed data--length mismatch");
  1105.       }
  1106. +     while (n--) {
  1107. +       ush c = getc(in);
  1108. + #ifdef CRYPT
  1109. +       if (decrypt)
  1110. +         update_keys(c ^= decrypt_byte());
  1111. + #endif
  1112. +       OUTB(c);
  1113. +     }
  1114. +   }
  1115.     FlushOutput();
  1116.     fflush(out);
  1117.   
  1118. ***************
  1119. *** 309,312 ****
  1120. --- 340,345 ----
  1121.     if (fread((char *)h, 1, 4, in) == 4 && LG(h) == LOCSIG)
  1122.       fprintf(stderr,
  1123.         "funzip warning: zip file has more than one entry--rest ignored\n");
  1124. +   exit(0);
  1125.   }
  1126. diff -cb unzip50/inflate.c unz50p1/inflate.c
  1127. *** unzip50/inflate.c    Thu Aug 13 19:46:16 1992
  1128. --- unz50p1/inflate.c    Sun Jan 10 17:50:38 1993
  1129. ***************
  1130. *** 1,5 ****
  1131.   /* inflate.c -- Not copyrighted 1992 by Mark Adler
  1132. !    version c7, 27 June 1992 */
  1133.   
  1134.   
  1135.   /* You can do whatever you like with this source file, though I would
  1136. --- 1,5 ----
  1137.   /* inflate.c -- Not copyrighted 1992 by Mark Adler
  1138. !    version c10p1, 10 January 1993 */
  1139.   
  1140.   
  1141.   /* You can do whatever you like with this source file, though I would
  1142. ***************
  1143. *** 39,45 ****
  1144.                                       the 32K window size for specialized
  1145.                                       applications.
  1146.       c6   31 May 92  M. Adler        added some typecasts to eliminate warnings
  1147. !     c7   27 Jun 92  G. Roelofs      added some more typecasts (439:  MSC bug)
  1148.    */
  1149.   
  1150.   
  1151. --- 39,54 ----
  1152.                                       the 32K window size for specialized
  1153.                                       applications.
  1154.       c6   31 May 92  M. Adler        added some typecasts to eliminate warnings
  1155. !     c7   27 Jun 92  G. Roelofs      added some more typecasts (444:  MSC bug).
  1156. !     c8    5 Oct 92  J-l. Gailly     added ifdef'd code to deal with PKZIP bug.
  1157. !     c9    9 Oct 92  M. Adler        removed a memory error message (~line 416).
  1158. !     c10  17 Oct 92  G. Roelofs      changed ULONG/UWORD/byte to ulg/ush/uch,
  1159. !                                     removed old inflate, renamed inflate_entry
  1160. !                                     to inflate, added Mark's fix to a comment.
  1161. !    c10p1 10 Jan 93  G. Roelofs      version c10 plus Mark's c13 patch:
  1162. !            [c13]    M. Adler          allow empty code sets in huft_build (the
  1163. !                           new pkz204c.exe file has a null distance
  1164. !                       tree for the file pkzip.exe)
  1165.    */
  1166.   
  1167.   
  1168. ***************
  1169. *** 61,69 ****
  1170.      sliding window of previously emitted data.
  1171.   
  1172.      There are (currently) three kinds of inflate blocks: stored, fixed, and
  1173. !    dynamic.  The compressor deals with some chunk of data at a time, and
  1174. !    decides which method to use on a chunk-by-chunk basis.  A chunk might
  1175. !    typically be 32K or 64K.  If the chunk is uncompressible, then the
  1176.      "stored" method is used.  In this case, the bytes are simply stored as
  1177.      is, eight bits per byte, with none of the above coding.  The bytes are
  1178.      preceded by a count, since there is no longer an EOB code.
  1179. --- 70,78 ----
  1180.      sliding window of previously emitted data.
  1181.   
  1182.      There are (currently) three kinds of inflate blocks: stored, fixed, and
  1183. !    dynamic.  The compressor outputs a chunk of data at a time, and decides
  1184. !    which method to use on a chunk-by-chunk basis.  A chunk might typically
  1185. !    be 32K to 64K, uncompressed.  If the chunk is uncompressible, then the
  1186.      "stored" method is used.  In this case, the bytes are simply stored as
  1187.      is, eight bits per byte, with none of the above coding.  The bytes are
  1188.      preceded by a count, since there is no longer an EOB code.
  1189. ***************
  1190. *** 75,84 ****
  1191.      coded, and so is preceded by a description of that code.  These code
  1192.      descriptions take up a little space, and so for small blocks, there is
  1193.      a predefined set of codes, called the fixed codes.  The fixed method is
  1194. !    used if the block codes up smaller that way (usually for quite small
  1195.      chunks), otherwise the dynamic method is used.  In the latter case, the
  1196.      codes are customized to the probabilities in the current block, and so
  1197. !    can code it much better than the pre-determined fixed codes.
  1198.    
  1199.      The Huffman codes themselves are decoded using a mutli-level table
  1200.      lookup, in order to maximize the speed of decoding plus the speed of
  1201. --- 84,93 ----
  1202.      coded, and so is preceded by a description of that code.  These code
  1203.      descriptions take up a little space, and so for small blocks, there is
  1204.      a predefined set of codes, called the fixed codes.  The fixed method is
  1205. !    used if the block ends up smaller that way (usually for quite small
  1206.      chunks), otherwise the dynamic method is used.  In the latter case, the
  1207.      codes are customized to the probabilities in the current block, and so
  1208. !    can code it much better than the pre-determined fixed codes can.
  1209.    
  1210.      The Huffman codes themselves are decoded using a mutli-level table
  1211.      lookup, in order to maximize the speed of decoding plus the speed of
  1212. ***************
  1213. *** 101,107 ****
  1214.      5. There is no way of sending zero distance codes--a dummy must be
  1215.         sent if there are none.  (History: a pre 2.0 version of PKZIP would
  1216.         store blocks with no distance codes, but this was discovered to be
  1217. !       too harsh a criterion.)
  1218.      6. There are up to 286 literal/length codes.  Code 256 represents the
  1219.         end-of-block.  Note however that the static length tree defines
  1220.         288 codes just to fill out the Huffman codes.  Codes 286 and 287
  1221. --- 110,118 ----
  1222.      5. There is no way of sending zero distance codes--a dummy must be
  1223.         sent if there are none.  (History: a pre 2.0 version of PKZIP would
  1224.         store blocks with no distance codes, but this was discovered to be
  1225. !       too harsh a criterion.)  Valid only for 1.93a.  2.04c does allow
  1226. !       zero distance codes, which is sent as one code of zero bits in
  1227. !       length.
  1228.      6. There are up to 286 literal/length codes.  Code 256 represents the
  1229.         end-of-block.  Note however that the static length tree defines
  1230.         288 codes just to fill out the Huffman codes.  Codes 286 and 287
  1231. ***************
  1232. *** 130,136 ****
  1233.         the two sets of lengths.
  1234.    */
  1235.   
  1236. ! #include "unzip.h"      /* this must supply the slide[] (byte) array */
  1237.   
  1238.   #ifndef WSIZE
  1239.   #  define WSIZE 0x8000  /* window size--must be a power of two, and at least
  1240. --- 141,147 ----
  1241.         the two sets of lengths.
  1242.    */
  1243.   
  1244. ! #include "unzip.h"      /* this must supply the slide[] (uch) array */
  1245.   
  1246.   #ifndef WSIZE
  1247.   #  define WSIZE 0x8000  /* window size--must be a power of two, and at least
  1248. ***************
  1249. *** 137,143 ****
  1250. --- 148,160 ----
  1251.                              32K for zip's deflate method */
  1252.   #endif /* !WSIZE */
  1253.   
  1254. + #ifdef DEBUG
  1255. + #  define Trace(x) fprintf x
  1256. + #else
  1257. + #  define Trace(x)
  1258. + #endif
  1259.   
  1260.   /* Huffman code lookup table entry--this entry is four bytes for machines
  1261.      that have 16-bit pointers (e.g. PC's in the small or medium model).
  1262.      Valid extra bits are 0..13.  e == 15 is EOB (end of block), e == 16
  1263. ***************
  1264. *** 146,155 ****
  1265.      an unused code.  If a code with e == 99 is looked up, this implies an
  1266.      error in the data. */
  1267.   struct huft {
  1268. !   byte e;               /* number of extra bits or operation */
  1269. !   byte b;               /* number of bits in this code or subcode */
  1270.     union {
  1271. !     UWORD n;            /* literal, length base, or distance base */
  1272.       struct huft *t;     /* pointer to next level of table */
  1273.     } v;
  1274.   };
  1275. --- 163,172 ----
  1276.      an unused code.  If a code with e == 99 is looked up, this implies an
  1277.      error in the data. */
  1278.   struct huft {
  1279. !   uch e;                /* number of extra bits or operation */
  1280. !   uch b;                /* number of bits in this code or subcode */
  1281.     union {
  1282. !     ush n;              /* literal, length base, or distance base */
  1283.       struct huft *t;     /* pointer to next level of table */
  1284.     } v;
  1285.   };
  1286. ***************
  1287. *** 156,162 ****
  1288.   
  1289.   
  1290.   /* Function prototypes */
  1291. ! int huft_build OF((unsigned *, unsigned, unsigned, UWORD *, UWORD *,
  1292.                      struct huft **, int *));
  1293.   int huft_free OF((struct huft *));
  1294.   void flush OF((unsigned));
  1295. --- 173,179 ----
  1296.   
  1297.   
  1298.   /* Function prototypes */
  1299. ! int huft_build OF((unsigned *, unsigned, unsigned, ush *, ush *,
  1300.                      struct huft **, int *));
  1301.   int huft_free OF((struct huft *));
  1302.   void flush OF((unsigned));
  1303. ***************
  1304. *** 165,172 ****
  1305.   int inflate_fixed OF((void));
  1306.   int inflate_dynamic OF((void));
  1307.   int inflate_block OF((int *));
  1308. ! int inflate_entry OF((void));
  1309. ! void inflate OF((void));
  1310.   
  1311.   
  1312.   /* The inflate algorithm uses a sliding 32K byte window on the uncompressed
  1313. --- 182,188 ----
  1314.   int inflate_fixed OF((void));
  1315.   int inflate_dynamic OF((void));
  1316.   int inflate_block OF((int *));
  1317. ! int inflate OF((void));
  1318.   
  1319.   
  1320.   /* The inflate algorithm uses a sliding 32K byte window on the uncompressed
  1321. ***************
  1322. *** 174,181 ****
  1323.      circular buffer.  The index is updated simply by incrementing and then
  1324.      and'ing with 0x7fff (32K-1). */
  1325.   /* It is left to other modules to supply the 32K area.  It is assumed
  1326. !    to be usable as if it were declared "byte slide[32768];" or as just
  1327. !    "byte *slide;" and then malloc'ed in the latter case.  The definition
  1328.      must be in unzip.h, included above. */
  1329.   unsigned wp;            /* current position in slide */
  1330.   
  1331. --- 190,197 ----
  1332.      circular buffer.  The index is updated simply by incrementing and then
  1333.      and'ing with 0x7fff (32K-1). */
  1334.   /* It is left to other modules to supply the 32K area.  It is assumed
  1335. !    to be usable as if it were declared "uch slide[32768];" or as just
  1336. !    "uch *slide;" and then malloc'ed in the latter case.  The definition
  1337.      must be in unzip.h, included above. */
  1338.   unsigned wp;            /* current position in slide */
  1339.   
  1340. ***************
  1341. *** 183,200 ****
  1342.   /* Tables for deflate from PKZIP's appnote.txt. */
  1343.   static unsigned border[] = {    /* Order of the bit length code lengths */
  1344.           16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15};
  1345. ! static UWORD cplens[] = {       /* Copy lengths for literal codes 257..285 */
  1346.           3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31,
  1347.           35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0};
  1348.           /* note: see note #13 above about the 258 in this list. */
  1349. ! static UWORD cplext[] = {       /* Extra bits for literal codes 257..285 */
  1350.           0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2,
  1351.           3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, 99, 99}; /* 99==invalid */
  1352. ! static UWORD cpdist[] = {       /* Copy offsets for distance codes 0..29 */
  1353.           1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193,
  1354.           257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145,
  1355.           8193, 12289, 16385, 24577};
  1356. ! static UWORD cpdext[] = {       /* Extra bits for distance codes */
  1357.           0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6,
  1358.           7, 7, 8, 8, 9, 9, 10, 10, 11, 11,
  1359.           12, 12, 13, 13};
  1360. --- 199,216 ----
  1361.   /* Tables for deflate from PKZIP's appnote.txt. */
  1362.   static unsigned border[] = {    /* Order of the bit length code lengths */
  1363.           16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15};
  1364. ! static ush cplens[] = {         /* Copy lengths for literal codes 257..285 */
  1365.           3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31,
  1366.           35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0};
  1367.           /* note: see note #13 above about the 258 in this list. */
  1368. ! static ush cplext[] = {         /* Extra bits for literal codes 257..285 */
  1369.           0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2,
  1370.           3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, 99, 99}; /* 99==invalid */
  1371. ! static ush cpdist[] = {         /* Copy offsets for distance codes 0..29 */
  1372.           1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193,
  1373.           257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145,
  1374.           8193, 12289, 16385, 24577};
  1375. ! static ush cpdext[] = {         /* Extra bits for distance codes */
  1376.           0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6,
  1377.           7, 7, 8, 8, 9, 9, 10, 10, 11, 11,
  1378.           12, 12, 13, 13};
  1379. ***************
  1380. *** 222,240 ****
  1381.   
  1382.      However, this assumption is not true for fixed blocks--the EOB code
  1383.      is 7 bits, but the other literal/length codes can be 8 or 9 bits.
  1384. !    (Why PK made the EOB code, which can only occur once in a block,
  1385. !    the *shortest* code in the set, I'll never know.)  However, by
  1386. !    making the first table have a lookup of seven bits, the EOB code
  1387. !    will be found in that first lookup, and so will not require that too
  1388. !    many bits be pulled from the stream.
  1389.    */
  1390.   
  1391. ! ULONG bb;                       /* bit buffer */
  1392.   unsigned bk;                    /* bits in bit buffer */
  1393.   
  1394. ! UWORD bytebuf;
  1395.   #define NEXTBYTE    (ReadByte(&bytebuf), bytebuf)
  1396. ! #define NEEDBITS(n) {while(k<(n)){b|=((ULONG)NEXTBYTE)<<k;k+=8;}}
  1397.   #define DUMPBITS(n) {b>>=(n);k-=(n);}
  1398.   
  1399.   
  1400. --- 238,258 ----
  1401.   
  1402.      However, this assumption is not true for fixed blocks--the EOB code
  1403.      is 7 bits, but the other literal/length codes can be 8 or 9 bits.
  1404. !    (The EOB code is shorter than other codes becuase fixed blocks are
  1405. !    generally short.  So, while a block always has an EOB, many other
  1406. !    literal/length codes have a significantly lower probability of
  1407. !    showing up at all.)  However, by making the first table have a
  1408. !    lookup of seven bits, the EOB code will be found in that first
  1409. !    lookup, and so will not require that too many bits be pulled from
  1410. !    the stream.
  1411.    */
  1412.   
  1413. ! ulg bb;                         /* bit buffer */
  1414.   unsigned bk;                    /* bits in bit buffer */
  1415.   
  1416. ! ush bytebuf;
  1417.   #define NEXTBYTE    (ReadByte(&bytebuf), bytebuf)
  1418. ! #define NEEDBITS(n) {while(k<(n)){b|=((ulg)NEXTBYTE)<<k;k+=8;}}
  1419.   #define DUMPBITS(n) {b>>=(n);k-=(n);}
  1420.   
  1421.   
  1422. ***************
  1423. *** 275,281 ****
  1424.   int dbits = 6;          /* bits in base distance lookup table */
  1425.   
  1426.   
  1427. ! /* If BMAX needs to be larger than 16, then h and x[] should be ULONG. */
  1428.   #define BMAX 16         /* maximum bit length of any code (16 for explode) */
  1429.   #define N_MAX 288       /* maximum number of codes in any set */
  1430.   
  1431. --- 293,299 ----
  1432.   int dbits = 6;          /* bits in base distance lookup table */
  1433.   
  1434.   
  1435. ! /* If BMAX needs to be larger than 16, then h and x[] should be ulg. */
  1436.   #define BMAX 16         /* maximum bit length of any code (16 for explode) */
  1437.   #define N_MAX 288       /* maximum number of codes in any set */
  1438.   
  1439. ***************
  1440. *** 287,294 ****
  1441.   unsigned *b;            /* code lengths in bits (all assumed <= BMAX) */
  1442.   unsigned n;             /* number of codes (assumed <= N_MAX) */
  1443.   unsigned s;             /* number of simple-valued codes (0..s-1) */
  1444. ! UWORD *d;               /* list of base values for non-simple codes */
  1445. ! UWORD *e;               /* list of extra bits for non-simple codes */
  1446.   struct huft **t;        /* result: starting table */
  1447.   int *m;                 /* maximum lookup bits, returns actual */
  1448.   /* Given a list of code lengths and a maximum table size, make a set of
  1449. --- 305,312 ----
  1450.   unsigned *b;            /* code lengths in bits (all assumed <= BMAX) */
  1451.   unsigned n;             /* number of codes (assumed <= N_MAX) */
  1452.   unsigned s;             /* number of simple-valued codes (0..s-1) */
  1453. ! ush *d;                 /* list of base values for non-simple codes */
  1454. ! ush *e;                 /* list of extra bits for non-simple codes */
  1455.   struct huft **t;        /* result: starting table */
  1456.   int *m;                 /* maximum lookup bits, returns actual */
  1457.   /* Given a list of code lengths and a maximum table size, make a set of
  1458. ***************
  1459. *** 324,331 ****
  1460.     do {
  1461.       c[*p++]++;                  /* assume all entries <= BMAX */
  1462.     } while (--i);
  1463. !   if (c[0] == n)
  1464. !     return 2;                   /* bad input--all zero length codes */
  1465.   
  1466.   
  1467.     /* Find minimum and maximum length, bound *m by those */
  1468. --- 342,353 ----
  1469.     do {
  1470.       c[*p++]++;                  /* assume all entries <= BMAX */
  1471.     } while (--i);
  1472. !   if (c[0] == n)                /* null input--all zero length codes */
  1473. !   {
  1474. !     *t = (struct huft *)NULL;
  1475. !     *m = 0;
  1476. !     return 0;
  1477. !   }
  1478.   
  1479.   
  1480.     /* Find minimum and maximum length, bound *m by those */
  1481. ***************
  1482. *** 413,419 ****
  1483.           {
  1484.             if (h)
  1485.               huft_free(u[0]);
  1486. -           fprintf(stderr, "\n*** inflate out of memory *** ");
  1487.             return 3;             /* not enough memory */
  1488.           }
  1489.           hufts += z + 1;         /* track memory usage */
  1490. --- 435,440 ----
  1491. ***************
  1492. *** 425,432 ****
  1493.           if (h)
  1494.           {
  1495.             x[h] = i;             /* save pattern for backing up */
  1496. !           r.b = (byte)l;        /* bits to dump before this table */
  1497. !           r.e = (byte)(16 + j); /* bits in this table */
  1498.             r.v.t = q;            /* pointer to this table */
  1499.             j = i >> (w - l);     /* (get around Turbo C bug) */
  1500.             u[h-1][j] = r;        /* connect to last table */
  1501. --- 446,453 ----
  1502.           if (h)
  1503.           {
  1504.             x[h] = i;             /* save pattern for backing up */
  1505. !           r.b = (uch)l;         /* bits to dump before this table */
  1506. !           r.e = (uch)(16 + j);  /* bits in this table */
  1507.             r.v.t = q;            /* pointer to this table */
  1508.             j = i >> (w - l);     /* (get around Turbo C bug) */
  1509.             u[h-1][j] = r;        /* connect to last table */
  1510. ***************
  1511. *** 434,450 ****
  1512.         }
  1513.   
  1514.         /* set up table entry in r */
  1515. !       r.b = (byte)(k - w);
  1516.         if (p >= v + n)
  1517.           r.e = 99;               /* out of values--invalid code */
  1518.         else if (*p < s)
  1519.         {
  1520. !         r.e = (byte)(*p < 256 ? 16 : 15);    /* 256 is end-of-block code */
  1521.           r.v.n = *p++;           /* simple code is just the value */
  1522.         }
  1523.         else
  1524.         {
  1525. !         r.e = (byte)e[*p - s];  /* non-simple--look up in lists */
  1526.           r.v.n = d[*p++ - s];
  1527.         }
  1528.   
  1529. --- 455,471 ----
  1530.         }
  1531.   
  1532.         /* set up table entry in r */
  1533. !       r.b = (uch)(k - w);
  1534.         if (p >= v + n)
  1535.           r.e = 99;               /* out of values--invalid code */
  1536.         else if (*p < s)
  1537.         {
  1538. !         r.e = (uch)(*p < 256 ? 16 : 15);    /* 256 is end-of-block code */
  1539.           r.v.n = *p++;           /* simple code is just the value */
  1540.         }
  1541.         else
  1542.         {
  1543. !         r.e = (uch)e[*p - s];   /* non-simple--look up in lists */
  1544.           r.v.n = d[*p++ - s];
  1545.         }
  1546.   
  1547. ***************
  1548. *** 469,475 ****
  1549.   
  1550.   
  1551.     /* Return true (1) if we were given an incomplete table */
  1552. !   return y != 0 && n != 1;
  1553.   }
  1554.   
  1555.   
  1556. --- 490,496 ----
  1557.   
  1558.   
  1559.     /* Return true (1) if we were given an incomplete table */
  1560. !   return y != 0 && g != 1;
  1561.   }
  1562.   
  1563.   
  1564. ***************
  1565. *** 501,507 ****
  1566.   /* Do the equivalent of OUTB for the bytes slide[0..w-1]. */
  1567.   {
  1568.     unsigned n;
  1569. !   byte *p;
  1570.   
  1571.     p = slide;
  1572.     while (w)
  1573. --- 522,528 ----
  1574.   /* Do the equivalent of OUTB for the bytes slide[0..w-1]. */
  1575.   {
  1576.     unsigned n;
  1577. !   uch *p;
  1578.   
  1579.     p = slide;
  1580.     while (w)
  1581. ***************
  1582. *** 529,535 ****
  1583.     unsigned w;           /* current window position */
  1584.     struct huft *t;       /* pointer to table entry */
  1585.     unsigned ml, md;      /* masks for bl and bd bits */
  1586. !   register ULONG b;     /* bit buffer */
  1587.     register unsigned k;  /* number of bits in bit buffer */
  1588.   
  1589.   
  1590. --- 550,556 ----
  1591.     unsigned w;           /* current window position */
  1592.     struct huft *t;       /* pointer to table entry */
  1593.     unsigned ml, md;      /* masks for bl and bd bits */
  1594. !   register ulg b;       /* bit buffer */
  1595.     register unsigned k;  /* number of bits in bit buffer */
  1596.   
  1597.   
  1598. ***************
  1599. *** 556,562 ****
  1600.       DUMPBITS(t->b)
  1601.       if (e == 16)                /* then it's a literal */
  1602.       {
  1603. !       slide[w++] = (byte)t->v.n;
  1604.         if (w == WSIZE)
  1605.         {
  1606.           flush(w);
  1607. --- 577,583 ----
  1608.       DUMPBITS(t->b)
  1609.       if (e == 16)                /* then it's a literal */
  1610.       {
  1611. !       slide[w++] = (uch)t->v.n;
  1612.         if (w == WSIZE)
  1613.         {
  1614.           flush(w);
  1615. ***************
  1616. *** 631,637 ****
  1617.   {
  1618.     unsigned n;           /* number of bytes in block */
  1619.     unsigned w;           /* current window position */
  1620. !   register ULONG b;     /* bit buffer */
  1621.     register unsigned k;  /* number of bits in bit buffer */
  1622.   
  1623.   
  1624. --- 652,658 ----
  1625.   {
  1626.     unsigned n;           /* number of bytes in block */
  1627.     unsigned w;           /* current window position */
  1628. !   register ulg b;       /* bit buffer */
  1629.     register unsigned k;  /* number of bits in bit buffer */
  1630.   
  1631.   
  1632. ***************
  1633. *** 660,666 ****
  1634.     while (n--)
  1635.     {
  1636.       NEEDBITS(8)
  1637. !     slide[w++] = (byte)b;
  1638.       if (w == WSIZE)
  1639.       {
  1640.         flush(w);
  1641. --- 681,687 ----
  1642.     while (n--)
  1643.     {
  1644.       NEEDBITS(8)
  1645. !     slide[w++] = (uch)b;
  1646.       if (w == WSIZE)
  1647.       {
  1648.         flush(w);
  1649. ***************
  1650. *** 745,752 ****
  1651.     unsigned nb;          /* number of bit length codes */
  1652.     unsigned nl;          /* number of literal/length codes */
  1653.     unsigned nd;          /* number of distance codes */
  1654.     unsigned ll[286+30];  /* literal/length and distance code lengths */
  1655. !   register ULONG b;     /* bit buffer */
  1656.     register unsigned k;  /* number of bits in bit buffer */
  1657.   
  1658.   
  1659. --- 766,777 ----
  1660.     unsigned nb;          /* number of bit length codes */
  1661.     unsigned nl;          /* number of literal/length codes */
  1662.     unsigned nd;          /* number of distance codes */
  1663. + #ifdef PKZIP_BUG_WORKAROUND
  1664. +   unsigned ll[288+32];  /* literal/length and distance code lengths */
  1665. + #else
  1666.     unsigned ll[286+30];  /* literal/length and distance code lengths */
  1667. ! #endif
  1668. !   register ulg b;       /* bit buffer */
  1669.     register unsigned k;  /* number of bits in bit buffer */
  1670.   
  1671.   
  1672. ***************
  1673. *** 765,771 ****
  1674. --- 790,800 ----
  1675.     NEEDBITS(4)
  1676.     nb = 4 + ((unsigned)b & 0xf);         /* number of bit length codes */
  1677.     DUMPBITS(4)
  1678. + #ifdef PKZIP_BUG_WORKAROUND
  1679. +   if (nl > 288 || nd > 32)
  1680. + #else
  1681.     if (nl > 286 || nd > 30)
  1682. + #endif
  1683.       return 1;                   /* bad lengths */
  1684.   
  1685.   
  1686. ***************
  1687. *** 850,866 ****
  1688.     bl = lbits;
  1689.     if ((i = huft_build(ll, nl, 257, cplens, cplext, &tl, &bl)) != 0)
  1690.     {
  1691. !     if (i == 1)
  1692.         huft_free(tl);
  1693.       return i;                   /* incomplete code set */
  1694.     }
  1695.     bd = dbits;
  1696.     if ((i = huft_build(ll + nl, nd, 0, cpdist, cpdext, &td, &bd)) != 0)
  1697.     {
  1698. !     if (i == 1)
  1699.         huft_free(td);
  1700.       huft_free(tl);
  1701.       return i;                   /* incomplete code set */
  1702.     }
  1703.   
  1704.   
  1705. --- 879,904 ----
  1706.     bl = lbits;
  1707.     if ((i = huft_build(ll, nl, 257, cplens, cplext, &tl, &bl)) != 0)
  1708.     {
  1709. !     if (i == 1) {
  1710. !       fprintf(stderr, " incomplete literal tree\n");
  1711.         huft_free(tl);
  1712. +     }
  1713.       return i;                   /* incomplete code set */
  1714.     }
  1715.     bd = dbits;
  1716.     if ((i = huft_build(ll + nl, nd, 0, cpdist, cpdext, &td, &bd)) != 0)
  1717.     {
  1718. !     if (i == 1) {
  1719. !       fprintf(stderr, " incomplete distance tree\n");
  1720. ! #ifdef PKZIP_BUG_WORKAROUND
  1721. !       i = 0;
  1722. !     }
  1723. ! #else
  1724.         huft_free(td);
  1725. +     }
  1726.       huft_free(tl);
  1727.       return i;                   /* incomplete code set */
  1728. + #endif
  1729.     }
  1730.   
  1731.   
  1732. ***************
  1733. *** 882,888 ****
  1734.   /* decompress an inflated block */
  1735.   {
  1736.     unsigned t;           /* block type */
  1737. !   register ULONG b;     /* bit buffer */
  1738.     register unsigned k;  /* number of bits in bit buffer */
  1739.   
  1740.   
  1741. --- 920,926 ----
  1742.   /* decompress an inflated block */
  1743.   {
  1744.     unsigned t;           /* block type */
  1745. !   register ulg b;       /* bit buffer */
  1746.     register unsigned k;  /* number of bits in bit buffer */
  1747.   
  1748.   
  1749. ***************
  1750. *** 923,929 ****
  1751.   
  1752.   
  1753.   
  1754. ! int inflate_entry()
  1755.   /* decompress an inflated entry */
  1756.   {
  1757.     int e;                /* last block flag */
  1758. --- 961,967 ----
  1759.   
  1760.   
  1761.   
  1762. ! int inflate()
  1763.   /* decompress an inflated entry */
  1764.   {
  1765.     int e;                /* last block flag */
  1766. ***************
  1767. *** 942,948 ****
  1768. --- 980,989 ----
  1769.     do {
  1770.       hufts = 0;
  1771.       if ((r = inflate_block(&e)) != 0)
  1772. +     {
  1773. +       Trace((stderr, "\ninflate_block returned %d", r));
  1774.         return r;
  1775. +     }
  1776.       if (hufts > h)
  1777.         h = hufts;
  1778.     } while (!e);
  1779. ***************
  1780. *** 957,967 ****
  1781.     fprintf(stderr, "<%u> ", h);
  1782.   #endif /* DEBUG */
  1783.     return 0;
  1784. - }
  1785. - void inflate()
  1786. - /* ignore the return code for now ... */
  1787. - {
  1788. -   inflate_entry();
  1789.   }
  1790. --- 998,1001 ----
  1791. diff -cb unzip50/misc.c unz50p1/misc.c
  1792. *** unzip50/misc.c    Wed Aug 19 12:17:36 1992
  1793. --- unz50p1/misc.c    Tue Jan 12 19:38:02 1993
  1794. ***************
  1795. *** 205,219 ****
  1796.               outbuf[block_length] = '\0';        /* terminate w/zero:  ASCIIZ */
  1797.   
  1798.               A_TO_N(outbuf);     /* translate string to native */
  1799. -             printf("%s", outbuf);
  1800. -         }
  1801.   #ifdef MSWIN
  1802.           /* ran out of local mem -- had to cheat */
  1803.           WriteStringToMsgWin(outbuf, bRealTimeMsgUpdate);
  1804.   #else /* !MSWIN */
  1805. !         printf("\n");   /* assume no newline at end */
  1806.   #endif /* ?MSWIN */
  1807.           break;
  1808.   
  1809.       /*
  1810. --- 205,218 ----
  1811.               outbuf[block_length] = '\0';        /* terminate w/zero:  ASCIIZ */
  1812.   
  1813.               A_TO_N(outbuf);     /* translate string to native */
  1814.   #ifdef MSWIN
  1815.               /* ran out of local mem -- had to cheat */
  1816.               WriteStringToMsgWin(outbuf, bRealTimeMsgUpdate);
  1817.   #else /* !MSWIN */
  1818. !             printf("%s", outbuf);
  1819.   #endif /* ?MSWIN */
  1820. +         }
  1821. +         printf("\n");   /* assume no newline at end */
  1822.           break;
  1823.   
  1824.       /*
  1825. ***************
  1826. *** 354,360 ****
  1827.   #endif /* !MACOS && !__GO32__ */
  1828.   
  1829.   #ifdef __386BSD__
  1830. !     m_time += localtime((time_t *) &m_time))->tm_gmtoff;
  1831.   #else
  1832.       if (localtime((time_t *)&m_time)->tm_isdst)
  1833.           m_time -= 60L * 60L;    /* adjust for daylight savings time */
  1834. --- 353,359 ----
  1835.   #endif /* !MACOS && !__GO32__ */
  1836.   
  1837.   #ifdef __386BSD__
  1838. !     m_time += localtime((time_t *) &m_time)->tm_gmtoff;
  1839.   #else
  1840.       if (localtime((time_t *)&m_time)->tm_isdst)
  1841.           m_time -= 60L * 60L;    /* adjust for daylight savings time */
  1842. diff -cb unzip50/unzip.c unz50p1/unzip.c
  1843. *** unzip50/unzip.c    Fri Aug 21 08:32:30 1992
  1844. --- unz50p1/unzip.c    Tue Jan 12 19:45:45 1993
  1845. ***************
  1846. *** 50,56 ****
  1847.   
  1848.     ---------------------------------------------------------------------------
  1849.   
  1850. !   Version:  unzip50.{tar.Z | zip | zoo} for Unix, VMS, OS/2, MS-DOS, Windows,
  1851.                 Windows NT, Macintosh and Amiga.  Decryption requires sources
  1852.                 in zcrypt19.zip, and Windows (not NT) support requires sources
  1853.                 in wunz12sr.zip.  See accompanying file "Where" in the main
  1854. --- 50,56 ----
  1855.   
  1856.     ---------------------------------------------------------------------------
  1857.   
  1858. !   Version:  unz50p1.{tar.Z | zip | zoo} for Unix, VMS, OS/2, MS-DOS, Windows,
  1859.                 Windows NT, Macintosh and Amiga.  Decryption requires sources
  1860.                 in zcrypt19.zip, and Windows (not NT) support requires sources
  1861.                 in wunz12sr.zip.  See accompanying file "Where" in the main
  1862. ***************
  1863. *** 68,74 ****
  1864.   #  include "wizunzip.h"          /* see History.500 for version history */
  1865.   #endif
  1866.   
  1867. ! #define VERSION  "v5.0 of 21 August 1992"
  1868.   /* #define VERSION  "v5.0p BETA of 8-21-92" */   /* internal beta level */
  1869.   #define PAKFIX   /* temporary(?) solution to PAK-created zipfiles */
  1870.   
  1871. --- 68,74 ----
  1872.   #  include "wizunzip.h"          /* see History.500 for version history */
  1873.   #endif
  1874.   
  1875. ! #define VERSION  "5.0p1 of 12 January 1993"
  1876.   /* #define VERSION  "v5.0p BETA of 8-21-92" */   /* internal beta level */
  1877.   #define PAKFIX   /* temporary(?) solution to PAK-created zipfiles */
  1878.   
  1879. ***************
  1880. *** 755,763 ****
  1881.           usagefp = (FILE *) stdout;
  1882.   
  1883.       fprintf(usagefp, "\
  1884. ! UnZip:  Zipfile Extract %s;  (c) 1989 S.H.Smith and others\n\
  1885. ! Versions 3.0 and later by Info-ZIP.  Bug reports ONLY to zip-bugs@cs.ucla.edu\
  1886. ! \n\n", VERSION);
  1887.   
  1888.       fprintf(usagefp, "\
  1889.   Usage: unzip [ -options[modifiers] ] file[.zip] [filespec...]\n\
  1890. --- 755,763 ----
  1891.           usagefp = (FILE *) stdout;
  1892.   
  1893.       fprintf(usagefp, "\
  1894. ! UnZip %s, by Info-ZIP.  Portions (c) 1989 by S. H. Smith.\n\
  1895. ! Bug reports ONLY to zip-bugs%%wkuvx1.bitnet@ukcc.uky.edu; see README for detail\
  1896. ! s\n\n", VERSION);
  1897.   
  1898.       fprintf(usagefp, "\
  1899.   Usage: unzip [ -options[modifiers] ] file[.zip] [filespec...]\n\
  1900. ***************
  1901. *** 774,780 ****
  1902.     -q  quiet mode (-qq => quieter)            -V  retain VMS version numbers\
  1903.   \n\n\
  1904.   Examples: (See manual for more information)\n\
  1905. !   unzip data1 Readme   => extracts file Readme from zipfile data1.zip\n\
  1906.     unzip -p foo | more  => send contents of foo.zip via pipe into program more\n\
  1907.     unzip -fo foo        => quietly replace existing files if archive files newer\
  1908.   \n", astring);
  1909. --- 774,780 ----
  1910.     -q  quiet mode (-qq => quieter)            -V  retain VMS version numbers\
  1911.   \n\n\
  1912.   Examples: (See manual for more information)\n\
  1913. !   unzip data1 ReadMe   => extracts file ReadMe from zipfile data1.zip\n\
  1914.     unzip -p foo | more  => send contents of foo.zip via pipe into program more\n\
  1915.     unzip -fo foo        => quietly replace existing files if archive files newer\
  1916.   \n", astring);
  1917. diff -cb unzip50/unzip.h unz50p1/unzip.h
  1918. *** unzip50/unzip.h    Thu Aug 13 08:55:00 1992
  1919. --- unz50p1/unzip.h    Mon Jan 11 23:31:14 1993
  1920. ***************
  1921. *** 20,28 ****
  1922.   #  undef unix
  1923.   #endif
  1924.   
  1925. ! #if (defined(unix) && !defined(UNIX))
  1926.   #  define UNIX
  1927. ! #endif /* unix && !UNIX */
  1928.   
  1929.   /* Much of the following is swiped from zip's tailor.h: */
  1930.   
  1931. --- 20,30 ----
  1932.   #  undef unix
  1933.   #endif
  1934.   
  1935. ! #if defined(unix) || defined(__convexc__) || defined(M_XENIX)
  1936. ! #  ifndef UNIX
  1937.   #    define UNIX
  1938. ! #  endif /* !UNIX */
  1939. ! #endif /* unix || __convexc__ || M_XENIX */
  1940.   
  1941.   /* Much of the following is swiped from zip's tailor.h: */
  1942.   
  1943. ***************
  1944. *** 643,648 ****
  1945. --- 645,653 ----
  1946.   typedef long              longint;
  1947.   typedef unsigned short    UWORD;
  1948.   typedef unsigned long     ULONG;
  1949. + typedef unsigned char     uch;
  1950. + typedef unsigned short    ush;
  1951. + typedef unsigned long     ulg;
  1952.   
  1953.   typedef struct min_info {
  1954.       unsigned unix_attr;
  1955. ***************
  1956. *** 798,804 ****
  1957.   
  1958.   int    explode                   __((void));                    /* explode.c */
  1959.   
  1960. ! void   inflate                   __((void));                    /* inflate.c */
  1961.   
  1962.   void   unReduce                  __((void));                   /* unreduce.c */
  1963.   /* static void  LoadFollowers    __((void));                    * unreduce.c */
  1964. --- 803,809 ----
  1965.   
  1966.   int    explode                   __((void));                    /* explode.c */
  1967.   
  1968. ! int    inflate                   __((void));                    /* inflate.c */
  1969.   
  1970.   void   unReduce                  __((void));                   /* unreduce.c */
  1971.   /* static void  LoadFollowers    __((void));                    * unreduce.c */
  1972. diff -cb unzip50/zip.h unz50p1/zip.h
  1973. *** unzip50/zip.h    Thu Apr 30 19:23:20 1992
  1974. --- unz50p1/zip.h    Sun Jan 10 12:11:42 1993
  1975. ***************
  1976. *** 4,11 ****
  1977.   #define SKIP_TIME_H   /* don't include time.h again in crypt.c */
  1978.   
  1979.   #define local
  1980. - typedef unsigned short ush;
  1981. - typedef unsigned long ulg;
  1982.   
  1983.   extern ULONG crc_32_tab[];
  1984.   #define crc32(c, b) (crc_32_tab[((int)(c) ^ (b)) & 0xff] ^ ((c) >> 8))
  1985. --- 4,9 ----
  1986. diff -cb unzip50/zipinfo.c unz50p1/zipinfo.c
  1987. *** unzip50/zipinfo.c    Fri Aug 21 08:26:50 1992
  1988. --- unz50p1/zipinfo.c    Sun Jan 10 18:01:18 1993
  1989. ***************
  1990. *** 40,46 ****
  1991.   
  1992.     ---------------------------------------------------------------------------
  1993.   
  1994. !   Source:     unzip50.zip (.tar.Z, etc.) for Unix, VMS, OS/2 and MS-DOS; see
  1995.                 `Where' in source distribution for ftp, uucp and mail-server
  1996.                 sites.
  1997.     Author:     Greg Roelofs, roelofs@nas.nasa.gov, 23 August 1990
  1998. --- 40,46 ----
  1999.   
  2000.     ---------------------------------------------------------------------------
  2001.   
  2002. !   Source:     unz50p1.zip (.tar.Z, etc.) for Unix, VMS, OS/2 and MS-DOS; see
  2003.                 `Where' in source distribution for ftp, uucp and mail-server
  2004.                 sites.
  2005.     Author:     Greg Roelofs, roelofs@nas.nasa.gov, 23 August 1990
  2006. ***************
  2007. *** 57,63 ****
  2008.   #endif /* !ZIPINFO */
  2009.   #include "unzip.h"
  2010.   
  2011. ! #define VERSION  "v1.0 of 21 August 92"
  2012.   
  2013.   #define LFLAG    3        /* for short "ls -l" type listing */
  2014.   
  2015. --- 57,63 ----
  2016.   #endif /* !ZIPINFO */
  2017.   #include "unzip.h"
  2018.   
  2019. ! #define VERSION  "v1.0p1 of 10 January 1993"
  2020.   
  2021.   #define LFLAG    3        /* for short "ls -l" type listing */
  2022.   
  2023. ***************
  2024. *** 688,695 ****
  2025.     Actual offset of end-of-central-dir record:   %9ld (%.8lXh)\n\
  2026.     Expected offset of end-of-central-dir record: %9ld (%.8lXh)\n\
  2027.     (based on the length of the central directory and its expected offset)\n\n",
  2028. !           expect_ecrec_offset, expect_ecrec_offset,
  2029. !           real_ecrec_offset, real_ecrec_offset);
  2030.   
  2031.           if (ecrec.number_this_disk == 0) {
  2032.               printf("\
  2033. --- 688,695 ----
  2034.     Actual offset of end-of-central-dir record:   %9ld (%.8lXh)\n\
  2035.     Expected offset of end-of-central-dir record: %9ld (%.8lXh)\n\
  2036.     (based on the length of the central directory and its expected offset)\n\n",
  2037. !           real_ecrec_offset, real_ecrec_offset,
  2038. !           expect_ecrec_offset, expect_ecrec_offset);
  2039.   
  2040.           if (ecrec.number_this_disk == 0) {
  2041.               printf("\
  2042. ***************
  2043. *** 971,977 ****
  2044.                         "reduced (factor 1)", "reduced (factor 2)",
  2045.                         "reduced (factor 3)", "reduced (factor 4)",
  2046.                         "imploded", "tokenized", "deflated", unkn};
  2047. !     static char   *dtype[4] = {"normal", "maximum", "fastest", "undefined"};
  2048.   
  2049.   
  2050.   /*---------------------------------------------------------------------------
  2051. --- 971,977 ----
  2052.                         "reduced (factor 1)", "reduced (factor 2)",
  2053.                         "reduced (factor 3)", "reduced (factor 4)",
  2054.                         "imploded", "tokenized", "deflated", unkn};
  2055. !     static char   *dtype[4] = {"normal", "maximum", "fast", "superfast"};
  2056.   
  2057.   
  2058.   /*---------------------------------------------------------------------------
  2059. ***************
  2060. *** 1249,1255 ****
  2061.       UWORD         hostver, xattr;
  2062.       char          workspace[12], attribs[16];
  2063.       static char   impl[5]="i#:#", defl[5]="def#", unkn[8];
  2064. !     static char   dtype[5]="NXF?";  /* normal, maximum, fastest, undefined */
  2065.       static char   *os[NUM_HOSTS+1] = {"dos", "ami", "vms", "unx", "cms",
  2066.                         "atr", "os2", "mac", "zzz", "cpm", "???" };
  2067.       static char   *method[NUM_METHODS+1] = {"stor", "shrk", "re:1", "re:2",
  2068. --- 1249,1255 ----
  2069.       UWORD         hostver, xattr;
  2070.       char          workspace[12], attribs[16];
  2071.       static char   impl[5]="i#:#", defl[5]="def#", unkn[8];
  2072. !     static char   dtype[5]="NXFS";  /* normal, maximum, fast, superfast */
  2073.       static char   *os[NUM_HOSTS+1] = {"dos", "ami", "vms", "unx", "cms",
  2074.                         "atr", "os2", "mac", "zzz", "cpm", "???" };
  2075.       static char   *method[NUM_METHODS+1] = {"stor", "shrk", "re:1", "re:2",
  2076.  
  2077. exit 0 # Just in case...
  2078.