|
|
1.1 ! root 1: /* ! 2: * Coherent I/O Library ! 3: * Return 1 if file descriptor ! 4: * is that of a terminal. ! 5: */ ! 6: ! 7: #include <sgtty.h> ! 8: ! 9: isatty(fd) ! 10: { ! 11: struct sgttyb sgb; ! 12: ! 13: return (ioctl(fd, TIOCGETP, &sgb) >= 0); ! 14: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.