From d3c211c5c2ebfb2e77a6dc37c973ce7d69f301fd Mon Sep 17 00:00:00 2001 From: H.G. Muller Date: Thu, 9 Feb 2012 13:05:42 +0100 Subject: [PATCH] Implement kludge to set options through Move Type-in A leading "!!! " will cause the rest of the line to be parsed as command line. Very dangerous, as an unknown option (e.g. because of a typo) will cause a fatal error, which makes XBoard exit. --- backend.c | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/backend.c b/backend.c index c85a2ac..c196662 100644 --- a/backend.c +++ b/backend.c @@ -15635,6 +15635,14 @@ TypeInDoneEvent (char *move) ToNrEvent(2*n-1); return; } + // undocumented kludge: allow command-line option to be typed in! + // (potentially fatal, and does not implement the effect of the option.) + // should only be used for options that are values on which future decisions will be made, + // and definitely not on options that would be used during initialization. + if(strstr(move, "!!! -") == move) { + ParseArgsFromString(move+4); + return; + } if (gameMode != EditGame && currentMove != forwardMostMove && gameMode != Training) { -- 1.7.0.4