home *** CD-ROM | disk | FTP | other *** search
/ Gold Fish 1 / GoldFishApril1994_CD2.img / d4xx / d473 / cnewssrc / cnews_src.lzh / libc / closeall.c < prev    next >
C/C++ Source or Header  |  1990-05-30  |  281b  |  20 lines

  1. #ifdef unix
  2. # include <sys/param.h>
  3. #else
  4. # include <stdio.h>
  5. # include <fcntl.h>
  6. # ifdef AZTEC_C
  7. #  define NOFILE _numdev
  8. # endif /* AZTEC_C */
  9. #endif /* unix */
  10.  
  11. void
  12. closeall(leavestd)
  13. int leavestd;
  14. {
  15.     register int i;
  16.  
  17.     for (i = (leavestd? 3: 0); i < NOFILE; i++)
  18.         close(i);
  19. }
  20.