Added new config file token XlatCharSetAlias that defines charset aliases for import tables
This commit is contained in:
parent
ca3787c5a1
commit
99990d1f22
@ -1411,6 +1411,10 @@ XLATCHARSET CP1251 +7_FIDO win_866.chs
|
|||||||
;XLATCHARSET CP850 ASCII 850_ASC.CHS
|
;XLATCHARSET CP850 ASCII 850_ASC.CHS
|
||||||
;XLATCHARSET CP850 MNEMONIC 850_MNE.CHS
|
;XLATCHARSET CP850 MNEMONIC 850_MNE.CHS
|
||||||
|
|
||||||
|
// This defines charset aliases for import tables.
|
||||||
|
;XLATCHARSETALIAS "charset" "alias1" "alias2"...
|
||||||
|
;XLATCHARSETALIAS ISO-11 ISO-8859-11 ISO8859-11
|
||||||
|
|
||||||
// The character set that incoming messages are assumed to have.
|
// The character set that incoming messages are assumed to have.
|
||||||
XLATIMPORT IBMPC ; Default
|
XLATIMPORT IBMPC ; Default
|
||||||
;XLATIMPORT LATIN-1
|
;XLATIMPORT LATIN-1
|
||||||
|
@ -1654,6 +1654,12 @@ XlatCharSet CP866 COMPOSED 866_CMP.chs
|
|||||||
XlatCharSet CP866 VT100 866_VT1.chs
|
XlatCharSet CP866 VT100 866_VT1.chs
|
||||||
XlatCharSet CP850 ASCII 850_ASC.chs
|
XlatCharSet CP850 ASCII 850_ASC.chs
|
||||||
|
|
||||||
|
// <20>⨬ ¬®¦® ®¯à¥¤¥«¨âì «¨ áë ¤«ï §¢ ¨© ª®¤¨à®¢®ª.
|
||||||
|
// <20> ¡®â ¥â ⮫쪮 ¤«ï â ¡«¨æ ¨¬¯®àâ .
|
||||||
|
;XLATCHARSETALIAS "charset" "alias1" "alias2"...
|
||||||
|
;XLATCHARSETALIAS KOI8-R KOI8R
|
||||||
|
;XLATCHARSETALIAS ISO ISO-8859-5 ISO8859-5
|
||||||
|
|
||||||
// Ž¯à¥¤¥«¥¨¥ ¢å®¤ï饩 ª®¤¨à®¢ª¨ ¯® 㬮«ç ¨î. …᫨ ¯à¨å®¤ï饥
|
// Ž¯à¥¤¥«¥¨¥ ¢å®¤ï饩 ª®¤¨à®¢ª¨ ¯® 㬮«ç ¨î. …᫨ ¯à¨å®¤ï饥
|
||||||
// á®®¡é¥¨¥ ¥ ¨¬¥¥â ª«ã¤¦ ^CHRS, â® ¡ã¤¥â áç¨â âìáï, çâ® ®®
|
// á®®¡é¥¨¥ ¥ ¨¬¥¥â ª«ã¤¦ ^CHRS, â® ¡ã¤¥â áç¨â âìáï, çâ® ®®
|
||||||
// ᮮ⢥âáâ¢ã¥â í⮬㠡®àã ᨬ¢®«®¢.
|
// ᮮ⢥âáâ¢ã¥â í⮬㠡®àã ᨬ¢®«®¢.
|
||||||
|
@ -10,6 +10,9 @@ ______________________________________________________________________
|
|||||||
Notes for GoldED+ 1.1.5, /snapshot/
|
Notes for GoldED+ 1.1.5, /snapshot/
|
||||||
______________________________________________________________________
|
______________________________________________________________________
|
||||||
|
|
||||||
|
+ Added new config file token: XlatCharSetAlias "charset" "alias1" "alias2"...
|
||||||
|
that defines charset aliases for import tables.
|
||||||
|
|
||||||
- Fixed destination address selection for commented replays in echo areas.
|
- Fixed destination address selection for commented replays in echo areas.
|
||||||
|
|
||||||
+ Now golded+ can draw box lines. Use keyboard configuration keyword
|
+ Now golded+ can draw box lines. Use keyboard configuration keyword
|
||||||
|
@ -404,6 +404,7 @@ const word CRC_WILDCATUSERNO = 0xC2FE;
|
|||||||
const word CRC_WRITEHEADER = 0x2589;
|
const word CRC_WRITEHEADER = 0x2589;
|
||||||
const word CRC_WRITETEMPLATE = 0xF4CB;
|
const word CRC_WRITETEMPLATE = 0xF4CB;
|
||||||
const word CRC_XLATCHARSET = 0xA860;
|
const word CRC_XLATCHARSET = 0xA860;
|
||||||
|
const word CRC_XLATCHARSETALIAS = 0x8B19;
|
||||||
const word CRC_XLATESCSET = 0x4BA7;
|
const word CRC_XLATESCSET = 0x4BA7;
|
||||||
const word CRC_XLATEXPORT = 0x29CB;
|
const word CRC_XLATEXPORT = 0x29CB;
|
||||||
const word CRC_XLATIMPORT = 0xCE6A;
|
const word CRC_XLATIMPORT = 0xCE6A;
|
||||||
|
@ -619,6 +619,7 @@ SwitchW:
|
|||||||
SwitchX:
|
SwitchX:
|
||||||
switch(crc) {
|
switch(crc) {
|
||||||
case CRC_XLATCHARSET : CfgXlatcharset (); break;
|
case CRC_XLATCHARSET : CfgXlatcharset (); break;
|
||||||
|
case CRC_XLATCHARSETALIAS : CfgXlatcharsetalias (); break;
|
||||||
case CRC_XLATESCSET : CfgXlatescset (); break;
|
case CRC_XLATESCSET : CfgXlatescset (); break;
|
||||||
case CRC_XLATEXPORT : CfgXlatexport (); break;
|
case CRC_XLATEXPORT : CfgXlatexport (); break;
|
||||||
case CRC_XLATIMPORT : CfgXlatimport (); break;
|
case CRC_XLATIMPORT : CfgXlatimport (); break;
|
||||||
|
@ -586,6 +586,27 @@ void CfgXlatcharset() {
|
|||||||
|
|
||||||
// ------------------------------------------------------------------
|
// ------------------------------------------------------------------
|
||||||
|
|
||||||
|
void CfgXlatcharsetalias()
|
||||||
|
{
|
||||||
|
char* key;
|
||||||
|
getkeyval(&key, &val);
|
||||||
|
if (key[0] == 0) return;
|
||||||
|
|
||||||
|
std::pair<std::string, gstrarray> aliases;
|
||||||
|
aliases.first = key;
|
||||||
|
|
||||||
|
do
|
||||||
|
{
|
||||||
|
aliases.second.push_back(std::string(key));
|
||||||
|
getkeyval(&key, &val);
|
||||||
|
}
|
||||||
|
while (key[0] != 0);
|
||||||
|
|
||||||
|
CFG->xlatcharsetalias.push_back(aliases);
|
||||||
|
}
|
||||||
|
|
||||||
|
// ------------------------------------------------------------------
|
||||||
|
|
||||||
void CfgXlatescset() {
|
void CfgXlatescset() {
|
||||||
|
|
||||||
Map xlt;
|
Map xlt;
|
||||||
|
@ -385,6 +385,7 @@ void CfgWildcatuserno ();
|
|||||||
void CfgWriteheader ();
|
void CfgWriteheader ();
|
||||||
void CfgWritetemplate ();
|
void CfgWritetemplate ();
|
||||||
void CfgXlatcharset ();
|
void CfgXlatcharset ();
|
||||||
|
void CfgXlatcharsetalias ();
|
||||||
void CfgXlatescset ();
|
void CfgXlatescset ();
|
||||||
void CfgXlatexport ();
|
void CfgXlatexport ();
|
||||||
void CfgXlatimport ();
|
void CfgXlatimport ();
|
||||||
|
@ -383,6 +383,7 @@ public:
|
|||||||
std::string wtpl;
|
std::string wtpl;
|
||||||
std::vector<Map> xlatcharset;
|
std::vector<Map> xlatcharset;
|
||||||
std::vector<Map> xlatescset;
|
std::vector<Map> xlatescset;
|
||||||
|
std::vector< std::pair<std::string, gstrarray> > xlatcharsetalias;
|
||||||
char xlatexport[17]; // exportcharset[17];
|
char xlatexport[17]; // exportcharset[17];
|
||||||
char xlatimport[17]; // localcharset[17];
|
char xlatimport[17]; // localcharset[17];
|
||||||
char xlatlocalset[17];
|
char xlatlocalset[17];
|
||||||
|
@ -126,6 +126,7 @@ void Cleanup(void) {
|
|||||||
CFG->username.clear();
|
CFG->username.clear();
|
||||||
CFG->xlatcharset.clear();
|
CFG->xlatcharset.clear();
|
||||||
CFG->xlatescset.clear();
|
CFG->xlatescset.clear();
|
||||||
|
CFG->xlatcharsetalias.clear();
|
||||||
CFG->cmdkey.clear();
|
CFG->cmdkey.clear();
|
||||||
CFG->macro.clear();
|
CFG->macro.clear();
|
||||||
CFG->unpacker.clear();
|
CFG->unpacker.clear();
|
||||||
|
@ -2890,8 +2890,26 @@ int LoadCharset(const char* imp, const char* exp, int query) {
|
|||||||
|
|
||||||
// Find and load charset table
|
// Find and load charset table
|
||||||
std::vector<Map>::iterator xlt;
|
std::vector<Map>::iterator xlt;
|
||||||
for(n = 0, xlt = CFG->xlatcharset.begin(); xlt != CFG->xlatcharset.end(); xlt++, n++) {
|
for(n = 0, xlt = CFG->xlatcharset.begin(); xlt != CFG->xlatcharset.end(); xlt++, n++)
|
||||||
if(striinc(xlt->imp, imp) and striinc(xlt->exp, exp)) {
|
{
|
||||||
|
if (!striinc(xlt->exp, exp)) continue;
|
||||||
|
|
||||||
|
bool imp_found = make_bool(striinc(xlt->imp, imp));
|
||||||
|
|
||||||
|
std::vector< std::pair<std::string, gstrarray> >::iterator als;
|
||||||
|
for (als = CFG->xlatcharsetalias.begin();
|
||||||
|
!imp_found && (als != CFG->xlatcharsetalias.end()); als++)
|
||||||
|
{
|
||||||
|
if (strieql(xlt->imp, als->first.c_str()))
|
||||||
|
{
|
||||||
|
for (gstrarray::iterator it = als->second.begin(); !imp_found && (it != als->second.end()); it++)
|
||||||
|
if (striinc(it->c_str(), imp))
|
||||||
|
imp_found = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (imp_found)
|
||||||
|
{
|
||||||
// Already loaded?
|
// Already loaded?
|
||||||
if(CharTable and CharTable->level!=0 and n==current_table)
|
if(CharTable and CharTable->level!=0 and n==current_table)
|
||||||
return CharTable->level;
|
return CharTable->level;
|
||||||
|
Reference in New Issue
Block a user