2 Copyright © 1995-2013, The AROS Development Team. All rights reserved.
13 /*****************************************************************************
25 Write one character to the specified stream.
28 c - The character to output
29 stream - The character is written to this stream
32 The character written or EOF on error.
44 ******************************************************************************/
46 if (!(stream
->flags
& __STDCIO_STDIO_WRITE
))
48 SetIoErr(ERROR_WRITE_PROTECTED
);
50 stream
->flags
|= __STDCIO_STDIO_ERROR
;
54 if ((stream
->flags
& __STDCIO_STDIO_APPEND
))
55 Seek(stream
->fh
, 0, OFFSET_END
);
57 c
= (int)FPutC(stream
->fh
, c
);
61 errno
= __stdc_ioerr2errno(IoErr());
62 stream
->flags
|= __STDCIO_STDIO_ERROR
;