don't use setjmp/longjmp, or problems if an interrupt routine
[unix-history] / usr / src / lib / libc / gen / isatty.c
CommitLineData
b5799bf2
BJ
1/* @(#)isatty.c 4.1 (Berkeley) %G% */
2/*
3 * Returns 1 iff file is a tty
4 */
5
6#include <sgtty.h>
7
8isatty(f)
9{
10 struct sgttyb ttyb;
11
12 if (gtty(f, &ttyb) < 0)
13 return(0);
14 return(1);
15}