Lots of moving stuff around - hopefully I didn't break too much :)

git-svn-id: http://svn.irssi.org/repos/irssi/trunk@632 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Timo Sirainen 2000-08-26 15:39:44 +00:00 committed by cras
commit e395e87ded
160 changed files with 3954 additions and 2959 deletions

View file

@ -59,17 +59,23 @@ void config_node_remove(CONFIG_REC *rec, CONFIG_NODE *parent, CONFIG_NODE *node)
/* Remove n'th node from a list */
void config_node_list_remove(CONFIG_REC *rec, CONFIG_NODE *node, int index)
{
GSList *tmp;
CONFIG_NODE *child;
g_return_if_fail(node != NULL);
g_return_if_fail(is_node_list(node));
for (tmp = node->value; tmp != NULL; tmp = tmp->next, index--) {
if (index == 0) {
config_node_remove(rec, node, tmp->data);
break;
}
}
child = config_node_index(node, index);
if (child != NULL) config_node_remove(rec, node, child);
}
/* Clear all data inside node, but leave the node */
void config_node_clear(CONFIG_REC *rec, CONFIG_NODE *node)
{
g_return_if_fail(node != NULL);
g_return_if_fail(is_node_list(node));
while (node->value != NULL)
config_node_remove(rec, node, node->value);
}
void config_nodes_remove_all(CONFIG_REC *rec)