Header File
io.h
Category
Input/output Routines
Prototype
int isatty(int handle);
Description
Checks for device type.
isatty determines whether handle is associated with any one of the following character devices:
If the device is one of the four character devices listed above, isatty returns a nonzero integer. If it is not such a device, isatty returns 0.
Example
#include <stdio.h> #include <io.h> int main(void) { int handle; handle = fileno(stdout); if (isatty(handle)) printf("Handle %d is a device type\n", handle); else printf("Handle %d isn't a device type\n", handle); return 0; }
Portability
POSIX |
Win32 |
ANSI C |
ANSI C++ |
+ |
+ |
|
|
Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
|
What do you think about this topic? Send feedback!
|