Implemented \e[39m & \e[49m.

This commit is contained in:
Jason Hood 2012-06-01 23:42:58 +10:00
parent 4d2dec15d3
commit 4f78bdba6d
2 changed files with 23 additions and 15 deletions

12
ANSI.c
View File

@ -82,8 +82,9 @@
fix 32-bit process trying to identify 64-bit process;
hook _lwrite & _hwrite.
v1.52, 10 April, 2012:
use ansicon.exe to enable 32-bit to inject into 64-bit.
v1.52, 10 April & 1 June, 2012:
use ansicon.exe to enable 32-bit to inject into 64-bit;
implement \e[39m & \e[49m (only setting color, nothing else).
*/
#include "ansicon.h"
@ -387,6 +388,8 @@ void InterpretEscSeq( void )
else switch (es_argv[i])
{
case 0:
case 39:
case 49:
{
TCHAR def[4];
int a;
@ -399,8 +402,12 @@ void InterpretEscSeq( void )
grm.reverse = TRUE;
a = -a;
}
if (es_argv[i] != 49)
grm.foreground = attr2ansi[a & 7];
if (es_argv[i] != 39)
grm.background = attr2ansi[(a >> 4) & 7];
if (es_argv[i] == 0)
{
if (es_argc == 1)
{
grm.bold = a & FOREGROUND_INTENSITY;
@ -414,6 +421,7 @@ void InterpretEscSeq( void )
grm.rvideo = 0;
grm.concealed = 0;
}
}
break;
case 1: grm.bold = FOREGROUND_INTENSITY; break;

View File

@ -66,7 +66,7 @@
pass process & thread identifiers on the command line (for x86->x64).
*/
#define PDATE L"10 April, 2012"
#define PDATE L"1 June, 2012"
#include "ansicon.h"
#include "version.h"