isatty.c 249 B

123456789101112
  1. /* $Id$ */
  2. isatty(f)
  3. {
  4. char buf[128];
  5. /* not a sgttyb struct; it might not be large enough;
  6. I know for a fact that it is'nt large enough on PC/IX,
  7. where gtty is an ioctl(..., TCGETA, ...)
  8. */
  9. if (gtty(f, buf) < 0) return 0;
  10. return 1;
  11. }