Annotation of coherent/b/lib/libc/gen/ttyslot.c, revision 1.1

1.1     ! root        1: /*
        !             2:  * libc/gen/ttyslot.c
        !             3:  * Coherent I/O Library.
        !             4:  * Return the index of the entry in the /etc/ttys file for this process.
        !             5:  * Slot 0 is returned on error.
        !             6:  * [Note: the controlling terminal of the process
        !             7:  * is taken to be stderr].
        !             8:  * We use _ttyslot which returns -1 on error
        !             9:  * for the benefit of ttyname().
        !            10:  */
        !            11: 
        !            12: int    _ttyslot();             /* in libc/gen/ttyname.c */
        !            13: 
        !            14: int
        !            15: ttyslot()
        !            16: {
        !            17:        register int slot;
        !            18: 
        !            19:        if ((slot = _ttyslot(2)) < 0)
        !            20:                ++slot;
        !            21:        return slot;
        !            22: }
        !            23: 
        !            24: /* end of libc/gen/ttyslot.c */

unix.superglobalmegacorp.com

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