ferror(3S) ferror(3S)
NAME
ferror(), feof(), clearerr(), ferror_unlocked(), feof_unlocked(), clearerr_unlocked() - stream status inquiries
SYNOPSIS
Obsolescent Interfaces
DESCRIPTION
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 spe-
cific stdio routine so indicates, the error indication lasts until the stream is closed.
Returns nonzero
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.
Obsolescent Interfaces
and stream status inquiries.
WARNINGS
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 definition or, if compiling in ANSI-C mode, enclose the function name in
parentheses or use the function address. The following example illustrates each of these methods :
Reentrant Interfaces
If is defined before including the locked versions of the library functions for and are used by default.
and are obsolescent interfaces supported only for compatibility with existing DCE applications. New multithreaded applications should use
and
SEE ALSO
open(2), flockfile(3S), fopen(3S), thread_safety(5).
STANDARDS CONFORMANCE
ferror(3S)