setbuf - assign buffering to a stream
#include <stdio.h> void setbuf(FILE *stream, char *buf);
Except that it returns no value, the function call:is equivalent to:
setvbuf(stream, buf, _IOFBF, BUFSIZ)
if buf is not a null pointer, or to:
setvbuf(stream, buf, _IONBF, BUFSIZ)
if buf is a null pointer.
The setbuf() function returns no value.
No errors are defined.
A common source of error is allocating buffer space as an "automatic" variable in a code block, and then failing to close the stream in the same block.
With setbuf(), allocating a buffer of BUFSIZ bytes does not necessarily imply that all of BUFSIZ bytes are used for the buffer area.
fopen(), setvbuf(), <stdio.h>.
Derived from Issue 1 of the SVID.