[net.unix] sending binary files via telephone

tut@ucbopal.CC.Berkeley.ARPA (04/01/84)

Reading the System V manual, I noticed that USG Unix doesn't have
uuencode or uudecode.  After thinking about it, I wasn't sure why
they are necessary anyway.  It seems you can transmit binary files
using two simple C programs, such as `hex' and `unhex':
-----------------
#include <stdio.h>
main()			/* hex.c - binary to hex */
{
	int c;

	while ((c = getchar()) != EOF)
		printf("%02x", c);
	exit(0);
}
-----------------
#include <stdio.h>
main()			/* unhex.c - hex to binary */
{
	int c;

	while (scanf("%2x", &c) != EOF)
		putchar(c);
	exit(0);
}
-----------------
Are there any problems I don't know about here?  Are uuencode
and uudecode necessary because mailers require newlines every
so often?

Bill Tuthill
ucbvax!imagen!tut