From: H.G. Muller Date: Thu, 9 Feb 2012 12:05:42 +0000 (+0100) Subject: Implement kludge to set options through Move Type-in X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=d3c211c5c2ebfb2e77a6dc37c973ce7d69f301fd;p=xboard.git 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. --- 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) {