1ferror(3C)               Standard C Library Functions               ferror(3C)
2
3
4

NAME

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

SYNOPSIS

9       #include <stdio.h>
10
11       int ferror(FILE *stream);
12
13
14       int feof(FILE *stream);
15
16
17       void clearerr(FILE *stream);
18
19
20       int fileno(FILE *stream);
21
22

DESCRIPTION

24       The ferror() function returns a non-zero value when an error has previ‐
25       ously occurred reading  from  or  writing  to  the  named  stream  (see
26       Intro(3)). It returns 0 otherwise.
27
28
29       The  feof()  function  returns a non-zero value when EOF has previously
30       been detected reading the named input stream. It returns 0 otherwise.
31
32
33       The clearerr() function resets the error indicator and EOF indicator to
34       0 on the named stream.
35
36
37       The  fileno()  function  returns the integer file descriptor associated
38       with the named stream; see open(2).
39

ATTRIBUTES

41       See attributes(5) for descriptions of the following attributes:
42
43
44
45
46       ┌─────────────────────────────┬─────────────────────────────┐
47       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
48       ├─────────────────────────────┼─────────────────────────────┤
49       │Interface Stability          │Standard                     │
50       ├─────────────────────────────┼─────────────────────────────┤
51       │MT-Level                     │MT-Safe                      │
52       └─────────────────────────────┴─────────────────────────────┘
53

SEE ALSO

55       open(2), Intro(3), fopen(3C), stdio(3C), attributes(5), standards(5)
56
57
58
59SunOS 5.11                        17 Feb 2005                       ferror(3C)
Impressum