BSD 3 development
[unix-history] / usr / man / man3 / ferror.3s
CommitLineData
e6817382
BJ
1.TH FERROR 3S
2.SH NAME
3feof, 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
32returns non-zero when end of file is read on the named input
33.I stream,
34otherwise zero.
35.PP
36.I Ferror
37returns non-zero when an error has occurred reading or writing
38the named
39.I stream,
40otherwise zero.
41Unless cleared by
42.I clearerr,
43the error indication lasts until
44the stream is closed.
45.PP
46.I Clrerr
47resets the error indication on the named
48.I stream.
49.PP
50.I Fileno
51returns the integer file descriptor
52associated with the
53.I stream,
54see
55.IR open (2).
56.PP
57These functions
58are implemented as macros;
59they cannot be redeclared.
60.SH "SEE ALSO"
61fopen(3), open(2)