DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH
 

ferror(S)


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:

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:

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 .


© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003