Subversion Repositories Kolibri OS

Rev

Go to most recent revision | Blame | Last modification | View Log | Download | RSS feed

  1. /* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
  2. #include <unistd.h>
  3. #include <errno.h>
  4. #include <io.h>
  5. #include <sys/fsext.h>
  6.  
  7. #include <libc/dosio.h>
  8.  
  9. #include <menuet/os.h>
  10.  
  11. int _close(int handle)
  12. {
  13.  __FSEXT_Function *func = __FSEXT_get_function(handle);
  14.  if (func)
  15.  {
  16.   int rv;
  17.   if (func(__FSEXT_close, &rv, &handle))
  18.   {
  19.    __FSEXT_set_function(handle, 0);
  20.    return rv;
  21.   }
  22.   __FSEXT_set_function(handle, 0);
  23.  }
  24.  return dosemu_close(handle);
  25. }
  26.