[comp.sys.amiga] Bug fixes for LHarc UNIX Version 0.03

stefanb@cip-s03.informatik.rwth-aachen.de (Stefan Becker) (03/28/90)

Somebody mentioned, that he had trouble to unpack archives created with Lharc
Unix V0.03 on the amiga. I've tested the program and had no problems except 
with the path namesi (see below). Have you switched to binary mode as you
transfered the archive to the amiga?
I solved the path problem today. So here are the "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); */

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	+-----------------------------+