|SETBUF(3)||Library Functions Manual||SETBUF(3)|
setlinebuf — stream
*stream, char *buf,
setlinebuf() functions are used to modify the
buffering of a stream. These functions are provided for compatibility with
legacy code. New code should use
Except for the lack of a return value, the
function is exactly equivalent to the call
setvbuf(stream, buf, buf ? _IOFBF : _IONBF, BUFSIZ);
function is the same, except that the size of the buffer is up to the
caller, rather than being determined by the default
function is exactly equivalent to the call:
setvbuf(stream, NULL, _IOLBF, 0);
Upon successful completion, the
setlinebuf() function returns 0. If the request
cannot be honored, a non-zero value is returned, possibly setting
errno to indicate the error. The stream is not
modified in the error case.
setlinebuf() functions will fail if:
setbuf() function conforms to
ISO/IEC 9899:1999 (“ISO C99”).
setlinebuf() functions are non-standard and should
not be used if portability is required.
setbuf() function first appeared in
Version 7 AT&T UNIX. The
setbuffer() function first appeared in
function first appeared in 4.2BSD.
setbuf() function usually uses a
suboptimal buffer size and should be avoided.
|November 25, 2014||OpenBSD-current|