close all open stream files, except stdin, stdout and stderr
#include <stdio.h> int fcloseall( void );
The fcloseall() function closes all open stream files, except stdin, stdout and stderr. This includes streams created (and not yet closed) by fdopen(), fopen() and freopen().
The fcloseall() function returns the number of streams that were closed, if no errors were encountered.
When an error occurs, EOF is returned.
fclose(), fdopen(), fopen(), freopen(), _fsopen()
#include <stdio.h> void main() { printf( "The number of files closed is %d\n", fcloseall() ); }
WATCOM
All (except DOS/PM)