removing empty lines from ICS play
authorH.G. Muller <h.g.muller@hccnet.nl>
Tue, 27 Oct 2009 03:42:24 +0000 (20:42 -0700)
committerArun Persaud <arun@nubati.net>
Tue, 27 Oct 2009 03:42:24 +0000 (20:42 -0700)
this patch causes removal of spurious prompts during ICS play also if the prompt is preceeded by a number of empty lines (as the board for the opponent move is on FICS).

backend.c

index f1d3eb4..9712e8f 100755 (executable)
--- a/backend.c
+++ b/backend.c
@@ -3260,6 +3260,7 @@ read_from_ics(isr, closure, data, count, error)
 
                    /* Usually suppress following prompt */
                    if (!(forwardMostMove == 0 && gameMode == IcsExamining)) {
 
                    /* Usually suppress following prompt */
                    if (!(forwardMostMove == 0 && gameMode == IcsExamining)) {
+                       while(looking_at(buf, &i, "\n")); // [HGM] skip empty lines
                        if (looking_at(buf, &i, "*% ")) {
                            savingComment = FALSE;
                        }
                        if (looking_at(buf, &i, "*% ")) {
                            savingComment = FALSE;
                        }