int pid;\r
\r
#ifdef WIN32\r
-char *strcasestr (char *p, char *q) { char *r = p; while(*r) *r = tolower(*r), r++; return strstr(p, q); }\r
+char *strcasestr (char *p, char *q) { while(*p) { char *r=p++, *s=q; while(tolower(*r++) == tolower(*s) && *s) s++; if(!*s) return p-1; } return NULL; }\r
\r
WinPipe(HANDLE *hRd, HANDLE *hWr)\r
{\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
+ else if(sc == 'c' && !strcmp(type, "string")) { // in UCI try to guess which strings are file or directory names\r
+ if(strcasestr(name, "file")) strcpy(type, "file"); else\r
+ if(strcasestr(name, "path") || strcasestr(name, "directory") || strcasestr(name, "folder")) strcpy(type, "path");\r
+ }\r
sprintf(buf, "feature option=\"%s -%s", name, type); q = buf + strlen(buf);\r
if( !strcmp(type, "file")\r
|| !strcmp(type, "string")) sprintf(q, " %s\"\n", val);\r