X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=UCI2WB.c;h=29d4040d253ca82a83282e7320b75ea60cd9a201;hb=d22aa698a5c509b3b995f26cfb72249af3129a9b;hp=ac6f7885355bf176a4c36cb8c1c4b433ba57a465;hpb=007b58c758fdb300cbe21a202f85ebe733f6a786;p=uci2wb.git diff --git a/UCI2WB.c b/UCI2WB.c index ac6f788..29d4040 100644 --- a/UCI2WB.c +++ b/UCI2WB.c @@ -271,7 +271,7 @@ Engine2GUI() if(lastScore == 100001 && iniPos[0] != 'f') { printf("%s {mate}\n", stm == BLACK ? "1-0" : "0-1"); computer = NONE; } } else if(!strcmp(command, "info")) { - int d=0, s=0, t=0, n=0; + int d=0, s=0, t=(GetTickCount() - startTime)/10, n=1; char *pv; if(sscanf(line+5, "string times @ %c", &dummy) == 1) { printf("# %s", line+12); continue; } if(collect && (pv = strstr(line+5, "currmove "))) { @@ -341,8 +341,9 @@ Engine2GUI() if(buf[0]) printf("%s", buf); } else if(!strcmp(command, "id")) { - char name[256]; + static char name[256], version[256]; if(sscanf(line, "id name %[^\n]", name) == 1) printf("feature myname=\"%s (U%cI2WB)\"\n", name, sc-32); + if(sscanf(line, "id version %[^\n]", version) == 1 && *name) printf("feature myname=\"%s %s (U%cI2WB)\"\n", name, version, sc-32); } else if(!strcmp(command, "readyok")) { pause = 0; Sync(WAKEUP); } // resume processing of GUI commands else if(sc == 'x'&& !strcmp(command, "ucciok") || sscanf(command, "u%ciok", &c)==1 && c==sc) {