int i, j, nrMoves;
char buf[8000], moveBuf[20];
- storedGames--;
- ToNrEvent(savedFirst[storedGames]); // sets currentMove
+ ToNrEvent(savedFirst[storedGames-1]); // sets currentMove
+ storedGames--; // do this after ToNrEvent, to make sure HistorySet will refresh entire game after PopInner returns
nrMoves = savedLast[storedGames] - currentMove;
if(annotate) {
int cnt = 10;
CommentPopDown(); // make sure no stale variation comments to the destroyed line can remain open
PopInner(annotate);
+ HistorySet(parseList, backwardMostMove, forwardMostMove, currentMove-1);
if(storedGames == 0) GreyRevert(TRUE);
return TRUE;
int OKToStartUserMove P((int x, int y));
void Reset P((int redraw, int init));
void ResetGameEvent P((void));
-Boolean HasPattern P(( const char * text, const char * pattern ));\r
-Boolean SearchPattern P(( const char * text, const char * pattern ));\r
+Boolean HasPattern P(( const char * text, const char * pattern ));
+Boolean SearchPattern P(( const char * text, const char * pattern ));
int LoadGame P((FILE *f, int n, char *title, int useList));
int LoadGameFromFile P((char *filename, int n, char *title, int useList));
int CmailLoadGame P((FILE *f, int n, char *title, int useList));
GameInfo gameInfo; /* Note that some entries may be NULL. */
} ListGame;
+extern int storedGames;
extern int opponentKibitzes;
extern ChessSquare gatingPiece;
extern List gameList;
char *optionSettings;
void *programLogo; /* [HGM] logo: bitmap of the logo */
char *fenOverride; /* [HGM} FRC: force FEN casling & ep fields by hand */
- char userError; /* [HGM] crash: flag to suppress fatal-error messages*/\r
+ char userError; /* [HGM] crash: flag to suppress fatal-error messages*/
} ChessProgramState;
extern ChessProgramState first, second;
extern Boolean shuffleOpenings;
extern ChessProgramStats programStats;
extern int opponentKibitzes; // used by wengineo.c
-extern int errorExitStatus;\r
+extern int errorExitStatus;
void SettingsPopUp P((ChessProgramState *cps)); // [HGM] really in front-end, but CPS not known in frontend.h
int WaitForEngine P((ChessProgramState *cps, DelayedEventCallback x));
void Load P((ChessProgramState *cps, int n));
static int lastFirst = 0;
static int lastLast = 0;
static int lastCurrent = -1;
+static int lastGames;
static char lastLastMove[ MOVE_LEN ];
currFirst == lastFirst &&
currLast == lastLast &&
currCurrent >= 0 &&
- TRUE )
+ lastGames == storedGames )
{
result = TRUE;
lastLast == (currLast-1) &&
lastCurrent == (currCurrent-1) &&
currCurrent == (currLast-1) &&
- TRUE )
+ lastGames == storedGames )
{
result = TRUE;
}
lastFirst = currFirst;
lastLast = currLast;
lastCurrent = currCurrent;
+ lastGames = storedGames;
lastLastMove[0] = '\0';
if( lastLast > 0 ) {