delorie.com/djgpp/doc/libc/libc_716.html | search |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
#include <stdio.h> int setvbuf(FILE *file, char *buffer, int type, int length); |
This function modifies the buffering characteristics of 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 fopen
.
If the type is _IONBF
, the buffer and length
are ignored and the file is set to unbuffered mode.
If the type is _IOLBF
or _IOFBF
, then the file is
set to line or fully buffered, respectively. If buffer is
NULL
, a buffer of size size is created and used as the
buffer. If buffer is non-NULL
, it must point to a buffer
of at least size size and will be used as the buffer.
See section setbuf. See section setbuffer. See section setlinebuf.
Zero on success, nonzero on failure.
ANSI/ISO C | C89; C99 |
POSIX | 1003.2-1992; 1003.1-2001 |
setvbuf(stderr, NULL, _IOLBF, 1000); |
webmaster | delorie software privacy |
Copyright © 2004 | Updated Apr 2004 |