summaryrefslogtreecommitdiffhomepage
path: root/mixlib/mix_config.c
diff options
context:
space:
mode:
Diffstat (limited to 'mixlib/mix_config.c')
-rw-r--r--mixlib/mix_config.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/mixlib/mix_config.c b/mixlib/mix_config.c
index f55ee48..74a669f 100644
--- a/mixlib/mix_config.c
+++ b/mixlib/mix_config.c
@@ -1,7 +1,7 @@
/* -*-c-*- -------------- mix_config.c :
* Implementation of the functions declared in mix_config.h
* ------------------------------------------------------------------
- * Last change: Time-stamp: "01/02/12 00:35:28 jose"
+ * $Id: mix_config.c,v 1.7 2001/09/18 22:49:56 jao Exp $
* ------------------------------------------------------------------
* Copyright (C) 2001 Free Software Foundation, Inc.
*
@@ -182,6 +182,22 @@ mix_config_update_integer (mix_config_t *config, const gchar *key, gint value)
g_free (val);
}
+void
+mix_config_remove (mix_config_t *config, const gchar *key)
+{
+ gchar *val;
+
+ g_return_if_fail (config != NULL);
+ g_return_if_fail (key != NULL);
+
+ val = g_hash_table_lookup (config->items, key);
+ if (val != NULL)
+ {
+ g_hash_table_remove (config->items, key);
+ g_free (val);
+ }
+}
+
/* save the current configuration */
static void
save_ (gpointer key, gpointer value, gpointer file)