mirror of
https://github.com/irssi/irssi.git
synced 2026-08-08 19:30:15 +02:00
Merge pull request #199 from ailin-nemui/config-parser
Make config parser more robust
This commit is contained in:
commit
eb0f09073c
22 changed files with 119 additions and 66 deletions
|
|
@ -51,7 +51,7 @@ static const char *completion_find(const char *key, int automatic)
|
|||
if (node == NULL || node->type != NODE_TYPE_BLOCK)
|
||||
return NULL;
|
||||
|
||||
node = config_node_section(node, key, -1);
|
||||
node = iconfig_node_section(node, key, -1);
|
||||
if (node == NULL)
|
||||
return NULL;
|
||||
|
||||
|
|
@ -785,7 +785,7 @@ static void cmd_completion(const char *data)
|
|||
} else if (*key != '\0' && *value != '\0') {
|
||||
int automatic = g_hash_table_lookup(optlist, "auto") != NULL;
|
||||
|
||||
node = config_node_section(node, key, NODE_TYPE_BLOCK);
|
||||
node = iconfig_node_section(node, key, NODE_TYPE_BLOCK);
|
||||
iconfig_node_set_str(node, "value", value);
|
||||
if (automatic)
|
||||
iconfig_node_set_bool(node, "auto", TRUE);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue