view docs/ccguide/feof.refentry @ 1331:0a3500c747de

Fixed ANOTHER bug
author boisy
date Sun, 07 Sep 2003 00:53:51 +0000
parents c0da1728ed5b
children
line wrap: on
line source

<refentry id="feof">
<refnamediv>
<refname>Feof</refname>
<refname>Ferror</refname>
<refname>Clearerr</refname>
<refname>Fileno</refname>
<refpurpose>return status information of files</refpurpose>
</refnamediv>

<refsynopsisdiv>
<funcsynopsis>
<funcsynopsisinfo>
#include &lt;stdio.h&gt;
</funcsynopsisinfo>
<funcprototype>
  <funcdef><function>feof</function></funcdef>
  <paramdef>FILE *<parameter>fp</parameter></paramdef>
</funcprototype>

<funcprototype>
  <funcdef><function>ferror</function></funcdef>
  <paramdef>FILE *<parameter>fp</parameter></paramdef>
</funcprototype>

<funcprototype>
  <funcdef><function>clearerr</function></funcdef>
  <paramdef>FILE *<parameter>fp</parameter></paramdef>
</funcprototype>

<funcprototype>
  <funcdef><function>fileno</function></funcdef>
  <paramdef>FILE *<parameter>fp</parameter></paramdef>
</funcprototype>
</funcsynopsis>

</refsynopsisdiv>

<refsect1><title>Description</title>
<para>
Feof returns non-zero if the file associated with "fp" has
reached its end. Zero is returned on error.
</para>
<para>
Ferror returns non-zero if an error condition occurs on access
to the file "fp"; zero is returned otherwise. The error
condition persists, preventing further access to the file by
other Standard Library functions, until the file is closed,
or it is cleared by clearerr.
</para>
<para>
Clearerr resets the error condition on the file "fp". This
does NOT "fix" the file or prevent the error from occurring
again; it merely allows Standard Library functions at least to
try.
</para>
</refsect1>

<refsect1><title>Caveats</title>
<para>
These functions are actually macros that are defined in
"&lt;stdio.h&gt;" so their names cannot be redeclared.
</para>
</refsect1>

<refsect1><title>See Also</title>
<para>
System call
<link linkend="open">open()</link>,
<link linkend="fopen">fopen()</link>.
</para>
</refsect1>

</refentry>