view docs/ccguide/feof.refentry @ 2772:0a3f4d8ea6d5

Found ENDC in wrong location in dwread.asm and dwwrite.asm. Corrected. Moved the native 6309 code in dwread.asm and dwwrite.asm into the H6309 labeled area and changed IFEQ H6309 to IFNE H6309. Also moved the 57600bps 6809 code to the default location. This change had been done in the old dwread.asm and dwwrite.asm files to make it easier to follow. Though these two files were overwritten from the HDBDOS project dwread.asm and dwwrite.asm files. So this conversion needed to be done again so it made the source easier to follow.
author drencor-xeen
date Wed, 23 Jan 2013 12:36:55 -0600
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>