+ if (streq(name, "set")) {
+ char *sep, *var_name, *var_value;
+
+ /* this is pretty nasty, but works until we implement a proper
+ * parser... */
+
+ sep = strchr(value, '=');
+ if (!sep)
+ return;
+
+ *sep = '\0';
+
+ var_name = value;
+ var_value = sep + 1;
+ if (var_value[0] == '"' || var_value[0] == '\'')
+ var_value++;
+
+ if (!strlen(var_name) || !strlen(var_value))
+ return;
+
+ if (streq(var_name, "default"))
+ state->default_idx = atoi(var_value);
+
+ return;
+ }
+