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-11-01 13:46:50

中文mantac

2011-08-25 16:55:26

gets中文man

2011-08-25 15:49:02

freopen中文man

2011-08-25 16:08:55

fsetpos中文man

2011-08-25 15:33:18

exit中文man

2011-08-25 10:55:37

services中文man

2011-08-25 09:35:26

units中文man

2011-08-24 13:57:35

DECLARE中文man

2011-08-23 17:24:11

userdel中文man

2011-08-23 17:33:22

rdev中文man

2011-08-23 18:05:21

ABORT中文man

2011-08-18 19:15:25

group中文man

2011-08-23 10:17:54

bdflush中文man

2011-08-23 10:48:03

exportfs中文man

2011-08-15 14:25:41

testparm中文man

2011-08-18 15:10:06

aliases中文man
点赞
收藏

51CTO技术栈公众号