Changeset 77

Show
Ignore:
Timestamp:
03/19/99 11:56:25 (15 years ago)
Author:
ucacoxh
Message:

MSVC does not support strtok_r. Replaced with strtok.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • common/trunk/src/util.c

    r76 r77  
    252252string_to_words(char *s, char**w, int max_words) 
    253253{ 
    254         char *lasts; 
    255254        int n; 
    256255 
    257256        n = 0; 
    258         w[0] = strtok_r(s, " ", &lasts); 
     257        w[0] = strtok(s, " "); 
    259258        if (w[0] == NULL) { 
    260259                return n; 
     
    262261 
    263262        while(++n < max_words) { 
    264                 w[n] = strtok_r(NULL, " ", &lasts); 
     263                w[n] = strtok(NULL, " "); 
    265264                if (w[n] == NULL) break; 
    266265        }