unixdev.net


Switch to SpeakEasy.net DSL

The Modular Manual Browser

Home Page
Manual: (SunOS-4.1.3)
Page:
Section:
Apropos / Subsearch:
optional field

FERROR(3V)                                                          FERROR(3V)



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

SYNOPSIS
       #include <&lt;stdio.h>&gt;

       ferror(stream)
       FILE *stream;

       feof(stream)
       FILE *stream;

       clearerr(stream)
       FILE *stream;

       fileno(stream)
       FILE *stream;

DESCRIPTION
       ferror()  returns  non-zero  when an error has occurred reading from or
       writing to the named stream, otherwise zero.  Unless cleared by  clear-
       err(), the error indication lasts until the stream is closed.

       feof()  returns  non-zero when EOF has previously been detected reading
       the named input stream, otherwise zero.  Unless cleared by  clearerr(),
       the EOF indication lasts until the stream is closed.

       clearerr()  resets  the  error indication and EOF indication to zero on
       the named stream.

       fileno() returns the integer file descriptor associated with the stream
       (see open(2V)).

SYSTEM V DESCRIPTION
       feof()  returns  non-zero when EOF has previously been detected reading
       the named input stream, otherwise zero.  Unless cleared by  clearerr(),
       the  EOF  indication  lasts until the stream is closed, however, opera-
       tions which attempt to read from the stream  will  ignore  the  current
       state  of the EOF indication and attempt to read from the file descrip-
       tor associated with the stream.

SEE ALSO
       open(2V), fopen(3V)

NOTES
       These functions are defined in the C library and are  also  defined  as
       macros in <&lt;stdio.h>&gt;.



                                5 October 1989                      FERROR(3V)