forked from PsychoticNinja/irssi
Remove unused and odd function.
git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@4985 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
01042aec2d
commit
1da5914177
@ -199,38 +199,6 @@ int config_node_get_bool(CONFIG_NODE *parent, const char *key, int def)
|
|||||||
(i_toupper(*str) == 'O' && i_toupper(str[1]) == 'N');
|
(i_toupper(*str) == 'O' && i_toupper(str[1]) == 'N');
|
||||||
}
|
}
|
||||||
|
|
||||||
int config_node_get_keyvalue(CONFIG_NODE *node, const char *key, const char *value_key, char **ret_key, char **ret_value)
|
|
||||||
{
|
|
||||||
CONFIG_NODE *keynode, *valuenode;
|
|
||||||
GSList *tmp;
|
|
||||||
|
|
||||||
g_return_val_if_fail(node != NULL, -1);
|
|
||||||
g_return_val_if_fail(key != NULL, -1);
|
|
||||||
g_return_val_if_fail(value_key != NULL, -1);
|
|
||||||
g_return_val_if_fail(ret_key != NULL, -1);
|
|
||||||
g_return_val_if_fail(ret_value != NULL, -1);
|
|
||||||
|
|
||||||
for (tmp = node->value; tmp != NULL; tmp = tmp->next) {
|
|
||||||
node = tmp->data;
|
|
||||||
|
|
||||||
if (node->type != NODE_TYPE_BLOCK)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
keynode = config_node_find(node, key);
|
|
||||||
if (keynode == NULL || keynode->type != NODE_TYPE_KEY)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
valuenode = config_node_find(node, value_key);
|
|
||||||
|
|
||||||
*ret_key = keynode->key;
|
|
||||||
*ret_value = valuenode != NULL && valuenode->type == NODE_TYPE_KEY ?
|
|
||||||
valuenode->value : NULL;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
char **config_node_get_list(CONFIG_NODE *node)
|
char **config_node_get_list(CONFIG_NODE *node)
|
||||||
{
|
{
|
||||||
GString *values;
|
GString *values;
|
||||||
|
@ -122,9 +122,6 @@ CONFIG_NODE *config_node_section_index(CONFIG_NODE *parent, const char *key,
|
|||||||
/* Find the section with the whole path.
|
/* Find the section with the whole path.
|
||||||
Create the path if necessary if `create' is TRUE. */
|
Create the path if necessary if `create' is TRUE. */
|
||||||
CONFIG_NODE *config_node_traverse(CONFIG_REC *rec, const char *section, int create);
|
CONFIG_NODE *config_node_traverse(CONFIG_REC *rec, const char *section, int create);
|
||||||
/* Get the value of keys `key' and `key_value' and put them to
|
|
||||||
`ret_key' and `ret_value'. Returns -1 if not found. */
|
|
||||||
int config_node_get_keyvalue(CONFIG_NODE *node, const char *key, const char *value_key, char **ret_key, char **ret_value);
|
|
||||||
/* Return all values from the list `node' in a g_strsplit() array */
|
/* Return all values from the list `node' in a g_strsplit() array */
|
||||||
char **config_node_get_list(CONFIG_NODE *node);
|
char **config_node_get_list(CONFIG_NODE *node);
|
||||||
/* Add all values in `array' to `node' */
|
/* Add all values in `array' to `node' */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user