Annotation of researchv10no/cmd/spitbol/listman.c, revision 1.1

1.1     ! root        1: #include <stdio.h>
        !             2: #define MANUAL "spitv35.man"
        !             3: 
        !             4: main()
        !             5: {
        !             6:        register int c, linecnt;
        !             7:        register FILE *f;
        !             8: 
        !             9:        f = fopen (MANUAL, "r");
        !            10:        if (f == NULL) {
        !            11:                perror (MANUAL);
        !            12:                exit (1);
        !            13:        }
        !            14: 
        !            15:        linecnt = 0;
        !            16:        while ((c = getc (f)) != EOF) {
        !            17:                putchar (c);
        !            18:                if (c == '\n') {
        !            19:                        linecnt++;
        !            20:                        if (linecnt == 62) {
        !            21:                                linecnt = 0;
        !            22:                                putchar ('\f');
        !            23:                        }
        !            24:                }
        !            25:                if (c == '\r')
        !            26:                        getc (f);
        !            27:        }
        !            28: }

unix.superglobalmegacorp.com

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