}\r
else if(!strcmp(command, "option")) { // USI option: extract data fields\r
char name[80], type[80], buf[1024], val[256], *q;\r
- int min=0, max=1e9;\r
+ int min=0, max=1e9; *val = 0;\r
if(p = strstr(line+6, " type ")) sscanf(p+1, "type %s", type), *p = '\n';\r
if(p = strstr(line+6, " min ")) sscanf(p+1, "min %d", &min), *p = '\n';\r
if(p = strstr(line+6, " max ")) sscanf(p+1, "max %d", &max), *p = '\n';\r
void\r
GUI2Engine()\r
{\r
- char line[256], command[256], *p, *q, *r, mySide;\r
+ char line[256], command[256], *p, *q, *r, mySide, type[99];\r
\r
while(1) {\r
int i, x, difficult, think=0;\r
else if(!strcmp(command, "ping")) { /* static int done; if(!done) pause = 1, fprintf(toE, "isready\n"), fflush(toE), printf("# send isready\n"), fflush(stdout), Sync(PAUSE); done = 1;*/ printf("po%s", line+2); }\r
else if(!strcmp(command, "memory")) sscanf(line, "memory %d", &memory);\r
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")){ sscanf(line, "egtpath %s %[^\n]", type, command); EPRINT((f, "# setoption name %sPath value %s\n", type,command)); }\r
else if(!strcmp(command, "sd")) sscanf(line, "sd %d", &depth);\r
else if(!strcmp(command, "st")) sscanf(line, "st %d", &sTime), sTime = 1000*sTime - 30, inc = 0, sTime /= unit;\r
else if(!strcmp(command, "name")) { if(namOpt) EPRINT((f, "# setoption name UCI_Opponent value none none %s %s", comp ? "computer" : "human", line+5)) }\r