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

  1. /**
  2. *
  3. * Name        drrmdir -- Remove a subdirectory
  4. *
  5. * Synopsis    ercode = drrmdir(pdir_name);
  6. *
  7. *        int  ercode      Returned DOS function error code
  8. *        char *pdir_name   Path name of the subdirectory to delete
  9. *
  10. * Description    DRRMDIR removes a subdirectory given in the specified
  11. *        path name.  If any member of the path does not exist,
  12. *        the subdirectory is not removed (and a nonzero error
  13. *        code is returned).  The current directory or a nonempty
  14. *        directory cannot be deleted.
  15. *
  16. * Returns    ercode          DOS function error code
  17. *
  18. * Version    3.0  (C)Copyright Blaise Computing Inc.  1983, 1984, 1986
  19. *
  20. **/
  21.  
  22. #include <bdirect.h>
  23. #include <butility.h>
  24.  
  25. int drrmdir(pdir_name)
  26. char *pdir_name;
  27. {
  28.     DOSREG dos_reg;
  29.     ADS    dir_ads;
  30.  
  31.     dos_reg.ax = 0x3a00;          /* DOS function 0x3A          */
  32.     utabsptr(pdir_name,&dir_ads);
  33.     dos_reg.ds = dir_ads.s;
  34.     dos_reg.dx = dir_ads.r;
  35.  
  36.     return(dos(&dos_reg));
  37. }
  38.