◄Summary► ◄Example► ◄Up► ◄Contents► ◄Index► ◄Back► ─────Run-Time Library─────────────────────────────────────────────────────── The setvbuf function allows the program to control both buffering and buffer size for <stream>. The <stream> must refer to an open file that has not been read from or written to since it was opened. The array pointed to by <buffer> is used as the buffer, unless it is NULL, and an automatically allocated buffer <size> bytes long is used. The <mode> argument specifies the type of buffer for setvbuf; it must be one of the following manifest constants (defined in stdio.h): _IOFBF _IOLBF _IONBF If <mode> is _IOFBF or _IOLBF, then <size> is used as the size of the buffer. If <mode> is _IONBF, the stream is unbuffered and <size> and <buffer> are ignored. The legal values for <size> are greater than 0 and less than 32,768. Return Value The return value for setvbuf is 0 if successful, and a nonzero value if an illegal type or buffer size is specified. There is no return value for setbuf. -♦-