Annotation of researchv10dc/cmd/learn/lib/src/list.c, revision 1.1

1.1     ! root        1: #include "stdio.h"
        !             2: #include "lrnref"
        !             3: #include "signal.h"
        !             4: 
        !             5: int istop;
        !             6: 
        !             7: list(r)
        !             8: char *r;
        !             9: {
        !            10:        int stop(), intrpt();
        !            11:        FILE *ft;
        !            12:        char s[100];
        !            13: 
        !            14:        if (r==0)
        !            15:                return;
        !            16:        istop = 1;
        !            17:        signal(SIGINT, stop);
        !            18:        ft = fopen(r, "r");
        !            19:        if (ft != NULL) {
        !            20:                while (fgets(s, 100, ft) && istop)
        !            21:                        fputs(s, stdout);
        !            22:                fclose(ft);
        !            23:        }
        !            24:        signal(SIGINT, intrpt);
        !            25: }
        !            26: 
        !            27: stop()
        !            28: {
        !            29:        istop=0;
        !            30: }

unix.superglobalmegacorp.com

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