if( sscanf(d, "%s %f %f %f %f", boolbuf, ma1, ma2, ma3, ma4) != 5 )
cur_locale = setlocale(LC_NUMERIC, NULL); setlocale(LC_NUMERIC, "C"); num_input_items = sscanf(d, "%s %f %f %f %f", boolbuf, ma1, ma2, ma3, ma4); setlocale(LC_NUMERIC, cur_locale);  if( num_input_items != 5 )
Bool XpuParseMediumSourceSize( const char *value,                                const char **medium_name, int *mbool,                                float *ma1, float *ma2, float *ma3, float *ma4 ){  const char *s;  char       *d,              *name;  char       *boolbuf;  size_t      value_len;    if( value && value[0]!='{' && value[0]!='\0' )    return(False);      value_len = strlen(value);    /* alloc buffer for |medium_name| and |boolbuf| in one step   * (both must be large enougth to hold at least |strlen(value)+1| bytes) */    name = (char *)malloc(value_len*2 + 4);  boolbuf = name + value_len+2; /* |boolbuf| starts directly after |name| */    /* remove '{' && '}' */  s = value;  d = name;  do  {    *d = tolower(*s);        if( *s!='{' && *s!='}' )      d++;        s++;    }  while(*s);      /* seperate medium name from string */  d = (char *)search_next_space(name);  if( !d )  {    free(name);    return(False);  }    *d = '\0';  *medium_name = name;    /* ... continue to parse the remaining string... */  d++;    if( sscanf(d, "%s %f %f %f %f", boolbuf, ma1, ma2, ma3, ma4) != 5 )  {    free(name);    return(False);  }  if( !strcmp(boolbuf, "true") )    *mbool = True;  else if( !strcmp(boolbuf, "false") )    *mbool = False;  else  {    free(name);    return(False);      }  return(True);}