fclose, fflush --
close or flush a stream
int fclose(FILE stream);
int fflush(FILE stream);
fclose causes any buffered data waiting to be written for the named
to be written out, and the
to be closed.
If the underlying file pointer is not already at end of file,
and the file is one capable of seeking,
the file pointer is adjusted so that the next operation on the
open file pointer deals with the byte after the last one read from or written to
the file being closed.
fclose is performed automatically for all open files on calling
If stream points to an output stream or an update stream on which the
most recent operation was not input, fflush causes any buffered data
waiting to be written for the named
to be written to that file.
Any unread data buffered in stream is discarded.
When calling fflush, if
is a null pointer, all files open for writing are flushed.
On successful completion these functions return a value of zero.
EOF is returned.
fclose and fflush
fail when the file is a regular file
and an attempt is made to write at or beyond the offset maximum
associated with the corresponding stream.
© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 25 April 2004