Use feature usermove=1 in XBoard mode
authorH.G.Muller <hgm@hgm-xboard.(none)>
Thu, 6 Mar 2014 12:42:38 +0000 (13:42 +0100)
committerH.G.Muller <hgm@hgm-xboard.(none)>
Thu, 6 Mar 2014 13:24:11 +0000 (14:24 +0100)
By forcing the GUI to prefix the move with "usermove ", it will be
easier to recognize whether a command is a move (e.g. for determining
ponder hits in future ponder implementations). Moves are still recognized
without such prefix as well, for the benefit of other modes.

gnushogi/commondsp.c

index 4823f5f..56fe08b 100644 (file)
@@ -1798,7 +1798,7 @@ InputCommand(char *command, int root)
                    "shogi"
 #endif
                 );
-            printf("debug=1 setboard=1 sigint=0 memory=1 done=1\n");
+            printf("debug=1 setboard=1 sigint=0 memory=1 usermove=1 done=1\n");
         }
         else if (strcmp(s, ".") == 0)
         {   // periodic update request of analysis info: send stat01 info
@@ -2148,6 +2148,9 @@ InputCommand(char *command, int root)
         }
         else
         {
+            if (strcmp(s, "usermove") == 0)
+                sscanf(sx + 9, "%s", s);
+
             if (flag.mate)
             {
                 ok = true;