Alloc passing the path to the configuration file as an argument (#134)

Signed-off-by: Roosembert Palacios <roosembert.palacios@epfl.ch>
This commit is contained in:
Roosemberth Palacios
2019-10-31 13:54:45 +01:00
committed by cylgom
parent 38fefffdf6
commit cba0333fc5
3 changed files with 18 additions and 6 deletions

View File

@@ -146,8 +146,12 @@ void lang_load()
}
}
void config_load()
void config_load(const char *cfg_path)
{
if (cfg_path == NULL)
{
cfg_path = INI_CONFIG;
}
// must be alphabetically sorted
struct configator_param map_no_section[] =
{
@@ -202,7 +206,7 @@ void config_load()
config.sections = sections;
config.sections_len = sections_len;
configator(&config, INI_CONFIG);
configator(&config, cfg_path);
}
void lang_defaults()