Merge branch '0.4' into 0.5
This commit is contained in:
@ -103,6 +103,7 @@ static void read_config_file(const char *filename)
|
||||
int set_option(const char *name, const char *value, sb_arg_type_t type)
|
||||
{
|
||||
option_t *opt;
|
||||
char *tmpbuf;
|
||||
char *tmp;
|
||||
|
||||
opt = add_option(&options, name);
|
||||
@ -128,10 +129,14 @@ int set_option(const char *name, const char *value, sb_arg_type_t type)
|
||||
if (value == NULL)
|
||||
break;
|
||||
|
||||
tmp = strdup(value);
|
||||
tmpbuf = strdup(value);
|
||||
tmp = tmpbuf;
|
||||
|
||||
for (tmp = strtok(tmp, ","); tmp != NULL; tmp = strtok(NULL, ","))
|
||||
add_value(&opt->values, tmp);
|
||||
free(tmp);
|
||||
|
||||
free(tmpbuf);
|
||||
|
||||
break;
|
||||
case SB_ARG_TYPE_FILE:
|
||||
read_config_file(value);
|
||||
|
||||
Reference in New Issue
Block a user