Associates a buffer with a file after the file is open and before it has been read or written to.
#include <stdio.h> int setvbuf ( FILE *fp, char *buf, int mode, size_t size);
(IN) Points to the file.
(IN) Points to the buffer.
(IN) Specifies the file mode that determines how to buffer the file.
(IN) Specifies the size of the array.
If successful, returns 0; otherwise, returns a nonzero value and may set errno to the following:
The setvbuf function associates a buffer with the file designated by fp. This function must be called after the file has been opened and before it has been read or written.
If the buf parameter is not NULL, the array to which it points is used instead of an automatically allocated buffer. The size parameter specifies the size of the array.