[comp.sys.handhelds] Fixing the HP48sx demo program

robert@longs.LANCE.ColoState.Edu (Robert Thompson) (03/12/90)

Having seen many requests for help on UUDECODING the 48's demo program I am
submitting this short program to fix the line length problems.  The version
I got in the mail had the trailing spaces removed.  Consequently, the file
would not decode.

	usage: a.out < (uuencoded file) > (fixed file)

I hope this helps the rest of you

Robert Thompson
Center for Computer Assisted Engineering
Colorado State University

------ CUT HERE ------

#include <stdio.h>
main()
{
	char	inline[80];

	while(fgets(inline,80,stdin) != NULL)
		{
		inline[strlen(inline)-1] = NULL;
		while(strlen(inline) < 60) strcat(inline," ");
		printf ("%s\n",inline);
	}
}

Hope this helps

Robert Thompson
Center for Computer Assisted Engineering
Colorado State University