I added code to implement the -r option. -rpc
[unix-history] / usr / src / lib / libc / stdio / ferror.3
CommitLineData
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.\"
86198885 5.\" @(#)ferror.3 6.4 (Berkeley) %G%
31c2cc46 6.\"
86198885 7.TH FERROR 3 ""
31c2cc46
KM
8.UC 4
9.SH NAME
68b48c9d 10ferror, 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
39returns non-zero when end of file is read on the named input
68b48c9d 40.IR stream ,
31c2cc46 41otherwise zero.
12e29951
MK
42Unless cleared by
43.IR clearerr ,
44the end-of-file indication lasts until
45the stream is closed.
31c2cc46
KM
46.PP
47.I Ferror
48returns non-zero when an error has occurred reading or writing
49the named
68b48c9d 50.IR stream ,
31c2cc46
KM
51otherwise zero.
52Unless cleared by
68b48c9d 53.IR clearerr ,
31c2cc46
KM
54the error indication lasts until
55the stream is closed.
56.PP
5fe26733 57.I Clearerr
a40b6dc8 58resets the error and end-of-file indicators on the named
68b48c9d 59.IR stream .
31c2cc46
KM
60.PP
61.I Fileno
62returns the integer file descriptor
63associated with the
68b48c9d 64.IR stream ,
31c2cc46 65see
12e29951 66.IR open (2).
31c2cc46 67.PP
12e29951 68Currently all of these functions
31c2cc46
KM
69are implemented as macros;
70they cannot be redeclared.
71.SH "SEE ALSO"
86198885 72open(2), fopen(3)