Attempt to fix collateral action of function LoadCharset() which called from schecker.Load(). Bugreport from Vladimir Fyodorov 2:50/15@fidonet

This commit is contained in:
Stas Degteff
2012-05-15 17:02:39 +00:00
parent c21c518165
commit 4b33543f42
3 changed files with 29 additions and 1 deletions

View File

@@ -359,7 +359,9 @@ void CMSSpellLang::BuildRTable(const char *codeset)
}
strcpy(codeset2, "CP");
GetLocaleInfo(mLIDC, LOCALE_IDEFAULTANSICODEPAGE, &codeset2[2], sizeof(codeset2)-2);
/*
int save_chartableno = LoadCharset(NULL,NULL,1);
*/
LoadCharset(codeset, codeset2);
mToDicTable = new Chs;
memset(mToDicTable, 0, sizeof(Chs));
@@ -369,6 +371,12 @@ void CMSSpellLang::BuildRTable(const char *codeset)
mToLocTable = new Chs;
memset(mToLocTable, 0, sizeof(Chs));
if (CharTable ) *mToLocTable = *CharTable;
/*
if(save_chartableno != -1) // restore value of the default chaset table
LoadCharset(CFG->xlatcharset[save_chartableno].imp, CFG->xlatcharset[save_chartableno].exp);
else
LoadCharset("N/A","N/A");
*/
}
@@ -588,6 +596,9 @@ void CMYSpellLang::BuildRTable(const char *codeset)
"This is bug in program, please make report to developers." );
return;
}
/*
int save_chartableno = LoadCharset(NULL,NULL,1);
*/
LoadCharset(codeset, mMSpell->get_dic_encoding());
mToDicTable = new Chs;
memset(mToDicTable, 0, sizeof(Chs));
@@ -597,6 +608,12 @@ void CMYSpellLang::BuildRTable(const char *codeset)
mToLocTable = new Chs;
memset(mToLocTable, 0, sizeof(Chs));
if (CharTable ) *mToLocTable = *CharTable;
/*
if(save_chartableno != -1) // restore value of the default chaset table
LoadCharset(CFG->xlatcharset[save_chartableno].imp, CFG->xlatcharset[save_chartableno].exp);
else
LoadCharset("N/A","N/A");
*/
}