🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: net.sources.bugs
Article #904

Re: uuen/decode with checksums.

#904
From: pyle
Date: Sat, 17 Jan 1987 02:18
35 lines
1945 bytes
> From: flaps@utcsri.UUCP (Alan J Rosenthal)
> Subject: uuen/decode with checksums.
> Date: 13 Jan 87 05:56:06 GMT
> 
> I have made a simple patch which puts a checksum character at the end of each
> line.  Files uuencoded with this new uuencode can be uudecoded with the old
> uudecode without complaint.  If you use this uudecode on a file uuencoded
> with the old uuencode, every line gives a checksum error, so I have made it
> report only the first five checksum errors.  Therefore, if you get errors
> saying that there is a checksum error on lines 1, 2, 3, 4, and 5, you can
> presume that the file you are uudecoding was uuencoded without checksums.

I have made a very simple modification to Alan's uudecode which makes it
more compatible with files encoded with a uuencode lacking his checksum.  The
checksum must be a printable character according to his code, so after reading
the data, the pointer is either pointing to (1) his checksum or (2) at the
newline if an 'old' uuencode was used.  My patch causes the checksum test
to be bypassed if that byte is a newline.  Also, the name of the file being
created is echoed to stdout.

Here's the diff to uudecode.c:

86a87,89
> 	else
> 		printf("%s\n",dest);
> 
129c132
< 		if (checksum != DEC(*bp))
---
> 		if (*bp != '\n' && checksum != DEC(*bp))

Keith Pyle

UUCP: . . .{ihnp4,seismo,ctvax,noao,gatech}!ut-sally!ut-ngp!pyle
ARPA: pyle@ut-ngp
Technical Details
Message-ID: <4517@ut-ngp.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!rutgers!im4u!ut-sally!ut-ngp!pyle
References: <3917@utcsri.UUCP>

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!rutgers!im4u!ut-sally!ut-ngp!pyle
From: pyle@ut-ngp.UUCP
Newsgroups: net.sources.bugs
Subject: Re: uuen/decode with checksums.
Message-ID: <4517@ut-ngp.UUCP>
Date: Fri, 16-Jan-87 21:18:07 EST
Article-I.D.: ut-ngp.4517
Posted: Fri Jan 16 21:18:07 1987
Date-Received: Sat, 17-Jan-87 16:05:36 EST
References: <3917@utcsri.UUCP>
Distribution: world
Organization: UTexas Computation Center, Austin, Texas
Lines: 35