Switch to new tbhits protocol
authorH.G. Muller <h.g.muller@hccnet.nl>
Wed, 15 Jan 2014 19:45:56 +0000 (20:45 +0100)
committerH.G. Muller <h.g.muller@hccnet.nl>
Wed, 15 Jan 2014 19:45:56 +0000 (20:45 +0100)
The extended info is now sent in "%2d %4.0f %d\t" format.

uci.c
xboard2uci.c

diff --git a/uci.c b/uci.c
index 716c8cb..64cbdce 100644 (file)
--- a/uci.c
+++ b/uci.c
@@ -330,7 +330,7 @@ int uci_parse(uci_t * uci, const char string[]) {
    ASSERT(string!=NULL);
 
    // init
-
+gui_send(GUI, "# %s\n", string);
    event = EVENT_NONE;
 
    // parse
index f4c894d..31312e4 100644 (file)
@@ -1716,6 +1716,9 @@ static void send_info() {
 
 // send_pv()
 
+//define EXT_INFO_FORMAT  "{%d,%.0f,"S64_FORMAT"} "
+#define EXT_INFO_FORMAT  " %2d %4.0f "S64_FORMAT"\t"
+
 static void send_pv() {
 
    char pv_string[StringSize];
@@ -1738,7 +1741,7 @@ static void send_pv() {
                 if(Uci->depth==-1) //hack to clear the engine output window
              gui_send(GUI,"%d %+d %.0f "S64_FORMAT" ",0,report_best_score(),Uci->time*100.0,Uci->node_nb);
                if(option_get_bool(Option,"ShowTbHits"))
-                gui_send(GUI,"%d %+d %.0f "S64_FORMAT" {%d,%.0f,"S64_FORMAT"} %s%c",Uci->best_depth,report_best_score(),
+                gui_send(GUI,"%d %+d %.0f "S64_FORMAT EXT_INFO_FORMAT"%s%c",Uci->best_depth,report_best_score(),
                        Uci->time*100.0,Uci->node_nb,Uci->sel_depth,Uci->speed/1e3,Uci->tbhit_nb,pv_string,Uci->bound_type);
                else
                 gui_send(GUI,"%d %+d %.0f "S64_FORMAT" %s%c",Uci->best_depth,report_best_score(),Uci->time*100.0,Uci->node_nb,pv_string,Uci->bound_type);
@@ -1753,7 +1756,7 @@ static void send_pv() {
             move_to_san(move,board,move_string,256);
             line_to_san(Uci->best_pv,Uci->board,pv_string,StringSize);
            if(option_get_bool(Option,"ShowTbHits"))
-                gui_send(GUI,"%d %+d %.0f "S64_FORMAT" {%d,%.0f,"S64_FORMAT"} (%s) %s%c",Uci->best_depth,report_best_score(),
+                gui_send(GUI,"%d %+d %.0f "S64_FORMAT EXT_INFO_FORMAT"(%s) %s%c",Uci->best_depth,report_best_score(),
                        Uci->time*100.0,Uci->node_nb,Uci->sel_depth,Uci->speed/1e3,Uci->tbhit_nb,move_string,pv_string,Uci->bound_type);
            else
                gui_send(GUI,"%d %+d %.0f "S64_FORMAT" (%s) %s%c",Uci->best_depth,report_best_score(),