COHERENT manpages
This page displays the COHERENT manpage for setbuf() [Set alternative stream buffer].
List of available manpages
Index
setbuf() -- STDIO Function (libc) Set alternative stream buffer #include <stdio.h> void setbuf(fp, buffer) FILE *fp; char *buffer; The standard I/O library STDIO automatically buffers all data read and written in streams, with the exception of streams to terminal devices. STDIO normally uses malloc() to allocate the buffer, which is a char array BUFSIZ characters long; BUFSIZ is a manifest constant defined in the header file stdio.h. setbuf()'s arguments are the file stream fp and the buffer to be associated with the stream. The call should be issued after the stream has been opened, but before any input or output request has been issued. If buffer is NULL, the stream will be unbuffered. If buffer is not NULL, the arena of memory it points to must contain at least BUFSIZ bytes. setbuf() returns nothing. See Also fopen(), libc, malloc(), setvbuf() ANSI Standard, §7.9.5.5 POSIX Standard, §8.1