ferror(3S)ferror(3S)NAMEferror(), feof(), clearerr(), ferror_unlocked(), feof_unlocked(),
clearerr_unlocked() - stream status inquiries
Returns nonzero when an I/O error
has previously occurred reading from or writing to the
named stream, otherwise zero. Unless cleared by or
unless the specific stdio routine so indicates, the
error indication lasts until the stream is closed.
when EOF has previously been detected reading the named
input stream, otherwise zero.
Resets the error indicator and EOF indicator on the named
stream to zero.
and stream status inquiries.
All these routines are implemented both as library functions and as
macros. The macro versions, which are used by default, are defined in
To obtain the library function, either use a to remove the macro defi‐
nition or, if compiling in ANSI-C mode, enclose the function name in
parentheses or use the function address. The following example illus‐
trates each of these methods :
If is defined before including the locked versions of the library func‐
tions for and are used by default.
and are obsolescent interfaces supported only for compatibility with
existing DCE applications. New multithreaded applications should use
SEE ALSOopen(2), flockfile(3S), fopen(3S), thread_safety(5).