/* flushall.c (emx+gcc) -- Copyright (c) 1990-1993 by Eberhard Mattes */

#include <sys/emx.h>
#include <stdio.h>

int flushall (void)
{
  int i, n;

  n = 0;
  for (i = 0; i < _nfiles; ++i)
    if (_streamv[i].flags & _IOOPEN)
      {
        ++n;
        fflush (&_streamv[i]);
      }
  return (n);
}
