Commit | Line | Data |
---|---|---|
639aed4c KB |
1 | .\" Copyright (c) 1990 The Regents of the University of California. |
2 | .\" All rights reserved. | |
31c2cc46 | 3 | .\" |
639aed4c KB |
4 | .\" This code is derived from software contributed to Berkeley by |
5 | .\" Chris Torek. | |
31c2cc46 | 6 | .\" |
639aed4c KB |
7 | .\" %sccs.include.redist.man% |
8 | .\" | |
c07f2720 | 9 | .\" @(#)ferror.3 6.6 (Berkeley) %G% |
639aed4c KB |
10 | .\" |
11 | .TH FERROR 3 "" | |
12 | .UC 7 | |
31c2cc46 | 13 | .SH NAME |
639aed4c | 14 | clearerr, feof, ferror, fileno \- stream status inquiries |
31c2cc46 | 15 | .SH SYNOPSIS |
639aed4c KB |
16 | .nf |
17 | .ft B | |
18 | #include <stdio.h> | |
19 | ||
20 | void | |
21 | clearerr(FILE *stream); | |
22 | ||
23 | int | |
24 | feof(FILE *stream); | |
25 | ||
26 | int | |
27 | ferror(FILE *stream); | |
28 | ||
29 | int | |
30 | fileno(FILE *stream); | |
31 | .ft R | |
32 | .fi | |
31c2cc46 | 33 | .SH DESCRIPTION |
639aed4c KB |
34 | .I Clearerr |
35 | clears the end-of-file and error indicators for the stream pointed | |
36 | to by | |
37 | .IR stream . | |
38 | .PP | |
31c2cc46 | 39 | .I Feof |
639aed4c | 40 | tests the end-of-file indicator for the stream pointed to by |
68b48c9d | 41 | .IR stream , |
639aed4c KB |
42 | returning non-zero if it is set. |
43 | The end-of-file indicator can only be cleared by | |
44 | .IR clearerr . | |
31c2cc46 KM |
45 | .PP |
46 | .I Ferror | |
639aed4c | 47 | tests the error indicator for the stream pointed to by |
68b48c9d | 48 | .IR stream , |
639aed4c KB |
49 | returning non-zero if it is set. |
50 | The error indicator can only be cleared by | |
51 | .IR clearerr . | |
31c2cc46 KM |
52 | .PP |
53 | .I Fileno | |
639aed4c KB |
54 | returns the integer file descriptor associated with the |
55 | .I stream | |
56 | (see | |
57 | .IR open (2)). | |
c07f2720 KB |
58 | .SH ERRORS |
59 | These functions should not fail and do not set the external | |
60 | variable | |
61 | .IR errno . | |
31c2cc46 | 62 | .SH "SEE ALSO" |
639aed4c KB |
63 | open(2), stdio(3) |
64 | .SH STANDARDS | |
65 | .IR Clearerr , | |
66 | .IR feof , | |
67 | and | |
68 | .I ferror | |
69 | conform to ANSI X3.159-1989 (``ANSI C''). |