Files
oldlinux-files/Minix/2.0.0/wwwman/man3/fclose.3.html
2024-02-19 00:21:39 -05:00

72 lines
1.4 KiB
HTML

<HTML>
<HEAD>
<TITLE>fclose(3)</TITLE>
</HEAD>
<BODY>
<H1>fclose(3)</H1>
<HR>
<PRE>
</PRE>
<H2>NAME</H2><PRE>
fclose, fflush - close or flush a stream
</PRE>
<H2>SYNOPSIS</H2><PRE>
<STRONG>#include</STRONG> <STRONG>&lt;stdio.h&gt;</STRONG>
<STRONG>int</STRONG> <STRONG>fclose(FILE</STRONG> <STRONG>*</STRONG><EM>stream</EM><STRONG>)</STRONG>
<STRONG>int</STRONG> <STRONG>fflush(FILE</STRONG> <STRONG>*</STRONG><EM>stream</EM><STRONG>)</STRONG>
</PRE>
<H2>DESCRIPTION</H2><PRE>
<STRONG>Fclose</STRONG> causes any buffers for the named <EM>stream</EM> to be emptied, and the
file to be closed. Buffers allocated by the standard input/output system
are freed.
<STRONG>Fclose</STRONG> is performed automatically upon calling <STRONG><A HREF="../man3/exit.3.html">exit(3)</A></STRONG>.
<STRONG>Fflush</STRONG> causes any buffered data for the named output <EM>stream</EM> to be written
to that file. The stream remains open.
</PRE>
<H2>SEE ALSO</H2><PRE>
<STRONG><A HREF="../man2/close.2.html">close(2)</A></STRONG>, <STRONG><A HREF="../man3/fopen.3.html">fopen(3)</A></STRONG>, <STRONG><A HREF="../man3/setbuf.3.html">setbuf(3)</A></STRONG>.
</PRE>
<H2>DIAGNOSTICS</H2><PRE>
These routines return <STRONG>EOF</STRONG> if <EM>stream</EM> is not associated with an output
file, or if buffered data cannot be transferred to that file.
</PRE>
</BODY>
</HTML>