FERROR(3) Linux Programmer’s Manual FERROR(
3)
NAME
clearerr, feof, ferror, leno - check and reset stream status
//检查和调整流状态
SYNOPSIS
#include <stdio.h>
void clearerr(FILE *stream);
int feof(FILE *stream);
int ferror(FILE *stream);
int leno(FILE *stream);
DESCRIPTION
The func2on clearerr() clears the end-of-le and error
indicators for the stream pointed to by stream.
//clearerr()函数清空文件结束位置和通过参数 stream 错误指向流。
The func2on feof() tests the end-of-le indicator for the
stream pointed to by stream, returning non-zero if it is set.
The end-of-le indicator can only be cleared by the func2on clearerr().
//feof()函数测试文件结束位置通过参数 stream 指向流标志,如果它被设置,返回非 0.
end-of-le 通过 clearerr()函数标志能被清除
The func2on 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() func2on.
//ferror()函数通过参数 stream 指向流测试错误,如果它被设置就返回非 0
错误标志仅能通过 clearerr()函数被设置
The func2on leno() examines the argument stream and
returns its integer descriptor.
//leno()函数检查参数流,返回其整数描述符
For non-locking counterparts, see unlocked_stdio(3).
ERRORS
These func2ons should not fail and do not set the external
variable errno. (However, in case leno() detects that its
argument is not a valid stream, it must return -1 and set
errno to EBADF.)
//这些函数不应该失败,不设置外部变量 errno,(然而,以防 leno()检测到它的参数不是
评论0
最新资源