mirror of
https://github.com/irssi/irssi.git
synced 2024-12-04 14:46:39 -05:00
added config_node_first() function to get the first non-comment node.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1812 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
5976d82fa7
commit
80df4378d3
@ -309,10 +309,9 @@ CONFIG_NODE *config_node_index(CONFIG_NODE *node, int index)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* Returns the next non-comment node in list */
|
||||
GSList *config_node_next(GSList *list)
|
||||
/* Returns the first non-comment node in list */
|
||||
GSList *config_node_first(GSList *list)
|
||||
{
|
||||
list = list->next;
|
||||
while (list != NULL) {
|
||||
CONFIG_NODE *node = list->data;
|
||||
|
||||
@ -322,3 +321,10 @@ GSList *config_node_next(GSList *list)
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
/* Returns the next non-comment node in list */
|
||||
GSList *config_node_next(GSList *list)
|
||||
{
|
||||
list = list->next;
|
||||
return config_node_first(list);
|
||||
}
|
||||
|
@ -99,6 +99,9 @@ const char *config_list_find(CONFIG_REC *rec, const char *section, const char *k
|
||||
CONFIG_NODE *config_list_find_node(CONFIG_REC *rec, const char *section, const char *key, const char *value, const char *value_key);
|
||||
/* Returns n'th node from list. */
|
||||
CONFIG_NODE *config_node_index(CONFIG_NODE *node, int index);
|
||||
|
||||
/* Returns the first non-comment node in list */
|
||||
GSList *config_node_first(GSList *list);
|
||||
/* Returns the next non-comment node in list */
|
||||
GSList *config_node_next(GSList *list);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user