setbuffer()

alter buffering behavior of stream 

Function


SYNOPSIS

#include <stdio.h>

void setbuffer(FILE *stream, char *buf, int size);


DESCRIPTION

The setbuffer() function lets the program control the buffer of a given stream. This function may be used after the stream pointed to by stream is associated with an open file, but before any other operation is performed on the stream. If buf is not a NULL pointer, the array it points to is used instead of a buffer allocated by setbuffer().

Except that it returns no value, the setbuffer() function is equivalent to the setvbuf() function invoked with the values _IOFBF for mode or, if buf is a null pointer, with the value _IONBF for mode.


PARAMETERS

stream 

Points to FILE structure.

buf 

Is a user-allocated buffer.

size 

Is a user-specified buffer size.


RETURN VALUES

None.


CONFORMANCE

4.4BSD.


MULTITHREAD SAFETY LEVEL

MT-Safe.


PORTING ISSUES

None.


AVAILABILITY

PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition


SEE ALSO

Functions:
setbuf(), setvbuf()


PTC MKS Toolkit 10.3 Documentation Build 39.