summaryrefslogtreecommitdiff
path: root/3rdparty/libconfig/libconfig.h
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2016-02-16 16:59:09 +0100
committerHaru <haru@dotalux.com>2016-02-17 10:39:53 +0100
commitd38019541508d0efb3477ef4938ea8e939444333 (patch)
tree095efa7663585f56bcf3fa2f641a0e1f633f10d6 /3rdparty/libconfig/libconfig.h
parent1bfb8c1283a0c662902cc8cb94d30159a9bc1183 (diff)
downloadhercules-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 '3rdparty/libconfig/libconfig.h')
-rw-r--r--3rdparty/libconfig/libconfig.h21
1 files changed, 14 insertions, 7 deletions
diff --git a/3rdparty/libconfig/libconfig.h b/3rdparty/libconfig/libconfig.h
index cc5c5b79f..cf54775a3 100644
--- a/3rdparty/libconfig/libconfig.h
+++ b/3rdparty/libconfig/libconfig.h
@@ -1,7 +1,7 @@
/* ----------------------------------------------------------------------------
libconfig - A library for processing structured configuration files
- Copyright (C) 2013-2015 Hercules Dev Team
- Copyright (C) 2005-2010 Mark A Lindner
+ Copyright (C) 2013-2016 Hercules Dev Team
+ Copyright (C) 2005-2014 Mark A Lindner
This file is part of libconfig.
@@ -40,8 +40,8 @@ extern "C" {
#endif /* WIN32 */
#define LIBCONFIG_VER_MAJOR 1
-#define LIBCONFIG_VER_MINOR 4
-#define LIBCONFIG_VER_REVISION 9
+#define LIBCONFIG_VER_MINOR 5
+#define LIBCONFIG_VER_REVISION 0
#include <stdio.h>
@@ -58,7 +58,11 @@ extern "C" {
#define CONFIG_FORMAT_DEFAULT 0
#define CONFIG_FORMAT_HEX 1
-#define CONFIG_OPTION_AUTOCONVERT 0x01
+#define CONFIG_OPTION_AUTOCONVERT 0x01
+#define CONFIG_OPTION_SEMICOLON_SEPARATORS 0x02
+#define CONFIG_OPTION_COLON_ASSIGNMENT_FOR_GROUPS 0x04
+#define CONFIG_OPTION_COLON_ASSIGNMENT_FOR_NON_GROUPS 0x08
+#define CONFIG_OPTION_OPEN_BRACE_ON_SEPARATE_LINE 0x10
#define CONFIG_TRUE (1)
#define CONFIG_FALSE (0)
@@ -102,7 +106,7 @@ typedef struct config_t
{
config_setting_t *root;
void (*destructor)(void *);
- unsigned short flags;
+ int options;
unsigned short tab_width;
short default_format;
const char *include_dir;
@@ -120,6 +124,9 @@ extern LIBCONFIG_API void config_write(const config_t *config, FILE *stream);
extern LIBCONFIG_API void config_set_default_format(config_t *config,
short format);
+extern LIBCONFIG_API void config_set_options(config_t *config, int options);
+extern LIBCONFIG_API int config_get_options(const config_t *config);
+
extern LIBCONFIG_API void config_set_auto_convert(config_t *config, int flag);
extern LIBCONFIG_API int config_get_auto_convert(const config_t *config);
@@ -260,7 +267,7 @@ extern LIBCONFIG_API void config_setting_set_hook(config_setting_t *setting,
extern LIBCONFIG_API config_setting_t *config_lookup(const config_t *config,
const char *path);
-extern LIBCONFIG_API config_setting_t *config_lookup_from(
+extern LIBCONFIG_API config_setting_t *config_setting_lookup(
config_setting_t *setting, const char *path);
extern LIBCONFIG_API int config_lookup_int(const config_t *config,