Annotation of 40BSD/cmd/sleep.c, revision 1.1

1.1     ! root        1: static char *sccsid = "@(#)sleep.c     4.1 (Berkeley) 10/1/80";
        !             2: main(argc, argv)
        !             3: char **argv;
        !             4: {
        !             5:        int c, n;
        !             6:        char *s;
        !             7: 
        !             8:        n = 0;
        !             9:        if(argc < 2) {
        !            10:                printf("arg count\n");
        !            11:                exit(0);
        !            12:        }
        !            13:        s = argv[1];
        !            14:        while(c = *s++) {
        !            15:                if(c<'0' || c>'9') {
        !            16:                        printf("bad character\n");
        !            17:                        exit(0);
        !            18:                }
        !            19:                n = n*10 + c - '0';
        !            20:        }
        !            21:        sleep(n);
        !            22: }

unix.superglobalmegacorp.com

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