Annotation of 3BSD/cmd/tty.c, revision 1.1

1.1     ! root        1: /*
        !             2:  * Type tty name
        !             3:  */
        !             4: 
        !             5: char   *ttyname();
        !             6: 
        !             7: main(argc, argv)
        !             8: char **argv;
        !             9: {
        !            10:        register char *p;
        !            11: 
        !            12:        p = ttyname(0);
        !            13:        if(argc==2 && !strcmp(argv[1], "-s"))
        !            14:                ;
        !            15:        else
        !            16:                printf("%s\n", (p? p: "not a tty"));
        !            17:        exit(p? 0: 1);
        !            18: }

unix.superglobalmegacorp.com

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