02.07.2013 Views

A/UX® Programmer's Reference Sections

A/UX® Programmer's Reference Sections

A/UX® Programmer's Reference Sections

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(3S) setbuf(3S)<br />

RETURN VALUE<br />

If an illegal value for type or size is provided, setvbuf returns a<br />

nonzero value. Otherwise, the value returned will be zero.<br />

SEE ALSO<br />

fopen(3S), getc(3S), intro(3), malloc(3C), putc(3S).<br />

NOTES<br />

A common source of error is allocating buffer space as an "automatic"<br />

variable in a code block, and then failing to close the<br />

stream in the same block.<br />

setbuf allows assignment of a new I/O buffer after the stream<br />

has been read (written), and if unflushed data remains in the original<br />

buffer. This could lead to a loss of data error.<br />

February, 1990<br />

Revision C<br />

2

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

Saved successfully!

Ooh no, something went wrong!