DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

ferror(S-osr5)


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-osr5).

Notes

All these functions are implemented as macros; they cannot be declared or redeclared.

See also

fopen(S-osr5), open(S-osr5), stdio(S-osr5)

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 .


© 2005 The SCO Group, Inc. All rights reserved.
SCO OpenServer Release 6.0.0 -- 02 June 2005