diff options
author | Haru <haru@dotalux.com> | 2016-02-16 16:59:09 +0100 |
---|---|---|
committer | Haru <haru@dotalux.com> | 2016-02-17 10:39:53 +0100 |
commit | d38019541508d0efb3477ef4938ea8e939444333 (patch) | |
tree | 095efa7663585f56bcf3fa2f641a0e1f633f10d6 /src/common/conf.h | |
parent | 1bfb8c1283a0c662902cc8cb94d30159a9bc1183 (diff) | |
download | hercules-d38019541508d0efb3477ef4938ea8e939444333.tar.gz hercules-d38019541508d0efb3477ef4938ea8e939444333.tar.bz2 hercules-d38019541508d0efb3477ef4938ea8e939444333.tar.xz hercules-d38019541508d0efb3477ef4938ea8e939444333.zip |
Updated libconfig to version 1.5
- Based on https://github.com/hyperrealm/libconfig/releases/tag/v1.5
f9f23d7a95608936ea7d839731dbd56f1667b7ed
- Improvements that come with this libconfig version:
* Don't fclose() a null pointer.
* check if file being opened is a directory
* added config_set_options(), config_get_options(), setOptions(),
getOptions().
* renamed config_setting_lookup_from() to config_setting_lookup() and
documented it
* floating point precision loss patch
* scanner code cleanup
* parser code cleanup
* bugfix; capture root filename
- Parser generated with Bison 2.7
- Scanner generated with flex 2.6
- This includes the windows-compatibility commit
909b06c07e30e456cc63f58d31b0e2f3aad4cc43 from upstream (although not
part of version 1.5)
Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/common/conf.h')
-rw-r--r-- | src/common/conf.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/common/conf.h b/src/common/conf.h index 19b13c51a..19aa73c2d 100644 --- a/src/common/conf.h +++ b/src/common/conf.h @@ -32,8 +32,8 @@ struct libconfig_interface { int (*read) (config_t *config, FILE *stream); void (*write) (const config_t *config, FILE *stream); /* */ - void (*set_auto_convert) (config_t *config, int flag); // TODO: Replace with config_set_options - int (*get_auto_convert) (const config_t *config); // TODO: Replace with config_get_options + void (*set_options) (config_t *config, int options); + int (*get_options) (const config_t *config); /* */ int (*read_string) (config_t *config, const char *str); int (*read_file_src) (config_t *config, const char *filename); @@ -53,6 +53,7 @@ struct libconfig_interface { const char * (*setting_get_string) (const config_setting_t *setting); + config_setting_t * (*setting_lookup) (config_setting_t *setting, const char *name); int (*setting_lookup_int) (const config_setting_t *setting, const char *name, int *value); int (*setting_lookup_int64) (const config_setting_t *setting, const char *name, long long *value); int (*setting_lookup_float) (const config_setting_t *setting, const char *name, double *value); @@ -91,7 +92,6 @@ struct libconfig_interface { void (*setting_set_hook) (config_setting_t *setting, void *hook); config_setting_t * (*lookup) (const config_t *config, const char *filepath); - config_setting_t * (*lookup_from) (config_setting_t *setting, const char *filepath); int (*lookup_int) (const config_t *config, const char *filepath, int *value); int (*lookup_int64) (const config_t *config, const char *filepath, long long *value); int (*lookup_float) (const config_t *config, const char *filepath, double *value); |