feof 中文man页面

系统
函数 clearerr 清除 stream 流 里面 的 文件末尾(end-of-file) 标志 和 错误 标志,

NAME

clearerr, feof, ferror, fileno - 检查以及重置流状态  

总览 (SYNOPSIS)

#include <stdio.h>

void clearerr(FILE *stream);
int feof(FILE *stream);
int ferror(FILE *stream);
int fileno(FILE *stream);  

描述 (DESCRIPTION)

函数 clearerr 清除 stream 流 里面 的 文件末尾(end-of-file) 标志 和 错误 标志,

函数 feof 测试 stream 流 里面 的 文件末尾(end-of-file) 标志, 如果 设置了 该 标志, 函数 返回 非零. end-of-file 标志 只能 用 clearerr 函数 清除.

函数 ferror 测试 stream 流 里面的 错误 标志, 如果 设置了 该 标志, 函数 返回 非零. 错误 标志 只能 用 clearerr 函数 复位.

函数 fileno 检查 stream 参数, 然后 以 整数 返回 其 (文件)描述符.

相应的 无锁函数(non-locking) 参见 unlocked_stdio(3).  

错误 (ERRORS)

这些 函数 不会 失败, 也 不设置 外部变量 errno. (然而, 如果 fileno 检测到 它的 参数 不是 有效的 流, 它 必须 返回 -1 并且 把 errno 设置为 EBADF.)  

遵循 (CONFORMING TO)

函数 clearerr, feof, 和 ferror 遵循 X3.159-1989 (``ANSI C'') 标准.  

另见 (SEE ALSO)

open(2), unlocked_stdio(3), stdio(3)  

#p#

NAME

clearerr, feof, ferror, fileno - check and reset stream status  

SYNOPSIS

#include <stdio.h>

void clearerr(FILE *stream);
int feof(FILE *stream);
int ferror(FILE *stream);
int fileno(FILE *stream);  

DESCRIPTION

The function clearerr clears the end-of-file and error indicators for the stream pointed to by stream.

The function feof tests the end-of-file indicator for the stream pointed to by stream, returning non-zero if it is set. The end-of-file indicator can only be cleared by the function clearerr.

The function ferror tests the error indicator for the stream pointed to by stream, returning non-zero if it is set. The error indicator can only be reset by the clearerr function.

The function fileno examines the argument stream and returns its integer descriptor.

For non-locking counterparts, see unlocked_stdio(3).  

ERRORS

These functions should not fail and do not set the external variable errno. (However, in case fileno detects that its argument is not a valid stream, it must return -1 and set errno to EBADF.)  

CONFORMING TO

The functions clearerr, feof, and ferror conform to X3.159-1989 (``ANSI C'').  

SEE ALSO

open(2), unlocked_stdio(3), stdio(3)

责任编辑:韩亚珊 来源: CMPP.net
相关推荐

2011-08-24 16:48:36

man中文man

2011-08-15 10:21:09

man中文man

2011-08-11 16:11:49

at中文man

2011-08-25 10:21:56

man.conf中文man

2011-08-25 16:47:37

fwrite中文man

2011-08-25 16:50:08

getc中文man

2011-08-25 16:52:54

getchar中文man

2011-08-25 17:03:51

pclose中文man

2011-08-25 16:22:29

fputc中文man

2011-08-25 16:28:50

fread中文man

2011-08-25 17:27:58

rewind中文man

2011-08-25 17:32:40

setbuffer中文man

2011-08-25 16:10:52

fgets中文man

2011-08-25 15:54:08

ferror中文man

2011-08-23 17:09:56

telinit中文man

2011-08-23 17:42:39

vmstat中文man

2011-08-23 17:49:36

zdump中文man

2011-08-15 15:24:49

wc中文man

2011-08-15 15:36:55

xmodmap中文man

2011-08-15 18:20:04

cut中文man
点赞
收藏

51CTO技术栈公众号