--- np2/font/font.c 2005/02/07 14:46:10 1.8 +++ np2/font/font.c 2005/02/09 20:11:34 1.9 @@ -11,7 +11,7 @@ UINT8 __font[0x84000]; #endif -static const char fonttmpname[] = "font.tmp"; +static const OEMCHAR fonttmpname[] = OEMTEXT("font.tmp"); void font_initialize(void) { @@ -43,15 +43,15 @@ void font_initialize(void) { } } -static UINT8 fonttypecheck(const char *fname) { +static UINT8 fonttypecheck(const OEMCHAR *fname) { -const char *p; +const OEMCHAR *p; - p = file_getext((char *)fname); + p = file_getext(fname); if (!file_cmpname(p, str_bmp)) { return(FONTTYPE_PC98); } - p = file_getname((char *)fname); + p = file_getname(fname); if (!file_cmpname(p, v98fontname)) { return(FONTTYPE_V98); } @@ -75,18 +75,18 @@ const char *p; return(FONTTYPE_NONE); } -UINT8 font_load(const char *filename, BOOL force) { +UINT8 font_load(const OEMCHAR *filename, BOOL force) { UINT i; const UINT8 *p; UINT8 *q; UINT j; - char fname[MAX_PATH]; + OEMCHAR fname[MAX_PATH]; UINT8 type; UINT8 loading; if (filename) { - file_cpyname(fname, filename, sizeof(fname)); + file_cpyname(fname, filename, NELEMENTS(fname)); } else { fname[0] = '\0'; @@ -146,7 +146,7 @@ const UINT8 *p; loading = fontv98_read(file_getcd(v98fontname), loading); loading = fontpc88_read(file_getcd(pc88ankname), loading); if (loading & FONTLOAD_16) { - file_cpyname(fname, file_getcd(fonttmpname), sizeof(fname)); + file_cpyname(fname, file_getcd(fonttmpname), NELEMENTS(fname)); if (file_attr(fname) == -1) { makepc98bmp(fname); }