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 13:58:08

bind中文man

2011-08-25 18:34:55

ungetc中文man

2011-08-19 18:25:49

inittab中文man

2011-08-25 17:20:37

putchar中文man

2011-08-16 09:56:22

groupdel中文man

2011-08-23 16:56:57

swapon中文man

2011-08-23 10:34:22

convertquot中文man

2011-08-23 10:21:40

blockdev中文man

2011-08-24 15:08:18

EXECUTE中文man

2011-08-15 11:15:06

newgrp中文man

2011-08-24 09:54:45

ANALYZE中文man

2011-08-24 15:29:06

grant中文man

2011-08-16 09:19:05

rmt中文man

2011-08-15 10:04:26

mail中文man

2011-08-23 15:27:21

route中文man

2011-08-29 10:39:12

fifo中文man
点赞
收藏

51CTO技术栈公众号