unixdev.net


Switch to SpeakEasy.net DSL

The Modular Manual Browser

Home Page
Manual: (4.2BSD)
Page:
Section:
Apropos / Subsearch:
optional field

FCLOSE(3S)                                                          FCLOSE(3S)



NAME
       fclose, fflush - close or flush a stream

SYNOPSIS
       #include <&lt;stdio.h>&gt;

       fclose(stream)
       FILE *stream;

       fflush(stream)
       FILE *stream;

DESCRIPTION
       Fclose  causes  any buffers for the named stream to be emptied, and the
       file to be closed.  Buffers allocated by the standard input/output sys-
       tem are freed.

       Fclose is performed automatically upon calling exit(3).

       Fflush causes any buffered data for the named output stream to be writ-
       ten to that file.  The stream remains open.

SEE ALSO
       close(2), fopen(3S), setbuf(3S)

DIAGNOSTICS
       These routines return EOF if stream is not associated  with  an  output
       file, or if buffered data cannot be transferred to that file.



                                19 January 1983                     FCLOSE(3S)