[comp.os.minix] Bug report and fix for uudecode.c

hall@cod.NOSC.MIL (Robert R. Hall) (03/14/89)

I tried unpacking the recent clam posting under MINIX.
The MINIX commands uudecode, compress sh and sed all
did their job satisfactory and I was able to extract
the source code for tsch  however uudecode printed an
warning message "No end line"
Thus here is a patch to let uudecode find the end
statements in the clam posting and not print the warning
message.

-----------------   cut here   -----------------------
echo x - uudecode.c.dif
sed '/^X/s///' > uudecode.c.dif << '/'
X*** /usr/v1.3d/commands/uudecode.c	Mon Sep 19 14:10:06 1988
X--- uudecode.c	Mon Mar 13 07:47:29 1989
X***************
X*** 114,120 ****
X  			printf("Short file\n");
X  			exit(10);
X  		}
X! 		n = tbuf[0] - ' ';
X  		if (n <= 0)
X  			break;
X  
X--- 114,120 ----
X  			printf("Short file\n");
X  			exit(10);
X  		}
X! 		n = DEC(tbuf[0]);
X  		if (n <= 0)
X  			break;
X  
/
----------------------   end  -----------------
Robert R. Hall
hall@nosc.mil

jf@laura.UUCP (Jan-Hinrich Fessel) (03/19/89)

I do not use the supplied uudecode anymore, 
the uud / uue posted to comp.sources.unix is
much nicer (You don't have to edit the files before
uudecoding them, and it splits the file while encoding
into reasonable pieces with reasonable names.)

There occured only one problem:

sscanf() does not return the number of matched patterns, as it
is supposed to do.  I just dropped the check and uud worked fine,
but if anyone has fixed scanf & brothers, please post or mail
the fixes.

	Jan-Hinrich

			      Jan-Hinrich Fessel
	Universitaet Dortmund, IRB	jf@unido.uucp  ||  jf@unido.bitnet
	There's no way to delay that trouble comin' every day... F.Z.
 ============================================================================= 
-- 
			      Jan-Hinrich Fessel
	Universitaet Dortmund, IRB	jf@unido.uucp  ||  jf@unido.bitnet
	There's no way to delay that trouble comin' every day... F.Z.
 =============================================================================