-/* Writing out unwritten buffers to file. Returns 0 if successful, EOF if error
- occured. Sets error flag of stream in case of error.
- */
-int _PDCLIB_fflush( struct _PDCLIB_file_t * stream );
+/* Writing out unwritten buffers of a specific stream. A NULL parameter (as is
+ possible with standard fflush()) is not supported.
+ Return 0 if successful, EOF if error occured. Set error flag of stream and
+ errno as appropriate in case of error.
+*/
+_PDCLIB_size_t _PDCLIB_flushbuffer( struct _PDCLIB_file_t * stream, _PDCLIB_size_t written, int retries );
+