--- np2/generic/hostdrv.c 2004/01/10 17:24:01 1.4 +++ np2/generic/hostdrv.c 2004/01/15 06:20:42 1.8 @@ -1,3 +1,6 @@ +#include "compiler.h" + +#if defined(SUPPORT_HOSTDRV) /* ゲストOS(DOS)からホストOS(Win)にアクセスするの〜 @@ -6,7 +9,6 @@ 更に、手抜き版だし(マテ */ -#include "compiler.h" #include "dosio.h" #include "cpucore.h" #include "pccore.h" @@ -336,8 +338,7 @@ static BOOL pathishostdrv(INTRST is, SDA } -static BOOL read_data(UINT num, UINT32 pos, UINT size, - UINT16 seg, UINT16 off) { +static BOOL read_data(UINT num, UINT32 pos, UINT size, UINT seg, UINT off) { HDRVFILE hdf; FILEH fh; @@ -364,8 +365,7 @@ static BOOL read_data(UINT num, UINT32 p return(SUCCESS); } -static BOOL write_data(UINT num, UINT32 pos, UINT size, - UINT16 seg, UINT16 off) { +static BOOL write_data(UINT num, UINT32 pos, UINT size, UINT seg, UINT off) { HDRVFILE hdf; FILEH fh; @@ -470,6 +470,7 @@ static void change_currdir(INTRST intrst } ptr = intrst->filename_ptr; + TRACEOUT(("change_currdir %s", intrst->filename_ptr)); if (ptr[0] == '\0') { // るーと strcpy(intrst->filename_ptr, "\\"); strcpy(intrst->current_path, intrst->filename_ptr); @@ -477,7 +478,8 @@ static void change_currdir(INTRST intrst succeed(intrst); return; } - if ((is_wildcards(intrst->fcbname_ptr) != FALSE) || + if ((strlen(intrst->filename_ptr) >= (67 - ROOTPATH_SIZE)) || + (is_wildcards(intrst->fcbname_ptr) != FALSE) || (hostdrvs_getrealpath(&hdp, ptr) != SUCCESS) || (hdp.di.fcbname[0] == ' ') || (!(hdp.di.attr & 0x10))) { fail(intrst, ERR_PATHNOTFOUND); @@ -734,6 +736,7 @@ static void rename_file(INTRST intrst) { return; } + // ワイルドカードくるんで要修正… if ((hostdrvs_getrealpath(&hdp1, intrst->filename_ptr) != SUCCESS) || (hostdrvs_getrealpath(&hdp2, intrst->filename_ptr_2) != SUCCESS)) { fail(intrst, ERR_PATHNOTFOUND); @@ -743,7 +746,6 @@ static void rename_file(INTRST intrst) { fail(intrst, ERR_ACCESSDENIED); } - /* 13 */ static void delete_file(INTRST intrst) { @@ -754,6 +756,7 @@ static void delete_file(INTRST intrst) { return; } + // ワイルドカードくるんで要修正… if ((hostdrvs_getrealpath(&hdp, intrst->filename_ptr) != SUCCESS) || (hdp.di.attr & 0x10)) { fail(intrst, ERR_PATHNOTFOUND); @@ -1117,3 +1120,5 @@ void hostdrv_intr(void) { store_intr_regs(&intrst); } +#endif +