home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 9 Archive / 09-Archive.zip / UnzpHist.zip / History.398 < prev    next >
Text File  |  1990-10-22  |  12KB  |  248 lines

  1. Well, David made the mistake of letting me put together the 3.98 beta
  2. release--sooner or later he's going to learn not to do that--so here's
  3. my summary of what went into it.  In brief [OK, so it's not so brief...
  4. I DID try, however.  It's just the sign of a guilty conscience when I
  5. start trying to justify everything...]:
  6.  
  7.   - the Classic Antoine Patches (MTS version of set_file...close(),
  8.     unsigned CRCs, unsigned makelong function new ULONG typedef,
  9.     character-set-independent signature bytes, fixes to the EBCDIC
  10.     stuff I broke, rearranged ebcdic[] table).  (Btw, "Antoine" refers
  11.     to Antoine Verheijen, antoine@cs.UAlberta.CA)
  12.   - the New Antoine Patch (rewrite of a_to_e()).
  13.   - incorporation of globals.h into unzip.h, per Antoine's lead and
  14.     Larry Jones's comment.  Also, updates of all the makefiles to
  15.     reflect the absence of globals.h.
  16.   - a new VMS return-code interpreter thing, so all those hard-won
  17.     return codes don't go completely to waste under VMS.  This is
  18.     tucked away in misc.c along with the other oddities and nonsense.
  19.   - addition of the MIPS system to the makefile (with just a warning
  20.     about that weird missing header file, until other MIPS users pipe
  21.     up and say yea or nay).  From Peter Jones, jones@mips1.uqam.ca
  22.     (the boys north of the border have been busy this week...must be
  23.     wearing their thinking-tuques, eh?  Beauty.)
  24.  
  25. That's the stuff most everybody already knew about.  The more alert
  26. units amongst you might have caught a fleeting reference to some other
  27. changes in one of my recent messages:
  28.  
  29.   - all (former) longints in the header structs are now ULONGs, not
  30.     just the CRCs; this follows from Phil Katz's definition of the
  31.     header fields.  Accordingly, the LONGI and LONGIP macros are now
  32.     called ULONG_ and ULONGP; portions of the code which actually
  33.     wanted a signed long now have explicit typecasts.  The total num-
  34.     ber of casts is about the same, but this way there are no silent
  35.     conversions (some of which came from the makelong() modification).
  36.   - as a result of my somewhat more-thorough-than-usual testing of all
  37.     this, I finally tracked down a bug stemming from the shared storage
  38.     areas used by unShrink/unReduce/unImplode.  On most machines the
  39.     main work area used by unReduce and unShrink is about the same size;
  40.     but on machines with long integers the unShrink area is much larger
  41.     (unShrink uses ints whereas unReduce uses chars).  Unfortunately, it
  42.     was the unReduce area which was used to allocate the storage, with
  43.     predictable results when unShrink tried to initialize it.  Well,
  44.     actually, they weren't all *that* predictable since the machine was
  45.     busily multitasking, too...a minor detail which I forgot about.  Any-
  46.     way, now the unShrink variables define the size of the storage area
  47.     (since they're always the biggest) and unReduce and unImplode use
  48.     pointers into that area.
  49.   - some added notes in the VMSNOTES file.
  50.  
  51. And then there were the related and unrelated changes which I didn't bother
  52. to announce:
  53.  
  54.   - a bunch of unReduce variables which somehow became globals have been
  55.     moved back into unreduce.c.
  56.   - a bunch of (n)unzip.c variables which also became globals have been
  57.     declared static and removed from the extern list in unzip.h.  The re-
  58.     mainder of what used to be globals.h should now truly be just globals:
  59.     each variable appears in more than one file.
  60.   - some unused typedefs removed from unimplod.c and unzip.h.
  61.   - the MSC6 errno fix has been modified so that no explicit definition
  62.     of "MSC6" is necessary; it turns out that there IS a way to distin-
  63.     guish between the different compiler versions.  Thanks to Wim Bonner,
  64.     former Microsoft dude extraordinaire (27313853@WSUVM1.CSC.WSU.EDU),
  65.     for discovering this one.
  66.   - a minor tweak to UpdateCRC (not to worry, I've tested this one rather
  67.     carefully).
  68.   - fixed a very sneaky and rather nasty bug in the list_files() function.
  69.     This one only showed up if you had individual member comments and were
  70.     listing only some of the members (at least one of the files with a com-
  71.     ment had to be excluded from the listing).  Thank goodness for heavy
  72.     metal, the most effective bug-killing substance known to man...
  73.   - trimmed down a few of my more long-winded comments; changed most of
  74.     the internal "nunzip" references to "unzip" (the filenames and make-
  75.     files are still unchanged, though, and the usage screen still says
  76.     nunzip); deleted or moved some of the more bogus version histories from
  77.     the source files to the history file (that is, this file--David may
  78.     decide to move the rest in here); and generally did meddlesome things
  79.     wherever the urge struck.  [The revision-history changes were made
  80.     after discussion with David; those things just get bigger and bigger,
  81.     and so do the source files.]
  82.   - revised the MSC makefile so that (maybe) it'll work with Turbo's
  83.     version of make, and replaced some missing tabs in the real Makefile,
  84.     just in case.
  85.  
  86. That's all I can remember.  I did NOT put the user-query into scan_back()
  87. yet (for the case where the PK signature isn't found right away), pending
  88. further discussion and/or some other tweaks to that function.  I also
  89. left the A_TO_E() macro to Antoine's discretion (the Diet Antoine Patch?)
  90. (no, wait, that one should have to do with Tabs...).
  91.  
  92.  
  93.  
  94. OK, you can stop groaning now.
  95.  
  96. The new executables are generally a bit smaller than the old ones were,
  97. except under VMS (new function in there).  I think that's because the
  98. unShrink storage was slightly over-generous before (except on Crays).
  99. Now that I think about it, it would be better to malloc() that storage
  100. instead of defining it statically...but this version is ready to go, so
  101. that'll have to wait for 3.99.
  102.  
  103. The remainder of this file contains the comments which accompanied the
  104. other patches/suggestions.
  105.  
  106. Greg
  107.  
  108. -----------------
  109.  
  110. **** Antoine Patch #1 Comments:
  111.  
  112. This patch corrects a number of minor problems with the EBCDIC support in
  113. nunzip. In particular:
  114.  
  115.    1) The definitions for the various headers in unzip.h use the characters
  116.       'P' and 'K' rather than their ASCII code equivalents. This means that
  117.       an EBCDIC system will never recognize a header.
  118.  
  119.    2) When scanning for the end of the central directory at the start, the
  120.       untranslated input character is compared against the character 'P'
  121.       rather than its ASCII code. Thus, the check fails on an EBCDIC system.
  122.  
  123.    3) Output characters are never actually converted to EBCDIC, even if the
  124.       -a flag is specified.
  125.  
  126.    4) The output file on extraction is always opened in binary mode. This
  127.       doesn't really make much sense if translation is being done.
  128.  
  129.    5) The EBCDIC table in misc.c has the "static" attribute attached to it
  130.       which prevents the linker (on some systems) from seeing it so that
  131.       other modules which require it result in an unresolved symbol.
  132.  
  133. Thie patch also slightly re-organizes the EBCDIC table to make it a bit more
  134. readable in a listing and provides a slightly better description of the
  135. actual translation performed.
  136.  
  137. -----------------
  138.  
  139. **** Antoine Patch #2 Comments:
  140.  
  141. CRC values in .zip files are unsigned 32-bit quantities. Nunzip (and its
  142. predecessor unzip) declare them in their headers as signed 32-bit (long)
  143. values. On systems such as Vax UNIX, this is not a problem because all
  144. arithmetic (including shift operations) on signed and unsigned integer
  145. values are done the same way. For example, logical shifts are used for both
  146. signed and unsigned values.
  147.  
  148. Some systems, such as MTS for example, treat unsigned and signed values
  149. differently. For example, logical shifts are used for unsigned values
  150. whereas arithmetic shifts are used for signed values. The big difference
  151. between the two, or course, is that the high-order bit is thrown away when
  152. shifting a full 32-bit signed value left on such a system. As a result,
  153. CRC checks fail on these systems when the high-order bit is supposed to be
  154. on.
  155.  
  156. This patch changes the declaration for the CRC fields in the header
  157. structures so that they are unsigned long values. It also changes the
  158. makelong() routine so that is returns an unsigned value (ie. it always
  159. retains the high order bit). This seems to make everything work properly
  160. on both types of systems (as verified by the local MTS and Vax UNIX systems).
  161.  
  162. Note that the change is made by defining a new typedef of ULONG. This was
  163. simply done to keep things a little more readable and to retain consistency
  164. with UWORD (unsigned short).
  165.  
  166.  
  167. -----------------
  168.  
  169. **** Antoine Patch #3 Comments:
  170.  
  171. This patch adds a definition for an MTS-specific set_file_time_and_close()
  172. routine to file_io.c. Like the current VMS one, it only closes the file since
  173. there is no way to set file times in MTS and there likely never will be.
  174.  
  175. -----------------
  176.  
  177. **** Antoine Patch #4 Comments:
  178.  
  179. This patch replaces the a_to_e() routine (which converts a string from
  180. ASCII to EBCDIC) with a version that is smaller both in source and binary
  181. form, and which runs about 40% faster (partly since it makes only one pass
  182. over the string rather than two).
  183.  
  184. Admittedly this is a rather petty change as it does not change the
  185. functionality of nunzip in any way, but I could see no reason not to make
  186. it more efficient since it's not a major change. If anyone feels that such
  187. changes should not be made, please let me know as I'm still fairly new to
  188. this project and am not completely sure of what constitutes acceptable
  189. change. Obviously, change for the sake of change is idiotic but are minor
  190. changes of this sort appreciated or not? My own personal approach is always
  191. to speed things up whatever way I can but such views are not always
  192. universally held. Thanks.
  193.  
  194. This patch, of course, only affects EBCDIC systems.
  195.  
  196. Antoine Verheijen, University of Alberta
  197.  
  198. -----------------
  199.  
  200. **** Wim Bonner Comments:
  201.  
  202. This was in the nunzip97 MAKEFILE.MSC file:
  203.  
  204. #          (4) If used with MSC 6.0, add "-DMSC6" to the CFLAGS line.  This
  205. #              is necessary because 6.0's errno.h declares the errno variable
  206. #              to be some oddball type; 5.0's errno.h doesn't declare errno
  207. #              at all; and there seems to be no way to determine which com-
  208. #              piler is being used to compile the code.  May Bill Gates trip
  209. #              over his own nose hairs...
  210. #  Greg Roelofs
  211. #  roelofs@amelia.nas.nasa.gov
  212. #  25 September 1990
  213.  
  214. I may be totally off base here, but at least with version 6 of MSC,
  215. there is a predefined constant listed as "_MSC_VER" which will return
  216. the number 600.  I Found it when I was looking up some constants in the
  217. quickhelp utility.  Unfortunately, I have never managed to find a list
  218. of all predefined constants or what they represent in the MSC Packages,
  219. even when I worked there in product support.
  220.  
  221. Does anyone know if this works in MSC 5.xx?  (Mine is no longer installed)
  222. The following code demonstrates it...
  223. #include <stdio.h>
  224. void main()
  225. {
  226. printf("%d",_MSC_VER);
  227. }
  228.  
  229. ========================================================================
  230.        Wim Bonner - 27313853@WSUVM1.CSC.WSU.EDU - V(509)335-8990
  231.                     Have you seen my friend the puca?
  232. ========================================================================
  233.  
  234.  
  235. -----------------
  236.  
  237. **** nunzip.c Major-Version History:
  238.  
  239.      1.2:   original Samuel H. Smith version; spring 1989(?)
  240.      2.0a:  first(?) port to Unix; C. Mascott; Nov 1989(?)
  241.      3.0:   first Info-ZIP release(?); D. Kirschbaum, coordinator; May 1990
  242.      3.1:   second Info-ZIP release; Aug 1990
  243.      4.0:   central directory rewrite; Sept-Oct 1990
  244.  
  245.  
  246. (The only file_io.c revision entry which wasn't mine--the OS/2 one--I
  247. stuck in a comment down by the actual OS/2 code.)
  248.