summaryrefslogtreecommitdiff
path: root/src/lib-config
diff options
context:
space:
mode:
authorEmanuele Giaquinta <exg@irssi.org>2008-03-11 14:32:04 +0000
committerexg <exg@dbcabf3a-b0e7-0310-adc4-f8d773084564>2008-03-11 14:32:04 +0000
commit9da9751aca8c0b170570728b626027346271dfee (patch)
tree7a6fdee16841072a014ca13c8fe7bd65cf21c286 /src/lib-config
parent4ca476d4659d3f7b39c6218d9b4e821ba4cb453b (diff)
downloadirssi-9da9751aca8c0b170570728b626027346271dfee.zip
Document config_node_set_str.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@4757 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/lib-config')
-rw-r--r--src/lib-config/iconfig.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/lib-config/iconfig.h b/src/lib-config/iconfig.h
index e3b4fa9e..5802519a 100644
--- a/src/lib-config/iconfig.h
+++ b/src/lib-config/iconfig.h
@@ -131,12 +131,21 @@ char *config_node_get_str(CONFIG_NODE *parent, const char *key, const char *def)
int config_node_get_int(CONFIG_NODE *parent, const char *key, int def);
int config_node_get_bool(CONFIG_NODE *parent, const char *key, int def);
+/*
+ * key != NULL && value == NULL
+ * remove node with key 'key', equivalent to
+ * config_node_remove(rec, parent, config_node_find(rec, parent, key))
+ * key == NULL && value != NULL
+ * create a new node with type NODE_TYPE_VALUE and value 'value'
+ * key != NULL && value != NULL
+ * if a node with key 'key' exists change its value to 'value',
+ * otherwise create a new node with type NODE_TYPE_KEY, key 'key' and value 'value'
+ * */
void config_node_set_str(CONFIG_REC *rec, CONFIG_NODE *parent, const char *key, const char *value);
void config_node_set_int(CONFIG_REC *rec, CONFIG_NODE *parent, const char *key, int value);
void config_node_set_bool(CONFIG_REC *rec, CONFIG_NODE *parent, const char *key, int value);
-/* Remove one node from block/list.
- ..set_str() with value = NULL does the same. */
+/* Remove one node from block/list. */
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);