From: H.G.Muller Date: Thu, 10 Nov 2016 09:55:41 +0000 (+0100) Subject: Print newline after 'position moves' instead of before 'go' X-Git-Tag: v2.3~2 X-Git-Url: http://winboard.nl/cgi-bin?p=uci2wb.git;a=commitdiff_plain;h=2b077abccc6427e6924b1ed903e3bce1128fc5b4 Print newline after 'position moves' instead of before 'go' The '\n' between position-moves and go was printed with the latter to avoid a separate printf for it after the move list, but this obfuscated the code, and was a show stopper for more elegant printing of debug info. --- diff --git a/UCI2WB.c b/UCI2WB.c index dffac3b..cf2f8e4 100644 --- a/UCI2WB.c +++ b/UCI2WB.c @@ -147,8 +147,8 @@ StartSearch(char *ponder) int t = (flob ? inc + myTime/40 : 1000*byo*(byo>0)); // byoyomi time if(sc == 'x') black = 1; else drawOffer = 0;// in UCCI 'black' refers to us and 'white' to opponent if(!x && drawOffer) ponder = " draw", drawOffer = 0; //pass draw offer only when not pondering - fprintf(toE, "\ngo%s %stime %d %stime %d", ponder, bTime, (black ? myTime : hisTime) - t, wTime, (!black ? myTime : hisTime) - t); - DPRINT( "\n# go%s %stime %d %stime %d", ponder, bTime, (black ? myTime : hisTime) - t, wTime, (!black ? myTime : hisTime) - t); + fprintf(toE, "go%s %stime %d %stime %d", ponder, bTime, (black ? myTime : hisTime) - t, wTime, (!black ? myTime : hisTime) - t); + DPRINT( "# go%s %stime %d %stime %d", ponder, bTime, (black ? myTime : hisTime) - t, wTime, (!black ? myTime : hisTime) - t); 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(flob || byo >= 0) sprintf(suffix, " byoyomi %d", t); // for engines running purely on byoyomi @@ -180,6 +180,7 @@ LoadPos(int moveNr) fprintf(toE, "%s moves", pos); DPRINT( "# %s moves", pos); for(j=lastCapt; j