Implement the display level of the charset (2nd parameter of 3rd line of .CHS. Test this please!
This commit is contained in:
parent
a1eb96afda
commit
e1ffb097c6
@ -667,12 +667,23 @@ void ReadXlatTables()
|
||||
ch = 0;
|
||||
else
|
||||
ch = 128;
|
||||
if(ChsTable.level)
|
||||
{
|
||||
for(;*ptr&&isdigit(*ptr);ptr++);
|
||||
for(;*ptr&&isspace(*ptr);ptr++);
|
||||
if(*ptr&&isdigit(*ptr))
|
||||
{
|
||||
ChsTable.displaylevel = atoi(ptr);
|
||||
if(!ChsTable.displaylevel) ChsTable.displaylevel = ChsTable.level;
|
||||
}
|
||||
else ChsTable.displaylevel = ChsTable.level;
|
||||
}
|
||||
break;
|
||||
case 4:
|
||||
strcpy(ChsTable.imp, strbtrim(ptr));
|
||||
break;
|
||||
case 5:
|
||||
if (ChsTable.level)
|
||||
if (ChsTable.level && ChsTable.version!=-1)
|
||||
{
|
||||
gsprintf(PRINTF_DECLARE_BUFFER(ChsTable.exp), "%s %d",
|
||||
strbtrim(ptr), ChsTable.level);
|
||||
|
@ -242,7 +242,8 @@ static void MakeMsg3(int& mode, GMsg* msg) {
|
||||
{
|
||||
msg->charsetlevel = LoadCharset(CFG->xlatlocalset, AA->Xlatexport());
|
||||
if (msg->charsetlevel)
|
||||
gsprintf(PRINTF_DECLARE_BUFFER(msg->charset), "%s %d", AA->Xlatexport(), msg->charsetlevel);
|
||||
// gsprintf(PRINTF_DECLARE_BUFFER(msg->charset), "%s %d", AA->Xlatexport(), msg->charsetlevel);
|
||||
gsprintf(PRINTF_DECLARE_BUFFER(msg->charset), "%s %d", AA->Xlatexport(), CharTable->displaylevel);
|
||||
else
|
||||
gsprintf(PRINTF_DECLARE_BUFFER(msg->charset), "%s 2", CFG->xlatlocalset);
|
||||
}
|
||||
@ -748,7 +749,8 @@ void MakeMsg(int mode, GMsg* omsg, bool ignore_replyto) {
|
||||
msg->orig = AA->Aka().addr;
|
||||
msg->charsetlevel = LoadCharset(CFG->xlatlocalset, AA->Xlatexport());
|
||||
if (msg->charsetlevel)
|
||||
gsprintf(PRINTF_DECLARE_BUFFER(msg->charset), "%s %d", AA->Xlatexport(), msg->charsetlevel);
|
||||
// gsprintf(PRINTF_DECLARE_BUFFER(msg->charset), "%s %d", AA->Xlatexport(), msg->charsetlevel);
|
||||
gsprintf(PRINTF_DECLARE_BUFFER(msg->charset), "%s %d", AA->Xlatexport(), CharTable->displaylevel);
|
||||
else
|
||||
gsprintf(PRINTF_DECLARE_BUFFER(msg->charset), "%s 2", CFG->xlatlocalset);
|
||||
strcpy(msg->odom, CFG->aka[AkaMatch(&msg->orig, &AA->Aka().addr)].domain);
|
||||
|
@ -1218,7 +1218,7 @@ int LoadMessage(GMsg* msg, int margin) {
|
||||
|
||||
msg->attr.upd0();
|
||||
|
||||
if((reader_rcv_noise > 1) and AA->isnet() and msg->attr.cfm()))
|
||||
if((reader_rcv_noise > 1) and AA->isnet() and msg->attr.cfm())
|
||||
reader_gen_confirm = true;
|
||||
}
|
||||
}
|
||||
|
@ -852,6 +852,7 @@ struct Chs {
|
||||
long id;
|
||||
int version;
|
||||
int level;
|
||||
int displaylevel;
|
||||
XlatName imp; // From Charset
|
||||
XlatName exp; // To Charset
|
||||
ChsTab t[256]; // The Translation Table
|
||||
|
Reference in New Issue
Block a user