diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2017-06-09 07:54:27 +0200 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2017-06-09 07:54:27 +0200 |
commit | 193ff0db373dc540e013f713dac23d88323f553a (patch) | |
tree | ac23a50fbda98889c4b38fa2b037e8d2f2392a32 /src | |
parent | 0094be17a8bc0ab5c9b0c6943c2b6fd9a69a517f (diff) | |
download | weechat-193ff0db373dc540e013f713dac23d88323f553a.zip |
core: remove unused functions config_file_config_insert and config_file_section_insert_in_config (issue #1012)
Diffstat (limited to 'src')
-rw-r--r-- | src/core/wee-config-file.c | 92 |
1 files changed, 0 insertions, 92 deletions
diff --git a/src/core/wee-config-file.c b/src/core/wee-config-file.c index f0a7a33eb..199b0d1bc 100644 --- a/src/core/wee-config-file.c +++ b/src/core/wee-config-file.c @@ -107,52 +107,6 @@ config_file_config_find_pos (const char *name) } /* - * Inserts a configuration file in list (keeping configuration files sorted by - * name). - */ - -void -config_file_config_insert (struct t_config_file *config_file) -{ - struct t_config_file *pos_config; - - if (!config_file) - return; - - if (config_files) - { - pos_config = config_file_config_find_pos (config_file->name); - if (pos_config) - { - /* insert configuration file into the list (before config found) */ - config_file->prev_config = pos_config->prev_config; - config_file->next_config = pos_config; - if (pos_config->prev_config) - (pos_config->prev_config)->next_config = config_file; - else - config_files = config_file; - pos_config->prev_config = config_file; - } - else - { - /* add configuration file to the end of list */ - config_file->prev_config = last_config_file; - config_file->next_config = NULL; - last_config_file->next_config = config_file; - last_config_file = config_file; - } - } - else - { - /* first configuration file */ - config_file->prev_config = NULL; - config_file->next_config = NULL; - config_files = config_file; - last_config_file = config_file; - } -} - -/* * Creates a new configuration file. * * Returns pointer to new configuration file, NULL if error. @@ -248,52 +202,6 @@ config_file_section_find_pos (struct t_config_file *config_file, } /* - * Inserts a section in configuration file (keeping sections sorted by name). - */ - -void -config_file_section_insert_in_config (struct t_config_section *section) -{ - struct t_config_section *pos_section; - - if (!section || !section->config_file) - return; - - if (section->config_file->sections) - { - pos_section = config_file_section_find_pos (section->config_file, - section->name); - if (pos_section) - { - /* insert section into the list (before section found) */ - section->prev_section = pos_section->prev_section; - section->next_section = pos_section; - if (pos_section->prev_section) - (pos_section->prev_section)->next_section = section; - else - (section->config_file)->sections = section; - pos_section->prev_section = section; - } - else - { - /* add section to end of sections */ - section->prev_section = (section->config_file)->last_section; - section->next_section = NULL; - (section->config_file)->last_section->next_section = section; - (section->config_file)->last_section = section; - } - } - else - { - /* first section of file */ - section->prev_section = NULL; - section->next_section = NULL; - (section->config_file)->sections = section; - (section->config_file)->last_section = section; - } -} - -/* * Creates a new section in a configuration file. * * Returns pointer to new section, NULL if error. |