Deleted Added
full compact
setbuf.3 (165903) setbuf.3 (234772)
1.\" Copyright (c) 1980, 1991, 1993
2.\" The Regents of the University of California. All rights reserved.
3.\"
4.\" This code is derived from software contributed to Berkeley by
5.\" the American National Standards Committee X3, on Information
6.\" Processing Systems.
7.\"
8.\" Redistribution and use in source and binary forms, with or without

--- 16 unchanged lines hidden (view full) ---

25.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30.\" SUCH DAMAGE.
31.\"
32.\" @(#)setbuf.3 8.1 (Berkeley) 6/4/93
1.\" Copyright (c) 1980, 1991, 1993
2.\" The Regents of the University of California. All rights reserved.
3.\"
4.\" This code is derived from software contributed to Berkeley by
5.\" the American National Standards Committee X3, on Information
6.\" Processing Systems.
7.\"
8.\" Redistribution and use in source and binary forms, with or without

--- 16 unchanged lines hidden (view full) ---

25.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30.\" SUCH DAMAGE.
31.\"
32.\" @(#)setbuf.3 8.1 (Berkeley) 6/4/93
33.\" $FreeBSD: head/lib/libc/stdio/setbuf.3 165903 2007-01-09 00:28:16Z imp $
33.\" $FreeBSD: head/lib/libc/stdio/setbuf.3 234772 2012-04-28 20:52:20Z jlh $
34.\"
35.Dd June 4, 1993
36.Dt SETBUF 3
37.Os
38.Sh NAME
39.Nm setbuf ,
40.Nm setbuffer ,
41.Nm setlinebuf ,

--- 36 unchanged lines hidden (view full) ---

78and an optimally-sized buffer is obtained.
79If a stream refers to a terminal
80(as
81.Dv stdout
82normally does) it is line buffered.
83The standard error stream
84.Dv stderr
85is always unbuffered.
34.\"
35.Dd June 4, 1993
36.Dt SETBUF 3
37.Os
38.Sh NAME
39.Nm setbuf ,
40.Nm setbuffer ,
41.Nm setlinebuf ,

--- 36 unchanged lines hidden (view full) ---

78and an optimally-sized buffer is obtained.
79If a stream refers to a terminal
80(as
81.Dv stdout
82normally does) it is line buffered.
83The standard error stream
84.Dv stderr
85is always unbuffered.
86Note that these defaults maybe be altered using the
87.Xr stdbuf 1
88utility.
86.Pp
87The
88.Fn setvbuf
89function
90may be used to alter the buffering behavior of a stream.
91The
92.Fa mode
93argument must be one of the following three macros:

--- 78 unchanged lines hidden (view full) ---

172(note that the stream is still functional in this case).
173.Pp
174The
175.Fn setlinebuf
176function returns what the equivalent
177.Fn setvbuf
178would have returned.
179.Sh SEE ALSO
89.Pp
90The
91.Fn setvbuf
92function
93may be used to alter the buffering behavior of a stream.
94The
95.Fa mode
96argument must be one of the following three macros:

--- 78 unchanged lines hidden (view full) ---

175(note that the stream is still functional in this case).
176.Pp
177The
178.Fn setlinebuf
179function returns what the equivalent
180.Fn setvbuf
181would have returned.
182.Sh SEE ALSO
183.Xr stdbuf 1 ,
180.Xr fclose 3 ,
181.Xr fopen 3 ,
182.Xr fread 3 ,
183.Xr malloc 3 ,
184.Xr printf 3 ,
185.Xr puts 3
186.Sh STANDARDS
187The

--- 22 unchanged lines hidden ---
184.Xr fclose 3 ,
185.Xr fopen 3 ,
186.Xr fread 3 ,
187.Xr malloc 3 ,
188.Xr printf 3 ,
189.Xr puts 3
190.Sh STANDARDS
191The

--- 22 unchanged lines hidden ---