Comments are now allowed everywhere in config files.

git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2374 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Timo Sirainen 2002-02-02 17:37:44 +00:00 committed by cras
commit 0ce3f8243e
14 changed files with 45 additions and 52 deletions

View file

@ -360,11 +360,11 @@ static GList *completion_get_aliases(const char *alias, char cmdchar)
/* get list of aliases from mainconfig */
node = iconfig_node_traverse("aliases", FALSE);
tmp = node == NULL ? NULL : node->value;
tmp = node == NULL ? NULL : config_node_first(node->value);
len = strlen(alias);
complist = NULL;
for (; tmp != NULL; tmp = tmp->next) {
for (; tmp != NULL; tmp = config_node_next(tmp)) {
CONFIG_NODE *node = tmp->data;
if (node->type != NODE_TYPE_KEY)

View file

@ -173,12 +173,12 @@ static void show_aliases(const char *alias)
printformat(NULL, NULL, MSGLEVEL_CLIENTCRAP, TXT_ALIASLIST_HEADER);
node = iconfig_node_traverse("aliases", FALSE);
tmp = node == NULL ? NULL : node->value;
tmp = node == NULL ? NULL : config_node_first(node->value);
/* first get the list of aliases sorted */
list = NULL;
aliaslen = strlen(alias);
for (; tmp != NULL; tmp = tmp->next) {
for (; tmp != NULL; tmp = config_node_next(tmp)) {
CONFIG_NODE *node = tmp->data;
if (node->type != NODE_TYPE_KEY)

View file

@ -399,7 +399,8 @@ static void read_hilight_config(void)
return;
}
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;
if (node->type != NODE_TYPE_BLOCK)

View file

@ -114,7 +114,8 @@ static CONFIG_NODE *key_config_find(const char *key)
/* remove old keyboard settings */
node = iconfig_node_traverse("(keyboard", TRUE);
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;
if (strcmp(config_node_get_str(node, "key", ""), key) == 0)
@ -794,7 +795,8 @@ static void read_keyboard_config(void)
return;
}
for (tmp = node->value; tmp != NULL; tmp = tmp->next)
tmp = config_node_first(node->value);
for (; tmp != NULL; tmp = config_node_next(tmp))
key_config_read(tmp->data);
key_configure_thaw();

View file

@ -81,7 +81,8 @@ static void window_add_items(WINDOW_REC *window, CONFIG_NODE *node)
if (node == NULL)
return;
for (tmp = node->value; tmp != NULL; tmp = tmp->next) {
tmp = config_node_first(node->value);
for (; tmp != NULL; tmp = config_node_next(tmp)) {
CONFIG_NODE *node = tmp->data;
type = config_node_get_str(node, "type", NULL);
@ -106,7 +107,8 @@ static void sig_layout_restore(void)
node = iconfig_node_traverse("windows", FALSE);
if (node == NULL) return;
for (tmp = node->value; tmp != NULL; tmp = tmp->next) {
tmp = config_node_first(node->value);
for (; tmp != NULL; tmp = config_node_next(tmp)) {
CONFIG_NODE *node = tmp->data;
window = window_find_refnum(atoi(node->key));