- char *_key = strtrim(key);
- char *_val = strtrim(val);
- char *end;
- int num = strtol(_val, &end, 10);
- if (end != val && *end == '\0')
- conf_set_int(_key, num);
- else if (!strcasecmp(_val, "true"))
- conf_set_int(_key, 1);
- else if (!strcasecmp(_val, "false"))
- conf_set_int(_key, 0);
- else
- conf_set_str(_key, _val);
- printf(" [%s.%s] = [%s]\n", section, _key, _val);
+ snprintf(fullkey, sizeof(key), "%s.%s",
+ section, strtrim(key));
+ if (!strchr(fullkey, ' ')) {
+ char *end, *trim = strtrim(val);
+ int num = strtol(trim, &end, 10);
+ if (end != val && *end == '\0')
+ conf_set_int(fullkey, num);
+ else if (!strcasecmp(trim, "true"))
+ conf_set_int(fullkey, 1);
+ else if (!strcasecmp(trim, "false"))
+ conf_set_int(fullkey, 0);
+ else
+ conf_set_str(fullkey, trim);
+ printf(" [%s] = [%s]\n", fullkey, trim);
+ }