70 lines
1.8 KiB
HTML
70 lines
1.8 KiB
HTML
<HTML>
|
|
<HEAD>
|
|
<TITLE>ferror(3)</TITLE>
|
|
</HEAD>
|
|
<BODY>
|
|
<H1>ferror(3)</H1>
|
|
<HR>
|
|
<PRE>
|
|
|
|
</PRE>
|
|
<H2>NAME</H2><PRE>
|
|
ferror, feof, clearerr, fileno - stream status inquiries
|
|
|
|
|
|
</PRE>
|
|
<H2>SYNOPSIS</H2><PRE>
|
|
<STRONG>#include</STRONG> <STRONG><stdio.h></STRONG>
|
|
|
|
<STRONG>int</STRONG> <STRONG>feof(FILE</STRONG> <STRONG>*</STRONG><EM>stream</EM><STRONG>)</STRONG>
|
|
<STRONG>int</STRONG> <STRONG>ferror(FILE</STRONG> <STRONG>*</STRONG><EM>stream</EM><STRONG>)</STRONG>
|
|
<STRONG>int</STRONG> <STRONG>clearerr(FILE</STRONG> <STRONG>*</STRONG><EM>stream</EM><STRONG>)</STRONG>
|
|
<STRONG>int</STRONG> <STRONG>fileno(FILE</STRONG> <STRONG>*</STRONG><EM>stream</EM><STRONG>)</STRONG>
|
|
|
|
|
|
</PRE>
|
|
<H2>DESCRIPTION</H2><PRE>
|
|
<STRONG>Feof</STRONG> returns non-zero when end of file is read on the named input <EM>stream</EM>,
|
|
otherwise zero. Unless cleared by <STRONG>clearerr</STRONG>, the end-of-file indication
|
|
lasts until the stream is closed.
|
|
|
|
<STRONG>Ferror</STRONG> returns non-zero when an error has occurred reading or writing the
|
|
named <EM>stream</EM>, otherwise zero. Unless cleared by <STRONG>clearerr</STRONG>, the error
|
|
indication lasts until the stream is closed.
|
|
|
|
<STRONG>Clearerr</STRONG> resets the error and end-of-file indicators on the named <EM>stream</EM>.
|
|
|
|
<STRONG>Fileno</STRONG> returns the integer file descriptor associated with the <EM>stream</EM>,
|
|
see <STRONG><A HREF="../man2/open.2.html">open(2)</A></STRONG>.
|
|
|
|
Currently all of these functions are implemented as macros; they cannot
|
|
be redeclared.
|
|
|
|
|
|
</PRE>
|
|
<H2>SEE ALSO</H2><PRE>
|
|
<STRONG><A HREF="../man3/fopen.3.html">fopen(3)</A></STRONG>, <STRONG><A HREF="../man2/open.2.html">open(2)</A></STRONG>.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</PRE>
|
|
</BODY>
|
|
</HTML>
|