Suppress 'setup' command for some standard variants
[uci2wb.git] / UCI2WB.c
index 079960d..dddb073 100644 (file)
--- a/UCI2WB.c
+++ b/UCI2WB.c
@@ -30,7 +30,8 @@
 #include <string.h>\r
 \r
 // 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 VARIANTS "normal,xiangqi"\r
+#define STDVARS "chess,chess960,crazyhouse,threecheck,giveaway,atomic,seirawan,shogi,xiangqi"\r
 \r
 #define DPRINT if(debug) printf\r
 \r
@@ -281,7 +282,7 @@ Engine2GUI()
            char *pv, varName[80];\r
            if(sscanf(line+5, "string times @ %c", &dummy) == 1) { printf("# %s", line+12); continue; }\r
            if(sscanf(line+5, "string variant %s", varName) == 1) {\r
-               if(strcmp(varName,"chess") && (p = strstr(line+18, " startpos "))) printf("setup (-) 8x8+0_fairy %s", p+10);\r
+               if(!strstr(STDVARS, varName) && (p = strstr(line+18, " startpos "))) printf("setup (-) 8x8+0_fairy %s", p+10);\r
                continue;\r
            }\r
            if(collect && (pv = strstr(line+5, "currmove "))) {\r