Support Scorpio bitbases
[uci2wb.git] / UCI2WB.c
index 05600ee..4f7fb9d 100644 (file)
--- a/UCI2WB.c
+++ b/UCI2WB.c
@@ -32,7 +32,7 @@
 // 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,3check,giveaway,suicide,losers,atomic,seirawan,shogi,xiangqi"\r
-#define EGT ",gaviotaTbPath,syzygyPath,nalimovPath,robbotripleBaseDirectory,robbototalBaseDirectory,"\r
+#define EGT ",gaviotaTbPath,syzygyPath,nalimovPath,robbotripleBaseDirectory,robbototalBaseDirectory,bitbases path,"\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
@@ -361,7 +361,7 @@ Engine2GUI()
            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(p = strcasestr(EGT, buf)) { // collect EGT formats\r
-               strcpy(buf, p); for(p=buf; *++p >='a';){} *p = 0; strcat(egts, buf); continue; // clip at first non-lower-case\r
+               strcpy(buf, p); for(p=buf; *++p >='a';){} if(*p == ' ') strcpy(buf, ",scorpio"); *p = 0; strcat(egts, buf); continue; // clip at first non-lower-case\r
            }\r
            // pass on engine-defined option as WB option feature\r
            if(!strcmp(type, "filename")) type[4] = 0;\r
@@ -593,7 +593,7 @@ GUI2Engine()
        else if(!strcmp(command, "cores")&& !!*threadOpt) { sscanf(line, "cores %d", &cores); EPRINT((f, "# setoption %s%s %s%d\n", nameWord, threadOpt, valueWord, cores)) }\r
        else if(!strcmp(command, "egtpath")){\r
            sscanf(line+8, "%s %[^\n]", type, command);\r
-            if(p = strstr(EGT, type)) strcpy(type, p), p = strchr(type, ','), *p = 0;\r
+            if(p = strstr(EGT, type)) strcpy(type, p), p = strchr(type, ','), *p = 0; else strcpy(type, "bitbases path");\r
            EPRINT((f, "# setoption name %s value %s\n", type, command));\r
        }\r
        else if(!strcmp(command, "sd"))     sscanf(line, "sd %d", &depth);\r