Changeset 5009:9222d9f53791 in roaraudio


Ignore:
Timestamp:
05/26/11 08:52:43 (11 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

use internal copy of strtok_r()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • roarclients/roarmonhttp.c

    r4926 r5009  
    232232 int    i; 
    233233 char * c, * k, * v; 
    234 #ifdef ROAR_HAVE_STRTOK_R 
    235234 char * sp0 = NULL, * sp1 = NULL; 
    236 #endif 
    237235 int dir = ROAR_DIR_MONITOR; 
    238236 int gopher = 0; 
     
    280278  c = ""; 
    281279 
    282 #ifdef ROAR_HAVE_STRTOK_R 
    283  c = strtok_r(c, "&", &sp0); 
    284 #else 
    285  c = strtok(c, "&"); 
    286 #endif 
     280 c = roar_mm_strtok_r(c, "&", &sp0); 
    287281 
    288282 while (c != NULL) { 
    289 #ifdef ROAR_HAVE_STRTOK_R 
    290   k = strtok_r(c,    "=", &sp1); 
    291   v = strtok_r(NULL, "=", &sp1); 
    292 #else 
    293   k = c; 
    294   if ( (v = strstr(c, "=")) != NULL ) { 
    295    *v = 0; 
    296    v++; 
    297   } 
    298 #endif 
     283  k = roar_mm_strtok_r(c,    "=", &sp1); 
     284  v = roar_mm_strtok_r(NULL, "=", &sp1); 
    299285 
    300286  if ( !strcmp(k, "codec") ) { 
     
    326312  } 
    327313 
    328 #ifdef ROAR_HAVE_STRTOK_R 
    329   c = strtok_r(NULL, "&", &sp0); 
    330 #else 
    331   c = strtok(NULL, "&"); 
    332 #endif 
     314  c = roar_mm_strtok_r(NULL, "&", &sp0); 
    333315 } 
    334316 
Note: See TracChangeset for help on using the changeset viewer.