mirror of
https://github.com/fairyglade/ly.git
synced 2025-12-21 11:44:55 +00:00
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:
committed by
cylgom
parent
38fefffdf6
commit
cba0333fc5
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user