FERROR

Section: Linux Programmer's Manual (3)
Updated: 2001-10-16
Index

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)

[中文版维护人]

徐明 Email: xuming@users.sourceforge.net

[中文版最新更新]

2004/08/20 第一版

《中国Linux论坛man手册页翻译计划》

http://cmpp.linuxforum.net


Index

NAME
总览 (SYNOPSIS)
描述 (DESCRIPTION)
错误 (ERRORS)
遵循 (CONFORMING TO)
另见 (SEE ALSO)
[中文版维护人]
[中文版最新更新]
《中国Linux论坛man手册页翻译计划》

This document was created by man2html, using the manual pages.
Time: 01:46:58 GMT, August 26, 2004