File:  [CSRG BSD Unix] / 43BSDReno / lib / libc / stdio / fclose.3
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 16:12:55 2018 UTC (8 years, 1 month ago) by root
Branches: MAIN, BSD
CVS tags: HEAD, BSD43reno
BSD 4.3reno

.\"	@(#)fclose.3	6.2 (Berkeley) 12/16/88
.\"
.TH FCLOSE 3S  "December 16, 1988"
.AT 3
.SH NAME
fclose, fflush \- close or flush a stream
.SH SYNOPSIS
.B #include <stdio.h>
.PP
.B fclose(stream)
.br
.SM
.B FILE
.B *stream;
.PP
.B fflush(stream)
.br
.SM
.B FILE
.B *stream;
.PP
.B fpurge(stream)
.br
.SM
.B FILE
.B *stream;
.SH DESCRIPTION
.I Fclose
causes any buffers for the named
.I stream
to be emptied, and the file to be closed.
Buffers allocated by the standard input/output system
are freed.
.PP
.I Fclose
is performed automatically upon
calling
.IR  exit (3).
.PP
.I Fflush
causes any buffered data for the named output
.I stream
to be written to that file.
The stream remains open.
.PP
.I Fpurge
causes any buffered data for the named
.I stream
to be lost.  The stream remains open.
.SH "SEE ALSO"
close(2), fopen(3), setbuf(3)
.SH DIAGNOSTICS
These routines return
.SM
.B EOF
if
.I stream
is not associated with an output file, or
if buffered data cannot be transferred to that file.

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.