A unix version of unzip11 that was posted a few days ago.

Bob Best bob at conexch.UUCP
Mon Apr 10 03:51:20 AEST 1989


The following patch fixes a bug that was causing an extra (null) byte to be
appended to some files on extraction.  The type declaration of parameter
's' in get_string() has also been fixed.

*** unzipbsd.c~	Sun Apr  9 10:33:47 1989
--- unzipbsd.c	Sun Apr  9 10:39:40 1989
***************
*** 267,273 ****
  
  get_string(len, s)
  int len;
! char *s[];
  { 
  	read(zipfd,s,len);
  	s[len] = 0;
--- 267,273 ----
  
  get_string(len, s)
  int len;
! char *s;
  { 
  	read(zipfd,s,len);
  	s[len] = 0;
***************
*** 811,817 ****
  		 while ((!zipeof)) 
  		 { 
  			ReadByte(&b); 
! 			OutByte(b); 
  		 } 
  		} 
  	break; 
--- 811,818 ----
  		 while ((!zipeof)) 
  		 { 
  			ReadByte(&b); 
! 			if (!zipeof) /* bob at dhw68k.cts.com */
! 				OutByte(b); 
  		 } 
  		} 
  	break; 
-- 
Bob Best
bob at dhw68k.cts.com



More information about the Alt.sources mailing list