Rev | Line | |
---|
[9] | 1 | .\" @(#)fclose.3s 6.1 (Berkeley) 5/15/85
|
---|
| 2 | .\"
|
---|
| 3 | .TH FCLOSE 3 "May 15, 1985"
|
---|
| 4 | .AT 3
|
---|
| 5 | .SH NAME
|
---|
| 6 | fclose, fflush \- close or flush a stream
|
---|
| 7 | .SH SYNOPSIS
|
---|
| 8 | .nf
|
---|
| 9 | .ft B
|
---|
| 10 | #include <stdio.h>
|
---|
| 11 |
|
---|
| 12 | int fclose(FILE *\fIstream\fP)
|
---|
| 13 | int fflush(FILE *\fIstream\fP)
|
---|
| 14 | .ft R
|
---|
| 15 | .fi
|
---|
| 16 | .SH DESCRIPTION
|
---|
| 17 | .B Fclose
|
---|
| 18 | causes any buffers for the named
|
---|
| 19 | .I stream
|
---|
| 20 | to be emptied, and the file to be closed.
|
---|
| 21 | Buffers allocated by the standard input/output system
|
---|
| 22 | are freed.
|
---|
| 23 | .PP
|
---|
| 24 | .B Fclose
|
---|
| 25 | is performed automatically upon
|
---|
| 26 | calling
|
---|
| 27 | .BR exit (3).
|
---|
| 28 | .PP
|
---|
| 29 | .B Fflush
|
---|
| 30 | causes any buffered data for the named output
|
---|
| 31 | .I stream
|
---|
| 32 | to be written to that file.
|
---|
| 33 | The stream remains open.
|
---|
| 34 | .SH "SEE ALSO"
|
---|
| 35 | .BR close (2),
|
---|
| 36 | .BR fopen (3),
|
---|
| 37 | .BR setbuf (3).
|
---|
| 38 | .SH DIAGNOSTICS
|
---|
| 39 | These routines return
|
---|
| 40 | .SM
|
---|
| 41 | .B EOF
|
---|
| 42 | if
|
---|
| 43 | .I stream
|
---|
| 44 | is not associated with an output file, or
|
---|
| 45 | if buffered data cannot be transferred to that file.
|
---|
Note:
See
TracBrowser
for help on using the repository browser.