X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=backend.c;h=c259cc56e436a6327326be170c11e9a5d2d52a84;hb=8e2df8ca84410f38449ed544cf115d2c470a52c5;hp=cb369090a527ab54a6483f05afe40d41d04d3695;hpb=c856b0337e03ec6ef848a1eae6f33c2071683133;p=xboard.git diff --git a/backend.c b/backend.c index cb36909..c259cc5 100644 --- a/backend.c +++ b/backend.c @@ -1662,6 +1662,16 @@ InitBackEnd3 P((void)) } } +void +HistorySet( char movelist[][2*MOVE_LEN], int first, int last, int current ) +{ + MoveHistorySet( movelist, first, last, current, pvInfoList ); + + EvalGraphSet( first, last, current, pvInfoList ); + + MakeEngineOutputTitle(); +} + /* * Establish will establish a contact to a remote host.port. * Sets icsPR to a ProcRef for a process (or pseudo-process) @@ -11945,12 +11955,18 @@ SaveGameToFile(filename, append) { FILE *f; char buf[MSG_SIZ]; - int result; + int result, i, t,tot=0; if (strcmp(filename, "-") == 0) { return SaveGame(stdout, 0, NULL); } else { - f = fopen(filename, append ? "a" : "w"); + for(i=0; i<10; i++) { // upto 10 tries + f = fopen(filename, append ? "a" : "w"); + if(f && i) fprintf(f, "[Delay \"%d retries, %d msec\"]\n",i,tot); + if(f || errno != 13) break; + DoSleep(t = 5 + random()%11); // wait 5-15 msec + tot += t; + } if (f == NULL) { snprintf(buf, sizeof(buf), _("Can't open \"%s\""), filename); DisplayError(buf, errno);