From: H.G.Muller Date: Tue, 12 Apr 2016 18:38:24 +0000 (+0200) Subject: Set suspected non-standard Chess960 check options X-Git-Tag: v2.3~29 X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=007b58c758fdb300cbe21a202f85ebe733f6a786;p=uci2wb.git Set suspected non-standard Chess960 check options Any check-type option containing the substring "960" or "frc" in their name will be set automatically when UCI2WB is run with the -f option. They will also be reported to the GUI, but always as having default setting 'true', no matter what their original default setting was, to reflect the new reality. So the potential damage this heuristic can do is limited to altereing the default. --- diff --git a/UCI2WB.c b/UCI2WB.c index fb80b68..ac6f788 100644 --- a/UCI2WB.c +++ b/UCI2WB.c @@ -308,6 +308,9 @@ Engine2GUI() if(p = strstr(line+6, " default ")) sscanf(p+1, "default %[^\n]*", val), *p = '\n'; if(!(p = strstr(line+6, " name "))) p = line+1; sscanf(p+6, "%[^\n]", name); // 'name' is omitted in UCCI if(!strcasecmp(name, "UCI_Chess960")) { frc=2; continue; } + if(frc< 0 && (strstr(name, "960") || strcasestr(name, "frc")) && !strcmp(type, "check")) { + fprintf(toE, "setoption name %s value true\n", name); strcpy(val, "true"); // set non-standard suspected FRC options + } if(!strcasecmp(name, "Threads")) { strcpy(threadOpt, name); continue; } if(!strcasecmp(name, "Ponder") || !strcasecmp(name, "USI_Ponder")) { strcpy(canPonder, name); continue; } if(!strcasecmp(name, "Hash") || !strcasecmp(name, "USI_Hash") || !strcasecmp(name, "hashsize")) {