ferror(S) 6 January 1993 ferror(S) Name ferror, feof, clearerr, fileno - stream status inquiries Syntax #include <stdio.h> int ferror (stream) FILE *stream; int feof (stream) FILE *stream; void clearerr (stream) FILE *stream; int fileno (stream) FILE *stream; Description The ferror function returns non-zero when an I/O error occurred reading from or writing to the named stream, otherwise zero. feof returns non-zero when EOF previously read the named input stream, otherwise zero. clearerr resets the error indicator and EOF indicator to zero on the named stream. fileno returns the integer file descriptor associated with the named stream; see open(S). Notes All these functions are implemented as macros; they cannot be declared or redeclared. See also fopen(S), open(S), stdio(S) Standards conformance clearerr, feof and ferror are conformant with: AT&T SVID Issue 2; X/Open Portability Guide, Issue 3, 1989; ANSI X3.159-1989 Programming Language -- C; IEEE POSIX Std 1003.1-1990 System Application Program Interface (API) [C Language] (ISO/IEC 9945-1); and NIST FIPS 151-1. fileno is conformant with: AT&T SVID Issue 2; X/Open Portability Guide, Issue 3, 1989; IEEE POSIX Std 1003.1-1990 System Application Program Interface (API) [C Language] (ISO/IEC 9945-1); and NIST FIPS 151-1.