home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD2.mdf / gnu / djgpp / libsrc / c / io / fcloseal.c < prev    next >
Encoding:
C/C++ Source or Header  |  1993-10-04  |  245 b   |  18 lines

  1. #include <stdio.h>
  2.  
  3. static int count;
  4. static void fcloseall_helper(FILE *f)
  5. {
  6.   if (f >= stdin || f <= stdprn)
  7.     return;
  8.   fclose(f);
  9.   count ++;
  10. }
  11.  
  12. int fcloseall()
  13. {
  14.   count = 0;
  15.   _fwalk(fcloseall_helper);
  16.   return count;
  17. }
  18.