BSD 4_3_Reno release
[unix-history] / usr / src / lib / libc / stdio / setbuf.3
index 56eadef..c11bd1d 100644 (file)
@@ -2,9 +2,9 @@
 .\" All rights reserved.  The Berkeley software License Agreement
 .\" specifies the terms and conditions for redistribution.
 .\"
 .\" All rights reserved.  The Berkeley software License Agreement
 .\" specifies the terms and conditions for redistribution.
 .\"
-.\"    @(#)setbuf.3    5.1 (Berkeley) %G%
+.\"    @(#)setbuf.3    6.4 (Berkeley) 4/1/89
 .\"
 .\"
-.TH SETBUF 3S  "19 January 1983"
+.TH SETBUF 3  "April 1, 1989"
 .UC 4
 .SH NAME
 setbuf, setbuffer, setlinebuf \- assign buffering to a stream
 .UC 4
 .SH NAME
 setbuf, setbuffer, setlinebuf \- assign buffering to a stream
@@ -44,7 +44,7 @@ when it is line buffered characters are saved up until a newline is
 encountered or input is read from stdin.
 .I Fflush
 (see 
 encountered or input is read from stdin.
 .I Fflush
 (see 
-.IR fclose (3S))
+.IR fclose (3))
 may be used to force the block out early.
 Normally all files are block buffered.
 A buffer is obtained from
 may be used to force the block out early.
 Normally all files are block buffered.
 A buffer is obtained from
@@ -52,7 +52,7 @@ A buffer is obtained from
 upon the first
 .I getc
 or
 upon the first
 .I getc
 or
-.IR  putc (3S)
+.IR  putc (3)
 on the file.
 If the standard stream
 .B stdout
 on the file.
 If the standard stream
 .B stdout
@@ -110,7 +110,7 @@ A file can be changed from unbuffered or line buffered to block buffered
 by using
 .I freopen
 (see
 by using
 .I freopen
 (see
-.IR fopen (3S)).
+.IR fopen (3)).
 A file can be changed from block buffered or line buffered to unbuffered
 by using
 .I freopen
 A file can be changed from block buffered or line buffered to unbuffered
 by using
 .I freopen
@@ -120,19 +120,23 @@ with a buffer argument of
 .SM
 .BR NULL .
 .SH "SEE ALSO"
 .SM
 .BR NULL .
 .SH "SEE ALSO"
-fopen(3S),
-getc(3S),
-putc(3S),
+fopen(3),
+getc(3),
+putc(3),
 malloc(3),
 malloc(3),
-fclose(3S),
-puts(3S),
-printf(3S),
-fread(3S)
+fclose(3),
+puts(3),
+printf(3),
+fread(3)
 .SH BUGS
 .SH BUGS
-The standard error stream should be line buffered by default.
-.LP
 The
 .I setbuffer
 and
 .I setlinebuf
 The
 .I setbuffer
 and
 .I setlinebuf
-functions are not portable to non 4.2 BSD versions of UNIX.
+functions are not portable to non-4.2BSD versions of UNIX.
+On 4.2BSD and 4.3BSD systems,
+.I setbuf
+always uses a suboptimal buffer size and should be avoided.
+.I Setbuffer
+is not usually needed
+as the default file I/O buffer sizes are optimal.