--- np2/win9x/ini.cpp 2003/10/30 16:54:04 1.8 +++ np2/win9x/ini.cpp 2003/11/01 22:23:04 1.10 @@ -456,30 +456,31 @@ static const INITBL iniitem[] = { {"STATSAVE", INIRO_BOOL, &np2oscfg.statsave, 0}, {"nousemmx", INITYPE_BOOL, &np2oscfg.disablemmx, 0}, // ver0.36 {"toolwind", INITYPE_BOOL, &np2oscfg.toolwin, 0}, // ver0.38 + {"keydispl", INITYPE_BOOL, &np2oscfg.keydisp, 0}, {"I286SAVE", INIRO_BOOL, &np2oscfg.I286SAVE, 0}}; -static void getinifile(char *initfile, int max) { +void initgetfile(char *path, UINT size) { char *p; - milstr_ncpy(initfile, modulefile, max); + file_cpyname(path, modulefile, size); if (np2arg.ini) { if ((np2arg.ini[0] == '/') || (np2arg.ini[0] == '-')) { - file_cutname(initfile); - milstr_ncat(initfile, file_getname(np2arg.ini + 2), max); + file_cutname(path); + file_catname(path, file_getname(np2arg.ini + 2), size); } else { - milstr_ncpy(initfile, np2arg.ini, max); + file_cpyname(path, np2arg.ini, size); } - p = file_getext(initfile); + p = file_getext(path); if (!(*p)) { - milstr_ncat(initfile, ".ini", max); + file_catname(path, ".ini", size); } } else { - file_cutext(initfile); - milstr_ncat(initfile, ".ini", max); + file_cutext(path); + file_catname(path, ".ini", size); } } @@ -487,7 +488,7 @@ void initload(void) { char path[MAX_PATH]; - getinifile(path, sizeof(path)); + initgetfile(path, sizeof(path)); ini_read(path, ini_title, iniitem, sizeof(iniitem)/sizeof(INITBL)); } @@ -495,7 +496,7 @@ void initsave(void) { char path[MAX_PATH]; - getinifile(path, sizeof(path)); + initgetfile(path, sizeof(path)); ini_write(path, ini_title, iniitem, sizeof(iniitem)/sizeof(INITBL)); }