1FERROR(3)                  Linux Programmer's Manual                 FERROR(3)
2
3
4

NAME

6       clearerr, feof, ferror, fileno - check and reset stream status
7

SYNOPSIS

9       #include <stdio.h>
10
11       void clearerr(FILE *stream);
12       int feof(FILE *stream);
13       int ferror(FILE *stream);
14       int fileno(FILE *stream);
15

DESCRIPTION

17       The function clearerr() clears the end-of-file and error indicators for
18       the stream pointed to by stream.
19
20       The function feof() tests the  end-of-file  indicator  for  the  stream
21       pointed to by stream, returning non-zero if it is set.  The end-of-file
22       indicator can only be cleared by the function clearerr().
23
24       The function ferror() tests the error indicator for the stream  pointed
25       to by stream, returning non-zero if it is set.  The error indicator can
26       only be reset by the clearerr() function.
27
28       The function fileno() examines the  argument  stream  and  returns  its
29       integer descriptor.
30
31       For non-locking counterparts, see unlocked_stdio(3).
32

ERRORS

34       These  functions  should  not fail and do not set the external variable
35       errno.  (However, in case fileno() detects that its argument is  not  a
36       valid stream, it must return -1 and set errno to EBADF.)
37

CONFORMING TO

39       The functions clearerr(), feof(), and ferror() conform to C89 and C99.
40

SEE ALSO

42       open(2), fdopen(3), stdio(3), unlocked_stdio(3)
43
44
45
46                                  2001-10-16                         FERROR(3)
Impressum