06.08.2013 Views

pSOSystem System Calls - Read

pSOSystem System Calls - Read

pSOSystem System Calls - Read

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

setbuf pREPC+ <strong>System</strong> <strong>Calls</strong><br />

setbuf Changes a stream’s buffer.<br />

#include <br />

#include <br />

void setbuf(<br />

FILE *stream, /* stream pointer */<br />

char *buf /* I/O buffer */<br />

)<br />

Description<br />

Arguments<br />

Return Value<br />

The setbuf() function causes a new buffer to be used for a specified stream<br />

(instead of the buffer that is currently assigned).<br />

The buffer is assumed to have a size equal to lc_bufsize, which is defined in the<br />

pREPC+ Configuration Table.<br />

The setbuf() function must be called after the specified stream has been opened<br />

but prior to performing any read or write operation on the stream. If setbuf() is<br />

called after a read or write operation, it has no effect.<br />

You must use the setvbuf() call if you want additional control over buffering<br />

options.<br />

stream Points to an open pREPC+ stream.<br />

buf Points to the new buffer.<br />

If buf is a null pointer, all input and output is unbuffered.<br />

This effectively eliminates buffering. Otherwise, the stream<br />

is set to fully buffered mode.<br />

This function does not return a value.<br />

3-132 <strong>pSO<strong>System</strong></strong> <strong>System</strong> <strong>Calls</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!