AminetAminet
Search:
84707 packages online
About
Recent
Browse
Search
Upload
Setup
Services

misc/unix/lha-unix.bug.txt

Mirror:Random
Showing:m68k-amigaosppc-amigaosppc-morphosi386-arosi386-amithlonppc-warpupppc-powerupgeneric
No screenshot available
Short:Patch for Unix-LhA on DECstations
Uploader:wiedmann mailserv zdv uni-tuebingen de
Type:misc/unix
Architecture:generic
Date:1994-10-19
Download:http://aminet.net/misc/unix/lha-unix.bug.txt - View contents
Readme:http://aminet.net/misc/unix/lha-unix.bug.readme
Downloads:4585

Unix-LhA on DECstations has a bug when archiving directories recursively.
The reason is a problem in C with char vs. unsigned char. The problem is
fixed, if you replace the function call

	rindex(.., DELIM2)

with

	rindex(.., (char) DELIM2)

in src/header.c three times. I include a patchfile below.

Jochen



*** lha-1.00.orig/src/header.c	Thu Apr  9 16:43:14 1992
--- lha-1.00/src/header.c	Wed Nov 10 09:01:29 1993
***************
*** 701,705 ****
--- 701,709 ----
    if (hdr->header_level != HEADER_LEVEL2)
      {
+ #ifndef ultrix
        if (p = (char *)rindex(hdr->name, DELIM2))
+ #else
+       if (p = (char *)rindex(hdr->name, (char) DELIM2))
+ #endif	
  	name_length = strlen(++p);
        else
***************
*** 745,749 ****
--- 749,757 ----
        put_word(hdr->unix_gid);
        put_word(hdr->unix_uid);
+ #ifndef ultrix
        if (p = (char *)rindex(hdr->name, DELIM2))
+ #else
+       if (p = (char *)rindex(hdr->name, (char) DELIM2))
+ #endif
  	{
  	  int i;
***************
*** 770,774 ****
--- 778,786 ----
  	{
  	  int i;
+ #ifndef ultrix
  	  if (p = (char *)rindex(hdr->name, DELIM2))
+ #else
+ 	  if (p = (char *)rindex(hdr->name, DELIM2))
+ #endif
  	    name_length = strlen(++p);
  	  else

Aminet © 1992-2024 Urban Müller and the Aminet team. Aminet contact address: <aminetaminet net>