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
13       int feof(FILE *stream);
14
15       int ferror(FILE *stream);
16
17       int fileno(FILE *stream);
18
19   Feature Test Macro Requirements for glibc (see feature_test_macros(7)):
20
21       fileno(): _POSIX_C_SOURCE >= 1 || _XOPEN_SOURCE || _POSIX_SOURCE
22

DESCRIPTION

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

ERRORS

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

CONFORMING TO

46       The functions clearerr(), feof(), and ferror() conform to C89 and C99.
47

SEE ALSO

49       open(2), fdopen(3), stdio(3), unlocked_stdio(3)
50

COLOPHON

52       This  page  is  part of release 3.22 of the Linux man-pages project.  A
53       description of the project, and information about reporting  bugs,  can
54       be found at http://www.kernel.org/doc/man-pages/.
55
56
57
58                                  2008-08-29                         FERROR(3)
Impressum