home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fresh Fish 9
/
FreshFishVol9-CD2.bin
/
bbs
/
dev
/
hce-1.0.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 );
}