Namespaces
Variants
Views
Actions

setbuf

From cppreference.com
< c‎ | io
Revision as of 13:13, 10 April 2013 by P12 (Talk | contribs)

Template:ddcl list begin <tr class="t-dsc-header">

<td>
Defined in header <stdio.h>
</td>

<td></td> <td></td> <tr class="t-dcl-sep"><td></td><td></td><td></td></tr>

<tr class="t-dcl ">

<td >
void setbuf( FILE          *stream, char          *buffer );
</td>

<td class="t-dcl-nopad"> </td> <td > (until C99) </td> </tr> <tr class="t-dcl-sep"><td></td><td></td><td></td></tr>

<tr class="t-dcl ">

<td >
void setbuf( FILE *restrict stream, char *restrict buffer );
</td>

<td class="t-dcl-nopad"> </td> <td > (since C99) </td> </tr> Template:ddcl list end

Sets the internal buffer to use for stream operations. It should be at least BUFSIZ characters long.

If buffer is not null, equivalent to setvbuf(stream, buffer, _IOFBF, BUFSIZ)

If buffer is null, equivalent to setvbuf(stream, NULL, _IONBF, 0), which turns off buffering.

Parameters

stream - the file stream to set the buffer to
buffer - pointer to a buffer for the stream to use. If NULL is supplied, the buffering is turned off

Return value

None.

See also

Template:c/io/dcl list setvbuf