+add_property_value(
+ char *value)
+{
+ if (value) {
+ prop_values = g_slist_prepend(prop_values, unquote_string(value));
+ }
+}
+
+/* A GHFunc (callback for g_hash_table_foreach) */
+static void list_one_property(
+ gpointer key_p,
+ gpointer value_p,
+ gpointer user_data_p G_GNUC_UNUSED)
+{
+ char *property_s = key_p;
+ char *qproperty;
+ property_t *property = value_p;
+ GSList *value;
+ char *qvalue;
+
+ qproperty = quote_string_always(property_s);
+ printf("property %s", qproperty);
+ amfree(qproperty);
+ for (value = property->values; value != NULL; value = value->next) {
+ qvalue = quote_string_always((char*)value->data);
+ printf(" %s", qvalue);
+ amfree(qvalue);
+ }
+ printf("\n");
+}
+
+void
+list_property(void)
+{
+ if (proplist) {
+ g_hash_table_foreach(proplist, list_one_property, NULL);
+ } else {
+ printf("No property set\n");
+ }
+}
+
+void
+local_cd(
+ char *dir)
+{
+ char *uqdir = unquote_string(dir);
+ if (chdir(uqdir) == -1) {
+ perror(uqdir);
+ }
+ amfree(uqdir);
+}
+
+int