Add WB2 suffix to version number
[bonanza.git] / proce.c
diff --git a/proce.c b/proce.c
index a17a5de..8556ef1 100644 (file)
--- a/proce.c
+++ b/proce.c
@@ -109,6 +109,24 @@ int CONV is_move( const char *str )
 }
 
 
+#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 )
 {
@@ -304,7 +322,7 @@ Out("# command = '%s'\n", line);
   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; }