From: H.G.Muller Date: Mon, 27 Oct 2014 22:32:11 +0000 (+0100) Subject: Print 'ponder' always immediately behind 'go' X-Git-Tag: v2.0~20 X-Git-Url: http://winboard.nl/cgi-bin?p=uci2wb.git;a=commitdiff_plain;h=524e729b9b66af01911b8abfa6bb5b66e0ab706a Print 'ponder' always immediately behind 'go' Some engines do not like it if you print it otherwise. --- diff --git a/UCI2WB.c b/UCI2WB.c index d7e9671..95fe411 100644 --- a/UCI2WB.c +++ b/UCI2WB.c @@ -35,6 +35,7 @@ int mps, tc, inc, sTime, depth, myTime, hisTime, stm, computer = NONE, memory, o int statDepth, statScore, statNodes, statTime, currNr, size, collect, nr, sm, inex, on[500]; char currMove[20], moveMap[500][10], /* for analyze mode */ canPonder[20], threadOpt[20]; char board[100]; // XQ board for UCCI +char *nameWord = "name ", *valueWord = "value ", *wTime = "w", *bTime = "b", *wInc = "winc", *bInc = "binc"; // keywords that differ in UCCI int unit = 1; FILE *toE, *fromE, *fromF; @@ -130,15 +131,14 @@ StartSearch(char *ponder) { // send the 'go' command to engine. Suffix by ponder. int x = (ponder[0] != 0); int nr = moveNr + x; // we ponder for one move ahead! - fprintf(toE, "\ngo btime %d wtime %d", stm == BLACK ^ x ^ sc=='s' ? myTime : hisTime, stm == WHITE ^ x ^ sc=='s' ? myTime : hisTime); - DPRINT( "\n# go btime %d wtime %d", stm == BLACK ^ x ^ sc=='s' ? myTime : hisTime, stm == WHITE ^ x ^ sc=='s' ? myTime : hisTime); + fprintf(toE, "\ngo%s btime %d wtime %d", ponder, stm == BLACK ^ x ^ sc=='s' ? myTime : hisTime, stm == WHITE ^ x ^ sc=='s' ? myTime : hisTime); + DPRINT( "\n# go%s btime %d wtime %d", ponder, stm == BLACK ^ x ^ sc=='s' ? myTime : hisTime, stm == WHITE ^ x ^ sc=='s' ? myTime : hisTime); if(sTime > 0) { fprintf(toE, " movetime %d", sTime); DPRINT(" movetime %d", sTime); } else if(mps) { fprintf(toE, " movestogo %d", mps*(nr/(2*mps)+1)-nr/2); DPRINT(" movestogo %d", mps*(nr/(2*mps)+1)-nr/2); } if(inc && !suffix) { fprintf(toE, " winc %d binc %d", inc, inc); DPRINT(" winc %d binc %d", inc, inc); } if(depth > 0) { fprintf(toE, " depth %d", depth); DPRINT(" depth %d", depth); } if(suffix) { fprintf(toE, suffix, inc); DPRINT(suffix, inc); } - fprintf(toE, "%s\n", ponder); - DPRINT("%s\n", ponder); + fprintf(toE, "\n"); DPRINT("\n"); } void