From: H.G. Muller Date: Thu, 19 Apr 2012 20:43:11 +0000 (+0200) Subject: Warn user when all moves have been collected X-Git-Tag: v2.0~35 X-Git-Url: http://winboard.nl/cgi-bin?p=uci2wb.git;a=commitdiff_plain;h=7ba87b6b2eceae92a147246af886d9cf19178057 Warn user when all moves have been collected A line 'OK to exclude' is printed disguised as Thinking-Output, to inform the user that he can start using the exclude command. --- diff --git a/UCI2WB.c b/UCI2WB.c index 71dfd4b..654c749 100644 --- a/UCI2WB.c +++ b/UCI2WB.c @@ -32,7 +32,7 @@ char move[2000][10], checkOptions[8192], iniPos[256], hashOpt[20], pause, pondering, ponder, post, hasHash, c, sc='c', *suffix, *variants; int mps, tc, inc, sTime, depth, myTime, hisTime, stm, computer = NONE, memory, oldMem=0, cores, moveNr, lastDepth, lastScore, startTime, debug; -int statDepth, statScore, statNodes, statTime, currNr, size, collect, nr, sm, on[500]; char currMove[20], moveMap[500][10]; // for analyze mode +int statDepth, statScore, statNodes, statTime, currNr, size, collect, nr, sm, inex, on[500]; char currMove[20], moveMap[500][10]; // for analyze mode FILE *toE, *fromE; int pid; @@ -191,7 +191,10 @@ Engine2GUI() if(p = strstr(line+5, "currmovenumber ")) { n = atoi(p+15); if(collect == 1 && n != 1) continue; // wait for move 1 - if(collect + (n == 1) > 2) { collect = 3; continue; } // done collecting + if(collect + (n == 1) > 2) { // done collecting + if(inex && collect == 2) printf("%d 0 0 0 OK to exclude\n", lastDepth); + collect = 3; continue; + } collect = 2; on[nr=n] = 1; sscanf(pv+9, "%s", moveMap[n]); continue; // store move } } @@ -374,9 +377,9 @@ GUI2Engine() printf("stat01: %d %d %d %d 100 %s\n", statTime, statNodes, statDepth, 100-currNr, currMove); goto nomove; } - else if(!strcmp(command+2, "clude") && collect > 2) { + else if(!strcmp(command+2, "clude") && collect > 2) { // include or exclude int all = !strcmp(line+8, "all"), in = command[1] == 'n'; - line[strlen(line)-1] = sm = 0; // strip LF and clear sm flag + inex = 1; line[strlen(line)-1] = sm = 0; // strip LF and clear sm flag for(i=1; i