-}
-
-#define set_var(_name, _var) \
- if (strcasecmp(variable, _name) == 0) { \
- dbg_parse("%s = '%s'", _name, value); \
- strfieldcpymax(_var, value, sizeof(_var));\
- }
-
-#define set_bool(_name, _var) \
- if (strcasecmp(variable, _name) == 0) { \
- dbg_parse("%s = '%s'", _name, value); \
- _var = string_is_true(value); \
- }
-
-int parse_get_pair(char **orig_string, char **left, char **right)
-{
- char *temp;
- char *string = *orig_string;
-
- if (!string)
- return -ENODEV;
-
- /* eat any whitespace */
- while (isspace(*string) || *string == ',')
- ++string;
-
- /* split based on '=' */
- temp = strsep(&string, "=");
- *left = temp;
- if (!string)
- return -ENODEV;