ferror(3s)
NAME
ferror, feof, clearerr, fileno − stream status inquiries
SYNTAX
#include <stdio.h>
feof(stream)
FILE *stream;
ferror(stream)
FILE *stream
clearerr(stream)
FILE *stream
fileno(stream)
FILE *stream;
DESCRIPTION
The ferror function returns non-zero when an error has occurred reading or writing the named stream, otherwise zero. Unless cleared by clearerr, the error indication lasts until the stream is closed.
The feof function returns non-zero when end of file is read on the named input stream, otherwise zero.
The clearerr function resets the error indication on the named stream.
The fileno function returns the integer file descriptor associated with the stream, see open(2).
These functions are implemented as macros; they cannot be redeclared.