Annotation of 42BSD/usr.bin/tty.c, revision 1.1.1.1

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

unix.superglobalmegacorp.com

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