|
|
1.1 ! root 1: .\" @(#)fclose.3 6.2 (Berkeley) 12/16/88 ! 2: .\" ! 3: .TH FCLOSE 3S "December 16, 1988" ! 4: .AT 3 ! 5: .SH NAME ! 6: fclose, fflush \- close or flush a stream ! 7: .SH SYNOPSIS ! 8: .B #include <stdio.h> ! 9: .PP ! 10: .B fclose(stream) ! 11: .br ! 12: .SM ! 13: .B FILE ! 14: .B *stream; ! 15: .PP ! 16: .B fflush(stream) ! 17: .br ! 18: .SM ! 19: .B FILE ! 20: .B *stream; ! 21: .PP ! 22: .B fpurge(stream) ! 23: .br ! 24: .SM ! 25: .B FILE ! 26: .B *stream; ! 27: .SH DESCRIPTION ! 28: .I Fclose ! 29: causes any buffers for the named ! 30: .I stream ! 31: to be emptied, and the file to be closed. ! 32: Buffers allocated by the standard input/output system ! 33: are freed. ! 34: .PP ! 35: .I Fclose ! 36: is performed automatically upon ! 37: calling ! 38: .IR exit (3). ! 39: .PP ! 40: .I Fflush ! 41: causes any buffered data for the named output ! 42: .I stream ! 43: to be written to that file. ! 44: The stream remains open. ! 45: .PP ! 46: .I Fpurge ! 47: causes any buffered data for the named ! 48: .I stream ! 49: to be lost. The stream remains open. ! 50: .SH "SEE ALSO" ! 51: close(2), fopen(3), setbuf(3) ! 52: .SH DIAGNOSTICS ! 53: These routines return ! 54: .SM ! 55: .B EOF ! 56: if ! 57: .I stream ! 58: is not associated with an output file, or ! 59: if buffered data cannot be transferred to that file.
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.