fix to do writes in memory properly
[unix-history] / usr / src / old / rfc678 / rfc678.c
CommitLineData
7386a1ce
BJ
1char *sccsid = "@(#)rfc678.c 4.1 (Berkeley) 4.1";
2
3#include <stdio.h>
4
5char linebuf[1024];
6/*
7 * rfc678
8 */
9main()
10{
11 register char *cp;
12 int lineno = 0;
13
14 while (gets(linebuf)) {
15 for (cp = linebuf; *cp; cp++)
16 if (*cp == 010) {
17 strcpy(cp-1, cp+1);
18 cp -= 2;
19 }
20 if (++lineno <= 59)
21 printf("%s\n", linebuf);
22 else if (lineno == 60)
23 printf("%s\f\n", linebuf);
24 lineno %= 66;
25 }
26}