version 1.4.61b
[polyglot.git] / xboard2uci.c
index c8c8354..80e0a62 100644 (file)
@@ -305,7 +305,7 @@ void xboard2uci_gui_step(char string[]) {
 \r
                } else if (match(string,"new")) {\r
 \r
-            uci_send_isready(Uci);\r
+                   uci_send_isready_sync(Uci);\r
                        my_log("POLYGLOT NEW GAME\n");\r
 \r
                        option_set(Option,"Chess960","false");\r
@@ -356,7 +356,7 @@ void xboard2uci_gui_step(char string[]) {
                        if (DelayPong) {\r
                                if (XB->ping >= 0) gui_send(GUI,"pong %d",XB->ping); // HACK: get rid of old ping\r
                                XB->ping = atoi(Star[0]);\r
-                               uci_send_isready(Uci);\r
+                               uci_send_isready_sync(Uci);\r
                        } else {\r
                                ASSERT(XB->ping==-1);\r
                                gui_send(GUI,"pong %s",Star[0]);\r
@@ -752,18 +752,18 @@ void xboard2uci_engine_step(char string[]) {
                        }\r
                }\r
                if(((event & EVENT_ILLEGAL_MOVE)!=0) && (State->state == THINK)){\r
-            game_get_board(Game,board);\r
-            if(board->turn==White){\r
-                gui_send(GUI,"0-1 {polyglot: resign"\r
-                            " (illegal engine move white)}");\r
-            }else{\r
-                gui_send(GUI,"1-0 {polyglot: resign"\r
-                         " (illegal engine move black)}");\r
-            }\r
-            board_disp(board);\r
-            XB->result = TRUE;\r
-            mess();\r
-        }\r
+                   game_get_board(Game,board);\r
+                   if(board->turn==White){\r
+                       gui_send(GUI,"0-1 {polyglot: resign"\r
+                                " (illegal engine move by white: %s)}",Uci->bestmove);\r
+                   }else{\r
+                       gui_send(GUI,"1-0 {polyglot: resign"\r
+                                " (illegal engine move by black: %s)}",Uci->bestmove);\r
+                   }\r
+                   board_disp(board);\r
+                   XB->result = TRUE;\r
+                   mess();\r
+               }\r
 }\r
 \r
 // format_xboard_option_line\r
@@ -838,6 +838,7 @@ static void send_xboard_options(){
     gui_send(GUI,"feature pause=0");\r
     gui_send(GUI,"feature ping=1");\r
     gui_send(GUI,"feature playother=1");\r
+    gui_send(GUI,"feature sigint=1");\r
     gui_send(GUI,"feature reuse=1");\r
     gui_send(GUI,"feature san=0");\r
     gui_send(GUI,"feature setboard=1");\r