Bell 32V release
[unix-history] / usr / man / man3 / fclose.3s
CommitLineData
62dbe599
TL
1.TH FCLOSE 3S
2.SH NAME
3fclose, fflush \- close or flush a stream
4.SH SYNOPSIS
5.B #include <stdio.h>
6.PP
7.B fclose(stream)
8.br
9.SM
10.B FILE
11.B *stream;
12.PP
13.B fflush(stream)
14.br
15.SM
16.B FILE
17.B *stream;
18.SH DESCRIPTION
19.I Fclose
20causes any buffers for the named
21.I stream
22to be emptied, and the file to be closed.
23Buffers allocated by the standard input/output system
24are freed.
25.PP
26.I Fclose
27is performed automatically upon
28calling
29.IR exit (2).
30.PP
31.I Fflush
32causes any buffered data for the named output
33.I stream
34to be written to that file.
35The stream remains open.
36.SH "SEE ALSO"
37close(2),
38fopen(3),
39setbuf(3)
40.SH DIAGNOSTICS
41These routines return
42.SM
43.B EOF
44if
45.I stream
46is not associated with an output file, or
47if buffered data cannot be transferred to that file.