home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / misc / volume11 / lharc / patch_sb < prev    next >
Encoding:
Text File  |  1990-03-29  |  2.1 KB  |  68 lines

  1. Newsgroups: comp.sources.misc
  2. organization: Informatik RWTH Aachen
  3. keywords: bug fixes lharc
  4. subject: v11i090: Bug fixes for LHarc UNIX Version 0.03
  5. from: stefanb@cip-s03.informatik.rwth-aachen.de (Stefan Becker)
  6. Sender: allbery@uunet.UU.NET (Brandon S. Allbery - comp.sources.misc)
  7.  
  8. Posting-number: Volume 11, Issue 90
  9. Submitted-by: stefanb@cip-s03.informatik.rwth-aachen.de (Stefan Becker)
  10. Archive-name: lharc/patch_sb
  11.  
  12. [This is an unofficial patch.  ++bsa]
  13.  
  14. Here are some "bug fixes" for the UNIX version of LHARC posted last month in
  15. comp.sources.misc.
  16.  
  17. 1. The toupper() call in write_header() corrupts the path names. If you get
  18.    e.g. 'testmfile.c' instead of 'test/file.c' in the archive, then apply the 
  19.    following patch to lharc.c:
  20.  
  21. 1132c1132
  22. <     *ptr = toupper(*ptr);
  23. ---
  24. > /*    *ptr = toupper(*ptr); */
  25.  
  26. [A better fix is:
  27.  
  28.     if (islower(*ptr))
  29.         *ptr = toupper(*ptr);
  30.  
  31. This retains the "toupper" behavior without breaking on non-alphabetic
  32. characters.  Not also that some systems have a smart toupper() which deals
  33. with this properly.  ++bsa]
  34.  
  35. 2.1 This is a real bug. If your archive contains a file with a length of 0
  36.     bytes, then lharc crashes with an 'division by zero' error. Apply the
  37.     following patch to lzhuf.c:
  38.  
  39. 884a885,890
  40. >     /* bug fix for files with size==0 28.03.1990 SB */
  41. >     if (indicator_threshold == 0)
  42. >         indicator_threshold = INDICATOR_THRESHOLD;
  43. >     /************************************************/
  44.  
  45. 2.2 This is a "bug" related to 2.1. If you try to archive a file with a length
  46.     of 0 bytes, then lharc doesn't write a message. Apply the following patch
  47.     to lharc.c:
  48.  
  49. 1836c1836,1839
  50. <     return;            /* previous write_header is not DUMMY. (^_^) */
  51. ---
  52. >     {
  53. >       printf("%s - not frozen\n",hdr->name);
  54. >       return;        /* previous write_header is not DUMMY. (^_^) */
  55. >     }
  56.  
  57. That's all folks...
  58.  
  59.     Stefan
  60.  
  61. Mail    : Stefan Becker, Holsteinstrasse 9, 5100 Aachen, West Germany +-------+
  62. Phone    : +49-241-505705    FIDO: 2:242/7.6    +---------------------+     Call |
  63. InterNet: stefanb@s02.informatik.rwth-aachen.de | Place free for ad's    now! |
  64. UUCP    : ..mcvax!unido!rwthinf!s02!stefanb    +-----------------------------+
  65.  
  66.