X-Git-Url: http://winboard.nl/cgi-bin?p=bonanza.git;a=blobdiff_plain;f=proce.c;fp=proce.c;h=8556ef1fee060e7c3ceac0a241e2ad027f181058;hp=81707f9b4a67a397251c1e79d72ee43800feb9e5;hb=337ac0a0658376f8a9b2aa740acde95f021e53ec;hpb=464c88061b108405e7f9032900fc194e81aa0989 diff --git a/proce.c b/proce.c index 81707f9..8556ef1 100644 --- 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 ) {