summaryrefslogtreecommitdiff
path: root/src/core/settings.c
diff options
context:
space:
mode:
authorTimo Sirainen <cras@irssi.org>2002-02-02 17:37:44 +0000
committercras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564>2002-02-02 17:37:44 +0000
commit0ce3f8243eb564063c66a1b32169109af17e4081 (patch)
tree834275a5cb412c07efafc83a2f180e3cf5d697d0 /src/core/settings.c
parent85b63bf5465f4cc6d2fd1472cb9e87c5b6719f63 (diff)
downloadirssi-0ce3f8243eb564063c66a1b32169109af17e4081.zip
Comments are now allowed everywhere in config files.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2374 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/core/settings.c')
-rw-r--r--src/core/settings.c36
1 files changed, 5 insertions, 31 deletions
diff --git a/src/core/settings.c b/src/core/settings.c
index b13163e0..1a98462a 100644
--- a/src/core/settings.c
+++ b/src/core/settings.c
@@ -280,20 +280,6 @@ static void sig_init_finished(void)
}
}
-/* FIXME: remove after 0.7.98 - only for backward compatibility */
-static void settings_move(SETTINGS_REC *rec, char *value)
-{
- CONFIG_NODE *setnode, *node;
-
- setnode = iconfig_node_traverse("settings", TRUE);
- node = config_node_section(setnode, rec->module, NODE_TYPE_BLOCK);
-
- iconfig_node_set_str(node, rec->key, value);
- iconfig_node_set_str(setnode, rec->key, NULL);
-
- config_changed = TRUE;
-}
-
static void settings_clean_invalid_module(const char *module)
{
CONFIG_NODE *node;
@@ -306,9 +292,9 @@ static void settings_clean_invalid_module(const char *module)
node = config_node_section(node, module, -1);
if (node == NULL) return;
- for (tmp = node->value; tmp != NULL; tmp = next) {
+ for (tmp = config_node_first(node->value); tmp != NULL; tmp = next) {
CONFIG_NODE *subnode = tmp->data;
- next = tmp->next;
+ next = config_node_next(tmp);
set = g_hash_table_lookup(settings, subnode->key);
if (set == NULL || strcmp(set->module, module) != 0)
@@ -338,25 +324,12 @@ void settings_check_module(const char *module)
SETTINGS_REC *set;
CONFIG_NODE *node;
GString *errors;
- GSList *tmp, *next;
+ GSList *tmp;
int count;
g_return_if_fail(module != NULL);
node = iconfig_node_traverse("settings", FALSE);
- if (node != NULL) {
- /* FIXME: remove after 0.7.98 */
- for (tmp = node->value; tmp != NULL; tmp = next) {
- CONFIG_NODE *node = tmp->data;
-
- next = tmp->next;
- if (node->type != NODE_TYPE_KEY)
- continue;
- set = g_hash_table_lookup(settings, node->key);
- if (set != NULL)
- settings_move(set, node->value);
- }
- }
node = node == NULL ? NULL : config_node_section(node, module, -1);
if (node == NULL) return;
@@ -365,7 +338,8 @@ void settings_check_module(const char *module)
"file for module %s:", module);
count = 0;
- for (tmp = node->value; tmp != NULL; tmp = tmp->next) {
+ tmp = config_node_first(node->value);
+ for (; tmp != NULL; tmp = config_node_next(tmp)) {
node = tmp->data;
set = g_hash_table_lookup(settings, node->key);