libc.info: ferror

Go forward to fflush
Go backward to feof
Go up to Stdio
Go to the top op libc

`ferror'--test whether read/write error has occurred

*Synopsis*
     #include <stdio.h>
     int ferror(FILE *FP);
   *Description*
The `stdio' functions maintain an error indicator with each file
pointer FP, to record whether any read or write errors have occurred on
the associated file or stream.  Use `ferror' to query this indicator.
   See `clearerr' to reset the error indicator.
*Returns*
`ferror' returns `0' if no errors have occurred; it returns a nonzero
value otherwise.
*Portability*
ANSI C requires `ferror'.
   No supporting OS subroutines are required.