X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=engineoutput.c;h=7dc403e41c34bb9e580735bf827b2beb4b3490ec;hb=4099d0667f611390759e74b42cadf4325ee1f2cd;hp=22b008c19f5d837f6a71d90993e878eccb387dae;hpb=e80c98c04e951e5026a24531cd6316be962636b9;p=xboard.git diff --git a/engineoutput.c b/engineoutput.c index 22b008c..7dc403e 100644 --- a/engineoutput.c +++ b/engineoutput.c @@ -28,7 +28,6 @@ #include "config.h" #include -#include #if STDC_HEADERS # include @@ -70,6 +69,7 @@ static void UpdateControls( EngineOutputData * ed ); static int lastDepth[2] = { -1, -1 }; static int lastForwardMostMove[2] = { -1, -1 }; static int engineState[2] = { -1, -1 }; +static char lastLine[2][MSG_SIZ]; #define MAX_VAR 400 static int scores[MAX_VAR], textEnd[MAX_VAR], curDepth[2], nrVariations[2]; @@ -163,7 +163,13 @@ void SetProgramStats( FrontEndProgramStats * stats ) // now directly called by b clearMemo = TRUE; } - if( clearMemo ) { DoClearMemo(which); nrVariations[which] = 0; } + if( clearMemo ) { + DoClearMemo(which); nrVariations[which] = 0; + if(appData.ponderNextMove && lastLine[which][0]) { + InsertIntoMemo( which, lastLine[which], 0 ); + InsertIntoMemo( which, "\n", 0 ); + } + } /* Update */ lastDepth[which] = depth == 1 && ed.nodes == 0 ? 0 : depth; // [HGM] info-line kudge @@ -476,6 +482,7 @@ static void UpdateControls( EngineOutputData * ed ) /* Update memo */ InsertIntoMemo( ed->which, buf, InsertionPoint(strlen(buf), ed) ); + strncpy(lastLine[ed->which], buf, MSG_SIZ); } /* Colors */