home *** CD-ROM | disk | FTP | other *** search
- /**
- *
- * Name drchdir -- Change the current directory on a given
- * disk drive.
- *
- * Synopsis ercode = drchdir(pdir_name);
- *
- * int ercode Returned error code
- * char *pdir_name Path name of the new directory
- *
- * Description DRCHDIR changes the current directory to the directory
- * specified in the path name. A device specifier may be
- * included to change the current directory of a disk drive
- * which is not the default drive. If any member of the
- * path is not the name of a subdirectory, the current
- * directory is not altered and a nonzero error code is
- * returned.
- *
- * Returns ercode DOS function error code
- *
- * Version 3.0 (C)Copyright Blaise Computing Inc. 1983, 1984, 1986
- *
- **/
-
- #include <bdirect.h>
- #include <butility.h>
-
- int drchdir(pdir_name)
- char *pdir_name;
- {
- DOSREG dos_reg;
- ADS dir_ads;
-
- dos_reg.ax = 0x3b00;
- utabsptr(pdir_name,&dir_ads);
- dos_reg.ds = dir_ads.s;
- dos_reg.dx = dir_ads.r;
-
- return(dos(&dos_reg));
- }