Commit | Line | Data |
---|---|---|
e6817382 BJ |
1 | .TH FERROR 3S |
2 | .SH NAME | |
3 | feof, ferror, clearerr, fileno \- stream status inquiries | |
4 | .SH SYNOPSIS | |
5 | .B #include <stdio.h> | |
6 | .PP | |
7 | .B feof(stream) | |
8 | .br | |
9 | .SM | |
10 | .B FILE | |
11 | .B *stream; | |
12 | .PP | |
13 | .B ferror(stream) | |
14 | .br | |
15 | .SM | |
16 | .B FILE | |
17 | .B *stream | |
18 | .PP | |
19 | .B clearerr(stream) | |
20 | .br | |
21 | .SM | |
22 | .B FILE | |
23 | .B *stream | |
24 | .PP | |
25 | .B fileno(stream) | |
26 | .br | |
27 | .SM | |
28 | .B FILE | |
29 | .B *stream; | |
30 | .SH DESCRIPTION | |
31 | .I Feof | |
32 | returns non-zero when end of file is read on the named input | |
33 | .I stream, | |
34 | otherwise zero. | |
35 | .PP | |
36 | .I Ferror | |
37 | returns non-zero when an error has occurred reading or writing | |
38 | the named | |
39 | .I stream, | |
40 | otherwise zero. | |
41 | Unless cleared by | |
42 | .I clearerr, | |
43 | the error indication lasts until | |
44 | the stream is closed. | |
45 | .PP | |
46 | .I Clrerr | |
47 | resets the error indication on the named | |
48 | .I stream. | |
49 | .PP | |
50 | .I Fileno | |
51 | returns the integer file descriptor | |
52 | associated with the | |
53 | .I stream, | |
54 | see | |
55 | .IR open (2). | |
56 | .PP | |
57 | These functions | |
58 | are implemented as macros; | |
59 | they cannot be redeclared. | |
60 | .SH "SEE ALSO" | |
61 | fopen(3), open(2) |