ferror(3S)


ferror, feof, clearerr, fileno -- stream status inquiries

Synopsis

   #include <stdio.h> 
   

int ferror(FILE *stream);

int feof(FILE *stream);

void clearerr(FILE *stream);

int fileno(FILE *stream);

Description

ferror returns non-zero when an I/O error has previously occurred reading from or writing to the named stream (see intro(3)), otherwise zero.

feof returns non-zero when EOF has previously been detected reading 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(2)].

References

fopen(3S), open(2), Intro(3S)
30 January 1998
© 1998 The Santa Cruz Operation, Inc. All rights reserved.