Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!ucsd!sdcsvax!ucsdhub!hp-sdd!hplabs!hpda!hpcuhb!hpsmtc1!swh From: swh@hpsmtc1.HP.COM (Steve Harrold) Newsgroups: alt.sources Subject: Re: fixed unzip Message-ID: <14820003@hpsmtc1.HP.COM> Date: 12 Apr 89 18:54:21 GMT References: <27409@conexch.UUCP> Organization: Hewlett Packard, Cupertino Lines: 20 Re: The UNZIP program Thank you for the "byte-swapped" and "nibble" corrections. An additional correction is that the declaration for the "get_long()" function should be "longint" rather than the default "int". Failure to do this ensures that the code calculates bad CRC32 checks on a machine that has 16-bit ints. The zip file is successfully extracted, but you get a series of unsettling "bad" messages. Furthermore, the "open()" functions have to set the file mode to include the "O_BINARY" attribute for those environments that distinguish "text" files from "binary" files (e.g. MSDOS). An additional question is the use of the symbol "L_SET" in the original posting. This has a value of 0 (from file "file.h") but I think the symbol L_INCR (value = 1) should be used. The XENIX adaptation sets L_SET = 1 to achieve this purpose. Can the original author comment on these fixes?