From decwrl!uunet!allbery Thu Mar 29 20:48:17 PST 1990 Article 1465 of comp.sources.misc: Path: decwrl!uunet!allbery From: stefanb@cip-s03.informatik.rwth-aachen.de (Stefan Becker) Newsgroups: comp.sources.misc Subject: v11i090: Bug fixes for LHarc UNIX Version 0.03 Keywords: bug fixes lharc Message-ID: <82807@uunet.UU.NET> Date: 29 Mar 90 23:50:42 GMT Sender: allbery@uunet.UU.NET Organization: Informatik RWTH Aachen Lines: 59 Approved: allbery@uunet.UU.NET (Brandon S. Allbery - comp.sources.misc) Posting-number: Volume 11, Issue 90 Submitted-by: stefanb@cip-s03.informatik.rwth-aachen.de (Stefan Becker) Archive-name: lharc/patch_sb [This is an unofficial patch. ++bsa] Here are some "bug fixes" for the UNIX version of LHARC posted last month in comp.sources.misc. 1. The toupper() call in write_header() corrupts the path names. If you get e.g. 'testmfile.c' instead of 'test/file.c' in the archive, then apply the following patch to lharc.c: 1132c1132 < *ptr = toupper(*ptr); --- > /* *ptr = toupper(*ptr); */ [A better fix is: if (islower(*ptr)) *ptr = toupper(*ptr); This retains the "toupper" behavior without breaking on non-alphabetic characters. Not also that some systems have a smart toupper() which deals with this properly. ++bsa] 2.1 This is a real bug. If your archive contains a file with a length of 0 bytes, then lharc crashes with an 'division by zero' error. Apply the following patch to lzhuf.c: 884a885,890 > > /* bug fix for files with size==0 28.03.1990 SB */ > if (indicator_threshold == 0) > indicator_threshold = INDICATOR_THRESHOLD; > /************************************************/ > 2.2 This is a "bug" related to 2.1. If you try to archive a file with a length of 0 bytes, then lharc doesn't write a message. Apply the following patch to lharc.c: 1836c1836,1839 < return; /* previous write_header is not DUMMY. (^_^) */ --- > { > printf("%s - not frozen\n",hdr->name); > return; /* previous write_header is not DUMMY. (^_^) */ > } That's all folks... Stefan Mail : Stefan Becker, Holsteinstrasse 9, 5100 Aachen, West Germany +-------+ Phone : +49-241-505705 FIDO: 2:242/7.6 +---------------------+ Call | InterNet: stefanb@s02.informatik.rwth-aachen.de | Place free for ad's now! | UUCP : ..mcvax!unido!rwthinf!s02!stefanb +-----------------------------+