File:  [CSRG BSD Unix] / 42BSD / old / rfc678.c
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 16:12:53 2018 UTC (8 years, 1 month ago) by root
Branches: MAIN, BSD
CVS tags: HEAD, BSD42
BSD 4.2

char	*sccsid = "@(#)rfc678.c	4.1 (Berkeley) 4.1";

#include <stdio.h>

char linebuf[1024];
/*
 * rfc678
 */
main()
{
	register char *cp;
	int lineno = 0;

	while (gets(linebuf)) {
		for (cp = linebuf; *cp; cp++)
			if (*cp == 010) {
				strcpy(cp-1, cp+1);
				cp -= 2;
			}
		if (++lineno <= 59)
			printf("%s\n", linebuf);
		else if (lineno == 60)
			printf("%s\f\n", linebuf);
		lineno %= 66;
	}
}

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.