Annotation of researchv9/libc/gen/cttyname.c, revision 1.1.1.1

1.1       root        1: /*
                      2:  * on success:
                      3:  *     returns the pathname ("/dev/...") of the controlling terminal.
                      4:  *     bug: does not actually find controlling terminal.
                      5:  *     bug: returns pointer to static area.
                      6:  * on failure:
                      7:  *     returns 0.
                      8:  */
                      9: 
                     10: char   *_ttyname();
                     11: static char cttybuf[32];
                     12: 
                     13: char *
                     14: cttyname()
                     15: {
                     16:        register char *s = &cttybuf[0];
                     17: 
                     18:        if (_ttyname(s, 0) || _ttyname(s, 2) || _ttyname(s, 1))
                     19:                return(s);
                     20:        return(0);
                     21: }

unix.superglobalmegacorp.com

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