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