+static void parse_group_desktop_entry(gchar *key, const gchar *val,
+ ObtDDParse *parse, gboolean *error)
+{
+ ObtDDParseValue v, *pv;
+
+ /* figure out value type */
+ v.type = NUM_DATA_TYPES;
+
+ /* parse the value */
+
+ switch (v.type) {
+ case DATA_STRING:
+ v.value.string = parse_string(val, FALSE, NULL, parse, error);
+ g_assert(v.value.string);
+ break;
+ case DATA_LOCALESTRING:
+ v.value.string = parse_string(val, TRUE, NULL, parse, error);
+ g_assert(v.value.string);
+ break;
+ case DATA_STRINGS:
+ v.value.strings.s = parse_string(val, FALSE, &v.value.strings.n,
+ parse, error);
+ g_assert(v.value.strings.s);
+ g_assert(v.value.strings.n);
+ break;
+ case DATA_LOCALESTRINGS:
+ v.value.strings.s = parse_string(val, TRUE, &v.value.strings.n,
+ parse, error);
+ g_assert(v.value.strings.s);
+ g_assert(v.value.strings.n);
+ break;
+ case DATA_BOOLEAN:
+ v.value.boolean = parse_bool(val, parse, error);
+ break;
+ case DATA_NUMERIC:
+ v.value.numeric = parse_numeric(val, parse, error);
+ break;
+ default:
+ g_assert_not_reached();
+ }
+
+ pv = g_slice_new(ObtDDParseValue);
+ *pv = v;
+ g_hash_table_insert(parse->group->key_hash, key, pv);
+}
+
+static gboolean parse_file_line(FILE *f, gchar **buf,
+ gulong *size, gulong *read,
+ ObtDDParse *parse, gboolean *error)