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

  1. /**
  2. *
  3. * Name        drmkdir -- Create a subdirectory
  4. *
  5. * Synopsis    ercode = drmkdir(pdir_name);
  6. *
  7. *        int  ercode      Returned DOS function error code
  8. *        char *pdir_name   Path name of the subdirectory to create
  9. *
  10. * Description    DRMKDIR creates a subdirectory using the specified path
  11. *        name.  If any member of the path does not exist, the
  12. *        subdirectory is not created (and a nonzero error code is
  13. *        returned).
  14. *
  15. * Returns    ercode          DOS function return error code
  16. *
  17. * Version    3.0  (C)Copyright Blaise Computing Inc.  1983, 1984, 1986
  18. *
  19. **/
  20.  
  21. #include <bdirect.h>
  22. #include <butility.h>
  23.  
  24. int drmkdir(pdir_name)
  25. char *pdir_name;
  26. {
  27.     DOSREG dos_reg;
  28.     ADS    dir_ads;
  29.  
  30.     dos_reg.ax = 0x3900;          /* DOS function 0x39          */
  31.     utabsptr(pdir_name,&dir_ads);
  32.     dos_reg.ds = dir_ads.s;
  33.     dos_reg.dx = dir_ads.r;
  34.  
  35.     return(dos(&dos_reg));
  36. }
  37.