X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=usystem.c;h=4a08e576d56bed1cbfebb439365618a480a9a85d;hb=89b07e580a401d8c123c4a10e82789a873f37965;hp=6ac238c493ad290426748c4bb96adb7fd5cdf018;hpb=456ca4fea2c7092aaaf14e9bc827e534f96e4d22;p=xboard.git diff --git a/usystem.c b/usystem.c index 6ac238c..4a08e57 100644 --- a/usystem.c +++ b/usystem.c @@ -263,6 +263,7 @@ ParseIcsTextColors () } textColors[ColorNone].fg = textColors[ColorNone].bg = -1; textColors[ColorNone].attr = 0; + SetTextColor(cnames, textColors[ColorNormal].fg - 30, textColors[ColorNormal].bg - 40, -2); // kludge to announce background color to front-end } static Boolean noEcho; @@ -307,6 +308,8 @@ Colorize (ColorClass cc, int continuation) char buf[MSG_SIZ]; int count, outCount, error; + SetTextColor(cnames, textColors[(int)cc].fg - 30, textColors[(int)cc].bg - 40, textColors[(int)cc].attr); // for GTK widget + if (textColors[(int)cc].bg > 0) { if (textColors[(int)cc].fg > 0) { snprintf(buf, MSG_SIZ, "\033[0;%d;%d;%dm", textColors[(int)cc].attr, @@ -676,6 +679,7 @@ OutputToProcess (ProcRef pr, char *message, int count, int *outError) free(msg); } } + if(*message != '\033') ConsoleWrite(message, count); } else outCount = write(cp->fdTo, message, count);