home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 9 Archive / 09-Archive.zip / UNZP50P1.ZIP / patch01 < prev    next >
Text File  |  1993-01-23  |  78KB  |  2,110 lines

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