}
+#if defined(_WIN32)
+char *
+strtok_r( char *s, const char *t, char **next)
+{
+ char *p, *r;
+ if( ! s ) s = *next;
+ if( ! s ) return NULL;
+ while( *s && strchr(t, *s) ) s++;
+ if( ! *s ) return NULL;
+ r = s;
+ while( *s && ! (p = strchr(t, *s)) ) s++;
+ *next = s + 1;
+ if( ! *s ) *next = NULL;
+ *s = '\0';
+ return r;
+}
+#endif
+
int CONV
procedure( tree_t * restrict ptree )
{
IF("analyze") { return 0; }
IF("exit") { return 0; }
IF("variant") { /* ignore, since it must be Shogi */; }
- IF("setboard") { forceMode = plyNr = 0; read_fen( line ); return 0; }
+ IF("setboard") { forceMode = 1; plyNr = 0; read_fen( line ); return 0; }
IF("option") {
if(sscanf(line+7, "MultiPV=%d", &value) == 1) { sprintf(line, "mpv num %d", value); return 0; }
if(sscanf(line+7, "centi-Pawn margin=%d", &value) == 1) { sprintf(line, "mpv width %d", value); return 0; }