--- np2/fdd/newdisk.c 2005/02/07 14:46:09 1.10 +++ np2/fdd/newdisk.c 2005/02/09 20:11:34 1.11 @@ -1,4 +1,7 @@ #include "compiler.h" +#if defined(OSLANG_UTF8) || defined(OSLANG_UCS2) +#include "oemtext.h" +#endif #include "dosio.h" #include "newdisk.h" #include "fddfile.h" @@ -8,14 +11,19 @@ // ---- fdd -void newdisk_fdd(const char *fname, REG8 type, const char *label) { +void newdisk_fdd(const OEMCHAR *fname, REG8 type, const OEMCHAR *label) { _D88HEAD d88head; FILEH fh; ZeroMemory(&d88head, sizeof(d88head)); STOREINTELDWORD(d88head.fd_size, sizeof(d88head)); +#if defined(OSLANG_UTF8) || defined(OSLANG_UCS2) + oemtext_oem2sjis((char *)d88head.fd_name, sizeof(d88head.fd_name), + label, (UINT)-1); +#else milstr_ncpy((char *)d88head.fd_name, label, sizeof(d88head.fd_name)); +#endif d88head.fd_type = type; fh = file_create(fname); if (fh != FILEH_INVALID) { @@ -71,7 +79,7 @@ static BOOL writehddipl(FILEH fh, UINT s return(SUCCESS); } -void newdisk_thd(const char *fname, UINT hddsize) { +void newdisk_thd(const OEMCHAR *fname, UINT hddsize) { FILEH fh; UINT8 work[256]; @@ -99,7 +107,7 @@ ndthd_err: return; } -void newdisk_nhd(const char *fname, UINT hddsize) { +void newdisk_nhd(const OEMCHAR *fname, UINT hddsize) { FILEH fh; NHDHDR nhd; @@ -133,7 +141,7 @@ ndnhd_err: } // hddtype = 0:5MB / 1:10MB / 2:15MB / 3:20MB / 5:30MB / 6:40MB -void newdisk_hdi(const char *fname, UINT hddtype) { +void newdisk_hdi(const OEMCHAR *fname, UINT hddtype) { const SASIHDD *sasi; FILEH fh; @@ -171,7 +179,7 @@ ndhdi_err: return; } -void newdisk_vhd(const char *fname, UINT hddsize) { +void newdisk_vhd(const OEMCHAR *fname, UINT hddsize) { FILEH fh; VHDHDR vhd;