Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- libc - <b>setbuffer</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
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.

setbuf:.  setlinebuf:.  setvbuf:.         

Return Value
------------

None.

Example
-------

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


See Also: setbuf setlinebuf setvbuf

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson