+ case OBT_DDPARSE_EXEC: {
+ gchar *c, *m;
+ gboolean percent;
+ gboolean found;
+
+ v.value.string = parse_value_string(val, FALSE, FALSE, NULL,
+ parse, error);
+ g_assert(v.value.string);
+
+ /* an exec string can only contain one of the file/url-opening %'s */
+ percent = found = FALSE;
+ for (c = v.value.string; *c; ++c) {
+ if (percent) {
+ switch (*c) {
+ case 'f':
+ case 'F':
+ case 'u':
+ case 'U':
+ if (found) {
+ m = g_strdup_printf("Malformed Exec key, "
+ "extraneous %%%c", *c);
+ parse_error(m, parse, error);
+ g_free(m);
+ }
+ found = TRUE;
+ break;
+ case 'd':
+ case 'D':
+ case 'n':
+ case 'N':
+ case 'v':
+ case 'm':
+ m = g_strdup_printf("Malformed Exec key, "
+ "uses deprecated %%%c", *c);
+ parse_error(m, parse, NULL); /* just a warning */
+ g_free(m);
+ break;
+ case 'i':
+ case 'c':
+ case 'k':
+ case '%':
+ break;
+ default:
+ m = g_strdup_printf("Malformed Exec key, "
+ "uses unknown %%%c", *c);
+ parse_error(m, parse, NULL); /* just a warning */
+ g_free(m);
+ }
+ percent = FALSE;
+ }
+ else if (*c == '%') percent = TRUE;
+ }
+ break;
+ }