Annotation of researchv10no/cmd/spitbol/cint/testty.c, revision 1.1

1.1     ! root        1: 
        !             2: /*
        !             3:        testty is a c function that determines whether or not
        !             4:        a file descriptor represents a tty device.  testty
        !             5:        returns 0 on success, -1 on failure.
        !             6: */
        !             7: #include <sgtty.h>
        !             8: 
        !             9: int testty( fd )
        !            10: int    fd;
        !            11: 
        !            12: {
        !            13:        struct  sgttyb  buffer;
        !            14: 
        !            15:        return  ioctl( fd,TIOCGETP,&buffer );
        !            16: }
        !            17: 

unix.superglobalmegacorp.com

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