void sh_curdir(BYTE *ppath) { WORD drive; /* remember current */ /* directory */ drive = dos_gdrv(); LBSET(ppath++, (drive + 'A') ); LBSET(ppath++, ':'); LBSET(ppath++, '\\'); dos_gdir( drive+1, ppath ); }
VOID get_path(BYTE *tmp_path, BYTE *spec) { WORD cur_drv; #if GEMDOS cur_drv = Dgetdrv(); #else cur_drv = dos_gdrv(); #endif tmp_path[0] = cur_drv + 'A'; tmp_path[1] = ':'; tmp_path[2] = '\\'; #if GEMDOS Dgetpath((char *)ADDR(&tmp_path[3]), cur_drv+1); #else dos_gdir(cur_drv+1, ADDR(&tmp_path[3])); #endif if (strlen(tmp_path) > 3) strcat(tmp_path, "\\"); else tmp_path[2] = '\0'; strcat(tmp_path, spec); }