From: Daniel Mehrmann Date: Wed, 11 Feb 2004 14:42:32 +0000 (+0000) Subject: Add color zippy lines for winboard X-Git-Tag: v4.2.8~53 X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=b6563b6394335626a4d7c65d51c2113ec91a41fb;p=xboard.git Add color zippy lines for winboard with ics interaction console --- diff --git a/backend.c b/backend.c index 43f5ed5..f916bfb 100644 --- a/backend.c +++ b/backend.c @@ -1462,7 +1462,12 @@ read_from_ics(isr, closure, data, count, error) int i, oldi; int buf_len; int next_out; - int tkind; + int tkind; +#ifdef WIN32 + /* For zippy color lines of winboard + * cleanup for gcc compiler */ + int backup; +#endif char *p; #ifdef WIN32 @@ -1719,15 +1724,23 @@ read_from_ics(isr, closure, data, count, error) oldi = i; if (appData.zippyTalk || appData.zippyPlay) { -#if ZIPPY +#if ZIPPY + #ifdef WIN32 + /* Backup adress for color zippy lines */ + backup = i; + if (first.initDone && loggedOn == TRUE) + if (ZippyControl(buf, &backup) || ZippyConverse(buf, &backup) || + (appData.zippyPlay && ZippyMatch(buf, &backup))); + #else if (ZippyControl(buf, &i) || ZippyConverse(buf, &i) || (appData.zippyPlay && ZippyMatch(buf, &i))) { loggedOn = TRUE; continue; - } + } + #endif #endif - } else { + } if (/* Don't color "message" or "messages" output */ (tkind = 5, looking_at(buf, &i, "*. * (*:*): ")) || looking_at(buf, &i, "*. * at *:*: ") || @@ -1883,7 +1896,6 @@ read_from_ics(isr, closure, data, count, error) curColor = ColorSeek; } continue; - } } if (looking_at(buf, &i, "\\ ")) {