From: H.G. Muller Date: Wed, 21 Dec 2011 13:41:31 +0000 (+0100) Subject: Add -afterTourney option X-Git-Url: http://winboard.nl/cgi-bin?p=xboard.git;a=commitdiff_plain;h=259aca883470b6cd7fc47e417475f05120400d3c Add -afterTourney option Only the instance pinting the tourney result will execute this. --- diff --git a/args.h b/args.h index 6f51446..a9c120c 100644 --- a/args.h +++ b/args.h @@ -580,6 +580,7 @@ ArgDescriptor argDescriptors[] = { { "syncAfterCycle", ArgBoolean, (void *) &appData.cycleSync, FALSE, (ArgIniType) TRUE }, { "seedBase", ArgInt, (void *) &appData.seedBase, FALSE, (ArgIniType) 1 }, { "afterGame", ArgString, (void *) &appData.afterGame, FALSE, INVALID }, + { "afterTourney", ArgString, (void *) &appData.afterTourney, FALSE, INVALID }, /* [HGM] board-size, adjudication and misc. options */ { "oneClickMove", ArgBoolean, (void *) &appData.oneClick, TRUE, (ArgIniType) FALSE }, diff --git a/backend.c b/backend.c index 8dc8f07..5e346e5 100644 --- a/backend.c +++ b/backend.c @@ -10473,6 +10473,7 @@ GameEnds(result, resultDetails, whosays) first.matchWins, second.matchWins, appData.matchGames - (first.matchWins + second.matchWins)); if(!appData.tourneyFile[0]) matchGame++, DisplayTwoMachinesTitle(); // [HGM] update result in window title + if(strcmp(ranking, "busy") && appData.afterTourney && appData.afterTourney[0]) RunCommand(appData.afterTourney); popupRequested++; // [HGM] crash: postpone to after resetting endingGame if (appData.firstPlaysBlack) { // [HGM] match: back to original for next match first.twoMachinesColor = "black\n"; diff --git a/common.h b/common.h index e76320c..09e9e77 100644 --- a/common.h +++ b/common.h @@ -674,6 +674,7 @@ typedef struct { char *results; char *participants; char *afterGame; + char *afterTourney; int tourneyType; int tourneyCycles; int seedBase;