Loading...
--- Libc/Libc-1725.40.4/stdio/FreeBSD/fflush.3
+++ Libc/Libc-583/stdio/FreeBSD/fflush.3
@@ -13,6 +13,10 @@
.\" 2. Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in the
.\" documentation and/or other materials provided with the distribution.
+.\" 3. All advertising materials mentioning features or use of this software
+.\" must display the following acknowledgement:
+.\" This product includes software developed by the University of
+.\" California, Berkeley and its contributors.
.\" 4. Neither the name of the University nor the names of its contributors
.\" may be used to endorse or promote products derived from this software
.\" without specific prior written permission.
@@ -30,9 +34,9 @@
.\" SUCH DAMAGE.
.\"
.\" @(#)fflush.3 8.1 (Berkeley) 6/4/93
-.\" $FreeBSD: src/lib/libc/stdio/fflush.3,v 1.11 2007/01/09 00:28:06 imp Exp $
+.\" $FreeBSD: src/lib/libc/stdio/fflush.3,v 1.10 2003/06/08 10:01:52 charnier Exp $
.\"
-.Dd August 1, 2019
+.Dd June 4, 1993
.Dt FFLUSH 3
.Os
.Sh NAME
@@ -50,13 +54,9 @@
.Sh DESCRIPTION
The function
.Fn fflush
-synchronizes the state of the given
+forces a write of all buffered data for the given output or update
.Fa stream
-in light of buffered I/O.
-For output or update streams it writes all buffered data via the stream's
-underlying write function.
-For input streams it seeks to the current file position indicator via the
-stream's underlying seek function.
+via the stream's underlying write function.
The open status of the stream is unaffected.
.Pp
If the
@@ -66,7 +66,7 @@
.Fn fflush
flushes
.Em all
-open streams.
+open output streams.
.Pp
The function
.Fn fpurge
@@ -91,28 +91,25 @@
The
.Fa stream
argument
-is not an open stream.
+is not an open stream, or, in the case of
+.Fn fflush ,
+not a stream open for writing.
.El
.Pp
The function
.Fn fflush
may also fail and set
.Va errno
-for any of the errors specified for the routines
-.Xr write 2
-and
-.Xr lseek 2 .
+for any of the errors specified for the routine
+.Xr write 2 .
.Sh SEE ALSO
.Xr write 2 ,
.Xr fclose 3 ,
.Xr fopen 3 ,
-.Xr lseek 2 ,
.Xr setbuf 3
.Sh STANDARDS
The
.Fn fflush
function
conforms to
-.St -isoC
-and
-.St -susv3 .
+.St -isoC .