home *** CD-ROM | disk | FTP | other *** search
- @node setbuf, stdio
- @subheading Syntax
-
- @example
- #include <stdio.h>
-
- void setbuf(FILE *file, char *buffer);
- @end example
-
- @subheading Description
-
- This function modifies the buffering characteristics of @var{file}.
- First, if the file already has a buffer, it is freed. If there was any
- pending data in it, it is lost, so this function should only be used
- immediately after a call to @code{fopen}.
-
- If the @var{buffer} passed is @code{NULL}, the file is set to
- unbuffered. If a non-@code{NULL} buffer is passed, it must be at least
- @code{BUFSIZ} bytes in size, and the file is set to fully buffered.
-
- @xref{setbuffer}.
- @xref{setlinebuf}.
- @xref{setvbuf}.
-
- @subheading Return Value
-
- None.
-
- @subheading Example
-
- @example
- setbuf(stdout, malloc(BUFSIZ));
- @end example
-
-