clear all input buffers and write all output buffers
Synopsis:
#include <stdio.h>int flushall( void );
Description:
The flushall() function clears all buffers associated with input streams, and writes any buffers associated with output streams.A subsequent read operation on an input file causes new datato be read from the associated file or device.
Calling the flushall() function is equivalent to calling thefflush() for all open stream files.
Returns:
The number of open streams.When an output error occurs while writing to a file, the global variableerrno is set.
Examples:
#include <stdio.h>void main() { printf( "The number of open files is %d\n", flushall() ); }
produces output similar to the following:
The number of open files is 4
Classification:
WATCOM
Safety: | |
---|---|
Interrupt handler | No |
Signal handler | No |
Thread | Yes |