home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
BCI NET 2
/
BCI NET 2.iso
/
archives
/
programming
/
c
/
hce.lha
/
HCE
/
LibSource
/
clib
/
Stdio
/
src
/
isatty.c
< prev
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
Macintosh to JP
NeXTSTEP
RISC OS/Acorn
Shift JIS
UTF-8
Wrap
C/C++ Source or Header
|
1992-09-02
|
340 b
|
22 lines
#include <stdio.h>
#include <fcntl.h>
#include <errno.h>
extern struct _device *_devtab[];
int
isatty(fd)
unsigned int fd;
{
extern long IsInteractive();
register struct _device *fp;
fp = &((*_devtab)[fd]);
if ( fd >=OPEN_MAX || !fp->fileHandle ) {
errno = EBADF;
return -1;
}
return ( IsInteractive(fp->fileHandle) != 0 );
}