flushall

Clears all buffers associated with input streams and writes any buffers associated with output streams

Local Servers:blocking
Remote Servers:blocking
Platform:NLM
Service:Stream I/O

Syntax

  #include <stdio.h>  
   
  int flushall  (void);
  

Return Values

The flushall function returns the number of open streams. If an output error occurs while writing to a file, errno is set.

Remarks

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 data to be read from the associated file or device.

IMPORTANT:This function was designed to be used by applications that are cleaning up before exiting. If you need to flush all write buffers and then continue to run, you should call the the fflush function with the fp parameter set to NULL.

Novell recommends using LibC instead of CLib for any new NLM development. See Libraries for C (LibC).

See Also

fflush, fopen

flushall Example

  #include <stdio.h>  
   
  main ()  
  {  
     printf ("The number of open files is %d\n", flushall () );  
  }