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

  1. /* close.c (emx+gcc) -- Copyright (c) 1990-1993 by Eberhard Mattes */
  2.  
  3. #include <sys/emx.h>
  4. #include <io.h>
  5. #include <errno.h>
  6.  
  7. int close (int handle)
  8. {
  9.   if (handle < 0 || handle >= _nfiles)
  10.     {
  11.       errno = EBADF;
  12.       return (-1);
  13.     }
  14.     return (__close (handle));
  15. }
  16.