🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: net.micro.atari
Article #1628

Re: i blew it

#1628
From: What's in a name ?
Date: Thu, 28 Nov 1985 03:05
61 lines
2656 bytes
> >how do you post binaries ????
> 
> Unfortunately, those who don't have Unix probably don't have access
> to uuencode/uudecode.
> 
> If nobody comes up with something soon, maybe I'll brew something up which
> will run on the ST and post the sources in C and/or ST Basic.
> 
May I suggest writing uudecode for the atari as well?  The actual code
should be fairly simple (longs printed out base 96) it is important to
be sure that the byte order is preserved (msb to lsb) which is less of
a problem on a 68000 than on an 8086 or VAX.

The documentation is in the UNIX manuals.  Sure beats using hex format.
Compression is 4/2 rather than 2/1 meaning less traffic.

Format (discussed in detail in uudecode(5) ) is basicly.
------------------------------cut here----------------------------------
/*
	this is an approximation of the encoder from which a
	decoder can be written
*/
uuencode(FileName,*infile)
char *FileName;
FILE *infile;
{
	long xbuf;
	int i,j,count;
	char bytarr[64];
	litbuf[5];
	printf("\nbegin .%s\n",FileName);
	while(count=fread(bytarr,1,62,file)!=EOF)
	{
		printf("%s",count+' ');  /*count between 0 and 64*/
		for(i=0,i<=count,)
		{
		   xbuf=0;
		   for(j=0,j<3,j++) /* pack next three bytes into long */
		   {
			xbuf+=xbuf<<8+bytarr[i++]; /* this prevents "flips" */
		   };
		   for(j=0,j<4,j++) /* push out as printable chars */
		   {
		   	litbuf[4-j]=xbuf%96+' '; /*insures value is printable*/
			xbuf%=96;
		   };
		printf("%s",litbuf);
		}
		printf("\n"); /* this is the end of one line */
	}
	printf("end\n");
}

-----------------------------------------------------------------------------

I'd write the decoder, but I'm out of time.  This routine is not debugged
dress up the interface a little and post it back.  I am using vanilla
K&R because I haven't got the ST yet.  I would be interested in seeing
what won't compile, or what "extras" are needed.

rb@ccivax (rex ballard - Computer Consoles)
Technical Details
Message-ID: <335@ccivax.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!burl!ulysses!mhuxr!mhuxn!ihnp4!qantel!lll-crg!gymble!umcp-cs!seismo!rochester!ritcv!ccice5!ccivax!guest
References: <1867@saber.UUCP> <1144@nlm-vax.ARPA>

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.2 9/18/84; site ccivax.UUCP
Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!burl!ulysses!mhuxr!mhuxn!ihnp4!qantel!lll-crg!gymble!umcp-cs!seismo!rochester!ritcv!ccice5!ccivax!guest
From: guest@ccivax.UUCP (What's in a name ?)
Newsgroups: net.micro.atari
Subject: Re: i blew it
Message-ID: <335@ccivax.UUCP>
Date: Wed, 27-Nov-85 22:05:25 EST
Article-I.D.: ccivax.335
Posted: Wed Nov 27 22:05:25 1985
Date-Received: Sat, 30-Nov-85 07:03:20 EST
References: <1867@saber.UUCP> <1144@nlm-vax.ARPA>
Distribution: net
Organization: CCI Telephony Systems Group,  Rochester NY
Lines: 61