setbuf.3 (58d38e25205c6ee5ef0796ffa2cd8e2ca6c6e7f3) setbuf.3 (ae828962685b8ae9e5104ce8e7fe8b05effcb9ec)
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

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

60.Sh DESCRIPTION
61The three types of buffering available are unbuffered, block buffered,
62and line buffered.
63When an output stream is unbuffered, information appears on the
64destination file or terminal as soon as written;
65when it is block buffered many characters are saved up and written as a block;
66when it is line buffered characters are saved up until a newline is
67output or input is read from any stream attached to a terminal device
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

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

60.Sh DESCRIPTION
61The three types of buffering available are unbuffered, block buffered,
62and line buffered.
63When an output stream is unbuffered, information appears on the
64destination file or terminal as soon as written;
65when it is block buffered many characters are saved up and written as a block;
66when it is line buffered characters are saved up until a newline is
67output or input is read from any stream attached to a terminal device
68(typically stdin).
68(typically
69.Dv stdin ) .
69The function
70.Xr fflush 3
71may be used to force the block out early.
72(See
73.Xr fclose 3 . )
74.Pp
75Normally all files are block buffered.
76When the first
77.Tn I/O
78operation occurs on a file,
79.Xr malloc 3
80is called,
81and an optimally-sized buffer is obtained.
82If a stream refers to a terminal
83(as
70The function
71.Xr fflush 3
72may be used to force the block out early.
73(See
74.Xr fclose 3 . )
75.Pp
76Normally all files are block buffered.
77When the first
78.Tn I/O
79operation occurs on a file,
80.Xr malloc 3
81is called,
82and an optimally-sized buffer is obtained.
83If a stream refers to a terminal
84(as
84.Em stdout
85.Dv stdout
85normally does) it is line buffered.
86The standard error stream
86normally does) it is line buffered.
87The standard error stream
87.Em stderr
88.Dv stderr
88is always unbuffered.
89.Pp
90The
91.Fn setvbuf
92function
93may be used to alter the buffering behavior of a stream.
94The
95.Fa mode

--- 110 unchanged lines hidden ---
89is always unbuffered.
90.Pp
91The
92.Fn setvbuf
93function
94may be used to alter the buffering behavior of a stream.
95The
96.Fa mode

--- 110 unchanged lines hidden ---