Commit | Line | Data |
---|---|---|
31c2cc46 KM |
1 | .\" Copyright (c) 1980 Regents of the University of California. |
2 | .\" All rights reserved. The Berkeley software License Agreement | |
3 | .\" specifies the terms and conditions for redistribution. | |
4 | .\" | |
12e29951 | 5 | .\" @(#)ferror.3 6.3 (Berkeley) %G% |
31c2cc46 | 6 | .\" |
5fe26733 | 7 | .TH FERROR 3S "" |
31c2cc46 KM |
8 | .UC 4 |
9 | .SH NAME | |
68b48c9d | 10 | ferror, feof, clearerr, fileno \- stream status inquiries |
31c2cc46 KM |
11 | .SH SYNOPSIS |
12 | .B #include <stdio.h> | |
13 | .PP | |
14 | .B feof(stream) | |
15 | .br | |
16 | .SM | |
17 | .B FILE | |
18 | .B *stream; | |
19 | .PP | |
20 | .B ferror(stream) | |
21 | .br | |
22 | .SM | |
23 | .B FILE | |
24 | .B *stream | |
25 | .PP | |
26 | .B clearerr(stream) | |
27 | .br | |
28 | .SM | |
29 | .B FILE | |
30 | .B *stream | |
31 | .PP | |
32 | .B fileno(stream) | |
33 | .br | |
34 | .SM | |
35 | .B FILE | |
36 | .B *stream; | |
37 | .SH DESCRIPTION | |
38 | .I Feof | |
39 | returns non-zero when end of file is read on the named input | |
68b48c9d | 40 | .IR stream , |
31c2cc46 | 41 | otherwise zero. |
12e29951 MK |
42 | Unless cleared by |
43 | .IR clearerr , | |
44 | the end-of-file indication lasts until | |
45 | the stream is closed. | |
31c2cc46 KM |
46 | .PP |
47 | .I Ferror | |
48 | returns non-zero when an error has occurred reading or writing | |
49 | the named | |
68b48c9d | 50 | .IR stream , |
31c2cc46 KM |
51 | otherwise zero. |
52 | Unless cleared by | |
68b48c9d | 53 | .IR clearerr , |
31c2cc46 KM |
54 | the error indication lasts until |
55 | the stream is closed. | |
56 | .PP | |
5fe26733 | 57 | .I Clearerr |
a40b6dc8 | 58 | resets the error and end-of-file indicators on the named |
68b48c9d | 59 | .IR stream . |
31c2cc46 KM |
60 | .PP |
61 | .I Fileno | |
62 | returns the integer file descriptor | |
63 | associated with the | |
68b48c9d | 64 | .IR stream , |
31c2cc46 | 65 | see |
12e29951 | 66 | .IR open (2). |
31c2cc46 | 67 | .PP |
12e29951 | 68 | Currently all of these functions |
31c2cc46 KM |
69 | are implemented as macros; |
70 | they cannot be redeclared. | |
71 | .SH "SEE ALSO" | |
68b48c9d KM |
72 | fopen(3S), |
73 | open(2) |