isatty.gml
来自「开放源码的编译器open watcom 1.6.0版的源代码」· GML 代码 · 共 33 行
GML
33 行
.func isatty
#include <&iohdr>
int isatty( int &fd );
.ixfunc2 '&OsIo' &func
.funcend
.desc begin
The &func function tests if the opened file or device referenced by
the file &handle
.arg &fd
is a character device (for example, a console, printer or port).
.desc end
.return begin
The &func function returns zero if the device or file is not
a character device; otherwise, a non-zero value is returned.
.im errnoref
.return end
.see begin
.seelist isatty open
.see end
.exmp begin
#include <stdio.h>
#include <&iohdr>
void main()
{
printf( "stdin is a %stty\n",
( isatty( fileno( stdin ) ) )
? "" : "not " );
}
.exmp end
.class POSIX 1003.1
.system
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?