-/* A system call that writes up to n characters to a file identified by given
- file descriptor. Return the number of characters actually written, or -1
- if an error occured. Note that the number of characters may well be lower
- than n without an error having occured.
+/* A system call that writes a stream's buffer.
+ Returns 0 on success, EOF on write error.
+ Sets stream error flags and errno appropriately on error.
+*/
+int _PDCLIB_flushbuffer( struct _PDCLIB_file_t * stream );
+
+/* A system call that fills a stream's buffer.
+ Returns 0 on success, EOF on read error / EOF.
+ Sets stream EOF / error flags and errno appropriately on error.