setbuf()

alter buffering behavior of stream 

Function


SYNOPSIS

#include <stdio.h>

void setbuf(FILE *stream, char *buf);


DESCRIPTION

The setbuf() 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 setbuf().

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


PARAMETERS

stream 

Points to a FILE structure.

buf 

Is a user-allocated buffer.


RETURN VALUES

None.


CONFORMANCE

ANSI/ISO 9899-1990.


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:
setvbuf()


PTC MKS Toolkit 10.2 Documentation Build 28.