Annotation of coherent/d/bin/yes.c, revision 1.1

1.1     ! root        1: /*
        !             2:  * Produce a continuous stream of `y's
        !             3:  * or `n's.
        !             4:  */
        !             5: 
        !             6: #include <stdio.h>
        !             7: 
        !             8: main(argc, argv)
        !             9: char *argv[];
        !            10: {
        !            11:        char *yes = "y";
        !            12: 
        !            13:        if (argc > 2)
        !            14:                usage();
        !            15:        if (argc > 1)
        !            16:                yes = argv[1];
        !            17:        for (;;)
        !            18:                puts(yes);
        !            19:        /* NOTREACHED */
        !            20: }
        !            21: 
        !            22: usage()
        !            23: {
        !            24:        fprintf(stderr, "Usage: yes [answer]\n");
        !            25:        exit(1);
        !            26: }

unix.superglobalmegacorp.com

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