diff options
Diffstat (limited to 'src/common/conf.h')
-rw-r--r-- | src/common/conf.h | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/common/conf.h b/src/common/conf.h index bd97d5c1e..0ef86adea 100644 --- a/src/common/conf.h +++ b/src/common/conf.h @@ -5,9 +5,9 @@ #ifndef COMMON_CONF_H #define COMMON_CONF_H -#include "../common/cbasetypes.h" +#include "common/hercules.h" -#include "../../3rdparty/libconfig/libconfig.h" +#include <libconfig/libconfig.h> /** * The libconfig interface -- specially for plugins, but we enforce it throughout the core to be consistent @@ -16,8 +16,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); - int (*get_auto_convert) (const config_t *config); + 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 /* */ int (*read_string) (config_t *config, const char *str); int (*read_file_src) (config_t *config, const char *filename); @@ -74,13 +74,13 @@ struct libconfig_interface { int (*setting_remove_elem) (config_setting_t *parent, unsigned int idx); void (*setting_set_hook) (config_setting_t *setting, void *hook); - config_setting_t * (*lookup) (const config_t *config, const char *path); - config_setting_t * (*lookup_from) (config_setting_t *setting, const char *path); - int (*lookup_int) (const config_t *config, const char *path, int *value); - int (*lookup_int64) (const config_t *config, const char *path, long long *value); - int (*lookup_float) (const config_t *config, const char *path, double *value); - int (*lookup_bool) (const config_t *config, const char *path, int *value); - int (*lookup_string) (const config_t *config, const char *path, const char **value); + 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); + int (*lookup_bool) (const config_t *config, const char *filepath, int *value); + int (*lookup_string) (const config_t *config, const char *filepath, const char **value); /* those are custom and are from src/common/conf.c */ /* Functions to copy settings from libconfig/contrib */ @@ -91,10 +91,10 @@ struct libconfig_interface { int (*setting_copy) (config_setting_t *parent, const config_setting_t *src); }; -struct libconfig_interface *libconfig; - #ifdef HERCULES_CORE void libconfig_defaults(void); #endif // HERCULES_CORE +HPShared struct libconfig_interface *libconfig; + #endif // COMMON_CONF_H |