delorie.com/djgpp/doc/libc/libc_693.html   search  
libc.a reference

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

setbuffer

Syntax

 
#include <stdio.h>

void setbuffer(FILE *file, char *buffer, int length);

Description

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 buffer passed is NULL, the file is set to unbuffered. If a non-NULL buffer is passed, it must be at least size bytes in size, and the file is set to fully buffered.

See section setbuf. See section setlinebuf. See section setvbuf.

Return Value

None.

Portability

ANSI/ISO C No
POSIX No

Example

 
setbuffer(stdout, malloc(10000), 10000);


  webmaster     delorie software   privacy  
  Copyright © 2004     Updated Apr 2004