C Language and Libraries Help (clang.hlp) (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
setbuf, setvbuf
 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.
                                    -♦-