.TH FERROR 3S "19 January 1983" .UC 4 .SH NAME ferror, feof, clearerr, fileno \- stream status inquiries .SH SYNOPSIS .B #include .PP .B feof(stream) .br .SM .B FILE .B *stream; .PP .B ferror(stream) .br .SM .B FILE .B *stream .PP .B clearerr(stream) .br .SM .B FILE .B *stream .PP .B fileno(stream) .br .SM .B FILE .B *stream; .SH DESCRIPTION .I Feof returns non-zero when end of file is read on the named input .IR stream , otherwise zero. .PP .I Ferror returns non-zero when an error has occurred reading or writing the named .IR stream , otherwise zero. Unless cleared by .IR clearerr , the error indication lasts until the stream is closed. .PP .I Clrerr resets the error indication on the named .IR stream . .PP .I Fileno returns the integer file descriptor associated with the .IR stream , see .IR open (2). .PP These functions are implemented as macros; they cannot be redeclared. .SH "SEE ALSO" fopen(3S), open(2)