isatty X
1: /* 2: * Returns 1 iff file is a tty 3: */ 4: 5: #include <sgtty.h> 6: 7: isatty(f) 8: { 9: struct sgttyb ttyb; 10: 11: if (gtty(f, &ttyb) < 0) 12: return(0); 13: return(1); 14: }