Rev | Line | |
---|
[9] | 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.3s 6.3 (Berkeley) 5/14/86
|
---|
| 6 | .\"
|
---|
| 7 | .TH FERROR 3 "May 14, 1986"
|
---|
| 8 | .UC 4
|
---|
| 9 | .SH NAME
|
---|
| 10 | ferror, feof, clearerr, fileno \- stream status inquiries
|
---|
| 11 | .SH SYNOPSIS
|
---|
| 12 | .nf
|
---|
| 13 | .ft B
|
---|
| 14 | #include <stdio.h>
|
---|
| 15 |
|
---|
| 16 | int feof(FILE *\fIstream\fP)
|
---|
| 17 | int ferror(FILE *\fIstream\fP)
|
---|
| 18 | int clearerr(FILE *\fIstream\fP)
|
---|
| 19 | int fileno(FILE *\fIstream\fP)
|
---|
| 20 | .ft R
|
---|
| 21 | .fi
|
---|
| 22 | .SH DESCRIPTION
|
---|
| 23 | .B Feof
|
---|
| 24 | returns non-zero when end of file is read on the named input
|
---|
| 25 | .IR stream ,
|
---|
| 26 | otherwise zero.
|
---|
| 27 | Unless cleared by
|
---|
| 28 | .BR clearerr ,
|
---|
| 29 | the end-of-file indication lasts until
|
---|
| 30 | the stream is closed.
|
---|
| 31 | .PP
|
---|
| 32 | .B Ferror
|
---|
| 33 | returns non-zero when an error has occurred reading or writing
|
---|
| 34 | the named
|
---|
| 35 | .IR stream ,
|
---|
| 36 | otherwise zero.
|
---|
| 37 | Unless cleared by
|
---|
| 38 | .BR clearerr ,
|
---|
| 39 | the error indication lasts until
|
---|
| 40 | the stream is closed.
|
---|
| 41 | .PP
|
---|
| 42 | .B Clearerr
|
---|
| 43 | resets the error and end-of-file indicators on the named
|
---|
| 44 | .IR stream .
|
---|
| 45 | .PP
|
---|
| 46 | .B Fileno
|
---|
| 47 | returns the integer file descriptor
|
---|
| 48 | associated with the
|
---|
| 49 | .IR stream ,
|
---|
| 50 | see
|
---|
| 51 | .BR open (2).
|
---|
| 52 | .PP
|
---|
| 53 | Currently all of these functions
|
---|
| 54 | are implemented as macros;
|
---|
| 55 | they cannot be redeclared.
|
---|
| 56 | .SH "SEE ALSO"
|
---|
| 57 | .BR fopen (3),
|
---|
| 58 | .BR open (2).
|
---|
Note:
See
TracBrowser
for help on using the repository browser.