X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=backend.c;h=490463882fe92d78a616af2f1d58a087e8c691d0;hb=dd050aef7bb911900c308e708c63f5b7006f9c0a;hp=d062185dc8e1410ee6d50f0368b9bd91571b4bd8;hpb=636be68a919cab251602e971923222db8a7ab94f;p=xboard.git diff --git a/backend.c b/backend.c index d062185..4904638 100644 --- a/backend.c +++ b/backend.c @@ -5796,6 +5796,8 @@ HandleMachineMove(message, cps) int machineWhite; char *bookHit; + cps->userError = 0; + FakeBookMove: // [HGM] book: we jump here to simulate machine moves after book hit /* * Kludge to ignore BEL characters @@ -6468,6 +6470,7 @@ if(appData.debugMode) fprintf(debugFP, "nodes = %d, %lld\n", (int) programStats. return; } if (!strncmp(message, "tellusererror ", 14)) { + cps->userError = 1; DisplayError(message + 14, 0); return; } @@ -12422,7 +12425,7 @@ SendToProgram(message, cps) } gameInfo.resultDetails = StrSave(buf); } - DisplayFatalError(buf, error, 1); + if(!cps->userError || !appData.popupExitMessage) DisplayFatalError(buf, error, 1); else errorExitStatus = 1; } } @@ -12454,7 +12457,7 @@ ReceiveFromProgram(isr, closure, message, count, error) gameInfo.resultDetails = StrSave(buf); } RemoveInputSource(cps->isr); - DisplayFatalError(buf, 0, 1); + if(!cps->userError || !appData.popupExitMessage) DisplayFatalError(buf, 0, 1); else errorExitStatus = 1; } else { sprintf(buf, _("Error reading from %s chess program (%s)"), @@ -12467,7 +12470,7 @@ ReceiveFromProgram(isr, closure, message, count, error) cps->pr = NoProc; } - DisplayFatalError(buf, error, 1); + if(!cps->userError || !appData.popupExitMessage) DisplayFatalError(buf, error, 1); else errorExitStatus = 1; } return; }