466
|
1 <refentry id="feof">
|
|
2 <refnamediv>
|
570
|
3 <refname>Feof</refname>
|
|
4 <refname>Ferror</refname>
|
|
5 <refname>Clearerr</refname>
|
|
6 <refname>Fileno</refname>
|
|
7 <refpurpose>return status information of files</refpurpose>
|
466
|
8 </refnamediv>
|
|
9
|
|
10 <refsynopsisdiv>
|
|
11 <funcsynopsis>
|
468
|
12 <funcsynopsisinfo>
|
|
13 #include <stdio.h>
|
|
14 </funcsynopsisinfo>
|
466
|
15 <funcprototype>
|
|
16 <funcdef><function>feof</function></funcdef>
|
570
|
17 <paramdef>FILE *<parameter>fp</parameter></paramdef>
|
|
18 </funcprototype>
|
|
19
|
|
20 <funcprototype>
|
|
21 <funcdef><function>ferror</function></funcdef>
|
|
22 <paramdef>FILE *<parameter>fp</parameter></paramdef>
|
|
23 </funcprototype>
|
|
24
|
|
25 <funcprototype>
|
|
26 <funcdef><function>clearerr</function></funcdef>
|
|
27 <paramdef>FILE *<parameter>fp</parameter></paramdef>
|
|
28 </funcprototype>
|
|
29
|
|
30 <funcprototype>
|
|
31 <funcdef><function>fileno</function></funcdef>
|
|
32 <paramdef>FILE *<parameter>fp</parameter></paramdef>
|
466
|
33 </funcprototype>
|
|
34 </funcsynopsis>
|
|
35
|
|
36 </refsynopsisdiv>
|
|
37
|
|
38 <refsect1><title>Description</title>
|
|
39 <para>
|
594
|
40 Feof returns non-zero if the file associated with "fp" has
|
|
41 reached its end. Zero is returned on error.
|
|
42 </para>
|
|
43 <para>
|
|
44 Ferror returns non-zero if an error condition occurs on access
|
|
45 to the file "fp"; zero is returned otherwise. The error
|
|
46 condition persists, preventing further access to the file by
|
|
47 other Standard Library functions, until the file is closed,
|
|
48 or it is cleared by clearerr.
|
|
49 </para>
|
|
50 <para>
|
|
51 Clearerr resets the error condition on the file "fp". This
|
|
52 does NOT "fix" the file or prevent the error from occurring
|
|
53 again; it merely allows Standard Library functions at least to
|
|
54 try.
|
|
55 </para>
|
|
56 </refsect1>
|
|
57
|
|
58 <refsect1><title>Caveats</title>
|
|
59 <para>
|
|
60 These functions are actually macros that are defined in
|
|
61 "<stdio.h>" so their names cannot be redeclared.
|
466
|
62 </para>
|
|
63 </refsect1>
|
542
|
64
|
|
65 <refsect1><title>See Also</title>
|
|
66 <para>
|
|
67 System call
|
|
68 <link linkend="open">open()</link>,
|
|
69 <link linkend="fopen">fopen()</link>.
|
|
70 </para>
|
|
71 </refsect1>
|
|
72
|
466
|
73 </refentry>
|