home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / CLIPPER / MISC / EMXLIB8F.ZIP / EMX / LIB / IO / FLUSHALL.C < prev    next >
Encoding:
C/C++ Source or Header  |  1993-01-02  |  322 b   |  19 lines

  1. /* flushall.c (emx+gcc) -- Copyright (c) 1990-1993 by Eberhard Mattes */
  2.  
  3. #include <sys/emx.h>
  4. #include <stdio.h>
  5.  
  6. int flushall (void)
  7. {
  8.   int i, n;
  9.  
  10.   n = 0;
  11.   for (i = 0; i < _nfiles; ++i)
  12.     if (_streamv[i].flags & _IOOPEN)
  13.       {
  14.         ++n;
  15.         fflush (&_streamv[i]);
  16.       }
  17.   return (n);
  18. }
  19.