home *** CD-ROM | disk | FTP | other *** search
- /**
- *
- * Name drrmdir -- Remove a subdirectory
- *
- * Synopsis ercode = drrmdir(pdir_name);
- *
- * int ercode Returned DOS function error code
- * char *pdir_name Path name of the subdirectory to delete
- *
- * Description DRRMDIR removes a subdirectory given in the specified
- * path name. If any member of the path does not exist,
- * the subdirectory is not removed (and a nonzero error
- * code is returned). The current directory or a nonempty
- * directory cannot be deleted.
- *
- * Returns ercode DOS function error code
- *
- * Version 3.0 (C)Copyright Blaise Computing Inc. 1983, 1984, 1986
- *
- **/
-
- #include <bdirect.h>
- #include <butility.h>
-
- int drrmdir(pdir_name)
- char *pdir_name;
- {
- DOSREG dos_reg;
- ADS dir_ads;
-
- dos_reg.ax = 0x3a00; /* DOS function 0x3A */
- utabsptr(pdir_name,&dir_ads);
- dos_reg.ds = dir_ads.s;
- dos_reg.dx = dir_ads.r;
-
- return(dos(&dos_reg));
- }