Annotation of researchv9/libc/gen/isatty.c, revision 1.1

1.1     ! root        1: /*
        !             2:  * Returns 1 iff file is a tty
        !             3:  */
        !             4: 
        !             5: #include <sys/ttyio.h>
        !             6: 
        !             7: isatty(f)
        !             8: {
        !             9:        extern errno;
        !            10:        struct sgttyb ttyb;
        !            11: 
        !            12:        if (ioctl(f, TIOCGETP, &ttyb) < 0) {
        !            13:                errno = 0;
        !            14:                return(0);
        !            15:        }
        !            16:        return(1);
        !            17: }

unix.superglobalmegacorp.com

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