3 This file is part of the Public Domain C Library (PDCLib).
4 Permission is granted to use, modify, and / or redistribute at will.
11 #include "_PDCLIB_glue.h"
13 extern struct _PDCLIB_file_t * _PDCLIB_filelist;
15 int fflush( struct _PDCLIB_file_t * stream )
19 stream = _PDCLIB_filelist;
20 /* TODO: Check what happens when fflush( NULL ) encounters write errors, in other libs */
22 while ( stream != NULL )
24 if ( stream->status & _PDCLIB_FWRITE )
26 if ( _PDCLIB_flushbuffer( stream ) == EOF )
31 stream = stream->next;
37 return _PDCLIB_flushbuffer( stream );
45 #include "_PDCLIB_test.h"
49 /* Testing covered by ftell.c */