Add color zippy lines for winboard
authorDaniel Mehrmann <mehrmann>
Wed, 11 Feb 2004 14:42:32 +0000 (14:42 +0000)
committerDaniel Mehrmann <mehrmann>
Wed, 11 Feb 2004 14:42:32 +0000 (14:42 +0000)
with ics interaction console

backend.c

index 43f5ed5..f916bfb 100644 (file)
--- 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;\r
+#ifdef WIN32\r
+       /* For zippy color lines of winboard\r
+        * cleanup for gcc compiler */\r
+       int backup;\r
+#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\r
+       #ifdef WIN32\r
+               /* Backup adress for color zippy lines */\r
+               backup = i;\r
+               if (first.initDone && loggedOn == TRUE)\r
+                       if (ZippyControl(buf, &backup) || ZippyConverse(buf, &backup) ||\r
+                               (appData.zippyPlay && ZippyMatch(buf, &backup)));\r
+               #else
                if (ZippyControl(buf, &i) ||
                    ZippyConverse(buf, &i) ||
                    (appData.zippyPlay && ZippyMatch(buf, &i))) {
                    loggedOn = TRUE;
                    continue;
-               }
+               }\r
+       #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, "\\   ")) {