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 nonzero 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 nonzero when end of file is read on the named input stream, otherwise zero.
The clearerr function resets both the error and EOF indicators on the named stream.
The fileno function returns the integer file descriptor associated with the stream, see open(.).
These functions are implemented as macros; they cannot be redeclared.