2 Copyright © 1995-2012, The AROS Development Team. All rights reserved.
5 C99 function setvbuf().
13 /*****************************************************************************
27 Sets the buffer and the mode associated with a stream.
30 stream: stream to set buffer on
31 buf: the buffer to be associated, when NULL a buffer will be allocated
32 and freed on close or new setvbuf. Should be longword aligned.
33 mode: mode for buffering
34 - _IOFBF: fully buffered
35 - _IOLBF: line buffered
36 - _IONBF: Not buffered
37 size: size of the buffer (needs to be at least 208).
40 0 on succes, EOF on error. errno indicated error.
41 Function fails when size < 208 and buf != NULL.
53 ******************************************************************************/
61 /* Pointer has to be longword aligned */
62 if (buf
&& (((IPTR
)buf
& 3) != (IPTR
)0))
64 char *buf2
= (char *)(((IPTR
)buf
| 3) + 1);
94 return SetVBuf(stream
->fh
, buf
, mode
, size
? size
: -1);