2 Copyright © 1995-2013, The AROS Development Team. All rights reserved.
7 #include <exec/lists.h>
12 #include "__stdcio_intbase.h"
14 /*****************************************************************************
25 Flush a stream. If the stream is an input stream, then the stream
26 is synchronised for unbuffered I/O. If the stream is an output
27 stream, then any buffered data is written.
30 stream - Flush this stream. May be NULL. In this case, all
31 output streams are flushed.
34 0 on success or EOF on error.
46 ******************************************************************************/
50 /* flush all streams opened for output */
51 struct StdCIOIntBase
*StdCIOBase
=
52 (struct StdCIOIntBase
*)__aros_getbase_StdCIOBase();
55 ForeachNode (&StdCIOBase
->files
, f
)
63 if (!Flush(stream
->fh
))
65 errno
= __stdc_ioerr2errno(IoErr());