// Set VARIANTS for in WinBoard variant feature. (With -s option this will always be reset to use "shogi".)\r
#define VARIANTS ",normal,xiangqi"\r
#define STDVARS "chess,chess960,crazyhouse,threecheck,giveaway,atomic,seirawan,shogi,xiangqi"\r
+#define EGT ",syzygypath,nalimovpath,gaviotapath,"\r
\r
#define DPRINT if(debug) printf\r
#define EPRINT(X) { char f[999]; sprintf X; DPRINT("%s", f); fprintf(toE, "%s", f + 2*(*f == '#')); /* strip optional # prefix */ }\r
void *\r
Engine2GUI()\r
{\r
- char line[1024], command[256];\r
+ char line[1024], command[256]; static char egts[999];\r
\r
if(fromF = fopen("DefectiveEngineOptions.ini", "r")) printf("# fake engine input\n");\r
while(1) {\r
}\r
if(!strcasecmp(name, "newgame") && !strcmp(type, "button")) { newGame++; continue; }\r
if(!strcasecmp(name, "usemillisec")) { unit = (!strcmp(val, "false") ? 2 : 1); continue; }\r
+ sprintf(buf, ",%s,", name); if(strcasestr(EGT, buf)) { buf[strlen(buf)-5] = 0; strcat(egts, buf); continue; } // collect EGT formats\r
// pass on engine-defined option as WB option feature\r
if(!strcmp(type, "filename")) type[4] = 0;\r
sprintf(buf, "feature option=\"%s -%s", name, type); q = buf + strlen(buf);\r
else *p++ = *q++; // copy other variant names unmodified\r
if(frc) sprintf(p, ",normal,fischerandom"), printf("feature oocastle=%d\n", frc<0); // unannounced FRC uses O-O castling\r
if(*varList) printf("feature variants=\"%s\"\n", varList+1); // from UCI_Variant combo and/or UCI_Chess960 check options\r
+ if(*egts) { for(p=egts; *p = tolower(*p); p++); printf("feature egt=\"%s\"\n", egts+1); }\r
printf("feature smp=1 memory=%d done=1\n", hasHash);\r
if(unit == 2) { unit = 1; EPRINT((f, "# setoption usemillisec true\n")) }\r
Sync(WAKEUP); // done with options\r