projects
/
unix-history
/ blame
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
tags
|
clone url
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
blob
|
blame
(incremental) |
history
|
HEAD
don't use setjmp/longjmp, or problems if an interrupt routine
[unix-history]
/
usr
/
src
/
lib
/
libc
/
gen
/
isatty.c
Commit
Line
Data
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
8
isatty(f)
9
{
10
struct sgttyb ttyb;
11
12
if (gtty(f, &ttyb) < 0)
13
return(0);
14
return(1);
15
}