1989-12-18 15:04:14 +00:00
|
|
|
/*
|
1990-01-22 11:13:26 +00:00
|
|
|
* _isatty - check if a file descriptor is associated with a terminal
|
1989-12-18 15:04:14 +00:00
|
|
|
*/
|
1994-06-24 14:02:31 +00:00
|
|
|
/* $Id$ */
|
1989-12-18 15:04:14 +00:00
|
|
|
|
1990-01-22 11:13:26 +00:00
|
|
|
int _gtty(int d, char *buf);
|
1989-12-18 15:04:14 +00:00
|
|
|
|
1990-01-22 11:13:26 +00:00
|
|
|
int _isatty(int d)
|
1989-12-18 15:04:14 +00:00
|
|
|
{
|
|
|
|
char buf[128];
|
|
|
|
/* not a sgttyb struct; it might not be large enough;
|
|
|
|
I know for a fact that it isn't large enough on PC/IX,
|
|
|
|
where gtty is an ioctl(..., TCGETA, ...)
|
|
|
|
*/
|
|
|
|
|
1990-01-22 11:13:26 +00:00
|
|
|
return _gtty(d, buf) >= 0;
|
1989-12-18 15:04:14 +00:00
|
|
|
}
|