home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c005 / 4.ddi / C / FLCLOSE.C < prev    next >
Encoding:
C/C++ Source or Header  |  1986-08-05  |  726 b   |  33 lines

  1. /**
  2. *
  3. * Name        flclose -- Close a file
  4. *
  5. * Synopsis    ercode = flclose(handle);
  6. *
  7. *        int  ercode      Returned DOS error code
  8. *        int  handle      Handle of file to close
  9. *
  10. * Description    FLCLOSE closes the file associated with the specified
  11. *        file handle.  All pending I/O is completed.  Unexpected
  12. *        results may occur if one of the reserved file handles (0
  13. *        through 4) is closed.
  14. *
  15. * Returns    ercode          DOS function error return code
  16. *
  17. * Version    3.0  (C)Copyright Blaise Computing Inc.  1983, 1984, 1986
  18. *
  19. **/
  20.  
  21. #include <bfile.h>
  22.  
  23. int flclose(handle)
  24. int handle;
  25. {
  26.     DOSREG dos_reg;
  27.  
  28.     dos_reg.ax = 0x3e00;          /* Function 0x3E              */
  29.     dos_reg.bx = handle;
  30.  
  31.     return(dos(&dos_reg));
  32. }
  33.