2 Copyright © 1995-2013, The AROS Development Team. All rights reserved.
12 /*****************************************************************************
24 Write a string to the specified stream.
27 str - Output this string...
28 fh - ...to this stream
31 > 0 on success and EOF on error.
40 puts(), fputc(), putc()
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 if (!str
) str
= "(null)";
59 if (FPuts(stream
->fh
, str
) == -1)
61 errno
= __stdc_ioerr2errno(IoErr());