home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The C Users' Group Library 1994 August
/
wc-cdrom-cusersgrouplibrary-1994-08.iso
/
vol_200
/
272_01
/
iscons.doc
< prev
next >
Wrap
Text File
|
1987-07-17
|
808b
|
39 lines
NAME
iscons -- is file descriptor the console
SYNOPSIS
r = iscons(fd);
int r; TRUE or FALSE returned
FILE *fd; file descriptor to check
DESCRIPTION
The specified file descriptor is tested to see if it refers
to the console device. TRUE (not 0)
is returned if it does, and FALSE (0) otherwise.
This is a test primarily aimed at detecting if stdin or
stdout have been redirected away from the default console.
EXAMPLE
if(iscons(stdin)) puts("stdin is the keyboard");
else ("stdin is probably a file");
This function is found in SMDLx.LIB for the Datalight Compiler