SETBUFFER(3s,L) AIX Technical Reference SETBUFFER(3s,L) ------------------------------------------------------------------------------- setbuffer, setlinebuf PURPOSE Assigns buffering to a stream. LIBRARY Standard I/O Library (libc.a) SYNTAX void setbuffer (stream, buf, size) void setlinebuf (stream) FILE *stream; FILE *stream; char *buf; size_t size; DESCRIPTION The setbuffer subroutine, an alternate form of the setbuf subroutine described on page setbuff-1, is used after stream has been opened, but before it is read or written. The character array buf, whose size is determined by the size parameter, is used instead of an automatically allocated buffer. If the buf parameter is a null character pointer, input/output is completely unbuffered. The setbuffer subroutine is not needed under normal circumstances since the default file I/O buffer size are optimal. The setlinebuf subroutine is used to change stdout or stderr from block buffered or unbuffered to line buffered. Unlike the setbuf and setbuffer subroutines, the setlinebuf subroutine can be used any time the file descriptor is active. For more information on stream buffering, see "setbuf, setvbuf." RELATED INFORMATION In this book: "fclose, fflush," "fopen, freopen, fdopen," "fread, fwrite," "getc, fgetc, getchar, getw, getwc, fgetwc, getwchar," "malloc, free, realloc, calloc, valloc, alloca, mallopt, mallinfo," "printf, fprintf, sprintf, NLprintf, NLfprintf, NLsprintf, wsprintf," "putc, putchar, fputc, putw, putwc, putwchar, fputwc," "puts, fputs, putws, fputws," and "setbuf, setvbuf." Processed July 12, 1991 SETBUFFER(3s,L) 1