Skip to content
Snippets Groups Projects
Commit b8389381 authored by deuce's avatar deuce
Browse files

Some fix-ups of textattr() in ANSI mode. #ifdef'ed out support for

ESC[22m and ESC[25m (Unfortunately not widely supported).
Fix old calculations to match new calculations so the equality test is
meaningfull (should result in less verbose messages).

Still no idea what is causing the bright attribute to be stuck high when
SyncTERM is ran as a door under Synchronet and accessed using mTel.
parent 2af6fb54
No related branches found
No related tags found
No related merge requests found
......@@ -317,21 +317,26 @@ void ansi_textattr(int attr)
br=attr&0x04;
oa=ansi_curr_attr>>8;
obl=oa>>7;
obl=oa&0x80;
obg=(oa>>4)&0x7;
ofg=oa&0x07;
obr=(oa>>3)&0x01;
obr=oa&0x04;
ansi_curr_attr=attr<<8;
strcpy(str,"\033[");
if(obl!=bl) {
if(!bl) {
if(!bl)
#if 0
strcat(str,"25;");
#else
{
strcat(str,"0;");
ofg=7;
obg=0;
obr=0;
}
#endif
else
strcat(str,"5;");
}
......@@ -340,10 +345,12 @@ void ansi_textattr(int attr)
strcat(str,"1;");
else
#if 0
strcat(str,"2;");
strcat(str,"22;");
#else
{
strcat(str,"0;");
if(bl)
strcat(str,"5;");
ofg=7;
obg=0;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment