setvbuf()

This is a file I/O function, also hardware dependent. It is not implemented in this Compiler.

Syntax
#include <stdio.h>

  
  void setvbuf(FILE *f,

  
               char *buf,

  
               int mode,

  
               size_t size);

  
Description

Use setvbuf() to specify how a file is buffered. mode determines how the file is buffered.

Table 1. setvbuf() Function Operating Modes
Mode Buffering
_IOFBF Fully buffered
_IOLBF Line buffered
_IONBF Unbuffered

To make a file unbuffered, call setvbuf() with mode _IONBF; the other arguments ( buf and size) are ignored.

In all other modes, the file uses buffer buf of size size. If buf is NULL, the function allocates a buffer of size size itself.

See also

fflush()

setbuf()