Annotation of 43BSD/old/rfc678.c, revision 1.1.1.1

1.1       root        1: char   *sccsid = "@(#)rfc678.c 4.1 (Berkeley) 4.1";
                      2: 
                      3: #include <stdio.h>
                      4: 
                      5: char linebuf[1024];
                      6: /*
                      7:  * rfc678
                      8:  */
                      9: main()
                     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: }

unix.superglobalmegacorp.com

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