summaryrefslogtreecommitdiff
path: root/3rdparty/libconfig
diff options
context:
space:
mode:
Diffstat (limited to '3rdparty/libconfig')
-rw-r--r--3rdparty/libconfig/extra/gen/grammar.y18
-rw-r--r--3rdparty/libconfig/grammar.c18
-rw-r--r--3rdparty/libconfig/libconfig.c242
-rw-r--r--3rdparty/libconfig/libconfig.h210
-rw-r--r--3rdparty/libconfig/parsectx.h6
-rw-r--r--3rdparty/libconfig/scanctx.h2
6 files changed, 248 insertions, 248 deletions
diff --git a/3rdparty/libconfig/extra/gen/grammar.y b/3rdparty/libconfig/extra/gen/grammar.y
index 2e4cfa45f..ef8ed4f18 100644
--- a/3rdparty/libconfig/extra/gen/grammar.y
+++ b/3rdparty/libconfig/extra/gen/grammar.y
@@ -63,7 +63,7 @@ static const char *err_duplicate_setting = "duplicate setting name";
(ctx->parent && (ctx->parent->type == CONFIG_TYPE_LIST))
static void capture_parse_pos(void *scanner, struct scan_context *scan_ctx,
- config_setting_t *setting)
+ struct config_setting_t *setting)
{
setting->line = (unsigned int)libconfig_yyget_lineno(scanner);
setting->file = scanctx_current_filename(scan_ctx);
@@ -206,8 +206,8 @@ simple_value:
{
if(IN_ARRAY() || IN_LIST())
{
- config_setting_t *e = config_setting_set_bool_elem(ctx->parent, -1,
- (int)$1);
+ struct config_setting_t *e = config_setting_set_bool_elem(ctx->parent, -1,
+ (int)$1);
if(! e)
{
@@ -226,7 +226,7 @@ simple_value:
{
if(IN_ARRAY() || IN_LIST())
{
- config_setting_t *e = config_setting_set_int_elem(ctx->parent, -1, $1);
+ struct config_setting_t *e = config_setting_set_int_elem(ctx->parent, -1, $1);
if(! e)
{
libconfig_yyerror(scanner, ctx, scan_ctx, err_array_elem_type);
@@ -248,7 +248,7 @@ simple_value:
{
if(IN_ARRAY() || IN_LIST())
{
- config_setting_t *e = config_setting_set_int64_elem(ctx->parent, -1, $1);
+ struct config_setting_t *e = config_setting_set_int64_elem(ctx->parent, -1, $1);
if(! e)
{
libconfig_yyerror(scanner, ctx, scan_ctx, err_array_elem_type);
@@ -270,7 +270,7 @@ simple_value:
{
if(IN_ARRAY() || IN_LIST())
{
- config_setting_t *e = config_setting_set_int_elem(ctx->parent, -1, $1);
+ struct config_setting_t *e = config_setting_set_int_elem(ctx->parent, -1, $1);
if(! e)
{
libconfig_yyerror(scanner, ctx, scan_ctx, err_array_elem_type);
@@ -292,7 +292,7 @@ simple_value:
{
if(IN_ARRAY() || IN_LIST())
{
- config_setting_t *e = config_setting_set_int64_elem(ctx->parent, -1, $1);
+ struct config_setting_t *e = config_setting_set_int64_elem(ctx->parent, -1, $1);
if(! e)
{
libconfig_yyerror(scanner, ctx, scan_ctx, err_array_elem_type);
@@ -314,7 +314,7 @@ simple_value:
{
if(IN_ARRAY() || IN_LIST())
{
- config_setting_t *e = config_setting_set_float_elem(ctx->parent, -1, $1);
+ struct config_setting_t *e = config_setting_set_float_elem(ctx->parent, -1, $1);
if(! e)
{
libconfig_yyerror(scanner, ctx, scan_ctx, err_array_elem_type);
@@ -333,7 +333,7 @@ simple_value:
if(IN_ARRAY() || IN_LIST())
{
const char *s = parsectx_take_string(ctx);
- config_setting_t *e = config_setting_set_string_elem(ctx->parent, -1, s);
+ struct config_setting_t *e = config_setting_set_string_elem(ctx->parent, -1, s);
_delete(s);
if(! e)
diff --git a/3rdparty/libconfig/grammar.c b/3rdparty/libconfig/grammar.c
index ee1da702e..7d5757b2f 100644
--- a/3rdparty/libconfig/grammar.c
+++ b/3rdparty/libconfig/grammar.c
@@ -104,7 +104,7 @@ static const char *err_duplicate_setting = "duplicate setting name";
(ctx->parent && (ctx->parent->type == CONFIG_TYPE_LIST))
static void capture_parse_pos(void *scanner, struct scan_context *scan_ctx,
- config_setting_t *setting)
+ struct config_setting_t *setting)
{
setting->line = (unsigned int)libconfig_yyget_lineno(scanner);
setting->file = scanctx_current_filename(scan_ctx);
@@ -1601,8 +1601,8 @@ yyreduce:
{
if(IN_ARRAY() || IN_LIST())
{
- config_setting_t *e = config_setting_set_bool_elem(ctx->parent, -1,
- (int)(yyvsp[(1) - (1)].ival));
+ struct config_setting_t *e = config_setting_set_bool_elem(ctx->parent, -1,
+ (int)(yyvsp[(1) - (1)].ival));
if(! e)
{
@@ -1625,7 +1625,7 @@ yyreduce:
{
if(IN_ARRAY() || IN_LIST())
{
- config_setting_t *e = config_setting_set_int_elem(ctx->parent, -1, (yyvsp[(1) - (1)].ival));
+ struct config_setting_t *e = config_setting_set_int_elem(ctx->parent, -1, (yyvsp[(1) - (1)].ival));
if(! e)
{
libconfig_yyerror(scanner, ctx, scan_ctx, err_array_elem_type);
@@ -1651,7 +1651,7 @@ yyreduce:
{
if(IN_ARRAY() || IN_LIST())
{
- config_setting_t *e = config_setting_set_int64_elem(ctx->parent, -1, (yyvsp[(1) - (1)].llval));
+ struct config_setting_t *e = config_setting_set_int64_elem(ctx->parent, -1, (yyvsp[(1) - (1)].llval));
if(! e)
{
libconfig_yyerror(scanner, ctx, scan_ctx, err_array_elem_type);
@@ -1677,7 +1677,7 @@ yyreduce:
{
if(IN_ARRAY() || IN_LIST())
{
- config_setting_t *e = config_setting_set_int_elem(ctx->parent, -1, (yyvsp[(1) - (1)].ival));
+ struct config_setting_t *e = config_setting_set_int_elem(ctx->parent, -1, (yyvsp[(1) - (1)].ival));
if(! e)
{
libconfig_yyerror(scanner, ctx, scan_ctx, err_array_elem_type);
@@ -1703,7 +1703,7 @@ yyreduce:
{
if(IN_ARRAY() || IN_LIST())
{
- config_setting_t *e = config_setting_set_int64_elem(ctx->parent, -1, (yyvsp[(1) - (1)].llval));
+ struct config_setting_t *e = config_setting_set_int64_elem(ctx->parent, -1, (yyvsp[(1) - (1)].llval));
if(! e)
{
libconfig_yyerror(scanner, ctx, scan_ctx, err_array_elem_type);
@@ -1729,7 +1729,7 @@ yyreduce:
{
if(IN_ARRAY() || IN_LIST())
{
- config_setting_t *e = config_setting_set_float_elem(ctx->parent, -1, (yyvsp[(1) - (1)].fval));
+ struct config_setting_t *e = config_setting_set_float_elem(ctx->parent, -1, (yyvsp[(1) - (1)].fval));
if(! e)
{
libconfig_yyerror(scanner, ctx, scan_ctx, err_array_elem_type);
@@ -1752,7 +1752,7 @@ yyreduce:
if(IN_ARRAY() || IN_LIST())
{
const char *s = parsectx_take_string(ctx);
- config_setting_t *e = config_setting_set_string_elem(ctx->parent, -1, s);
+ struct config_setting_t *e = config_setting_set_string_elem(ctx->parent, -1, s);
_delete(s);
if(! e)
diff --git a/3rdparty/libconfig/libconfig.c b/3rdparty/libconfig/libconfig.c
index 72520e7c5..0942241c2 100644
--- a/3rdparty/libconfig/libconfig.c
+++ b/3rdparty/libconfig/libconfig.c
@@ -70,9 +70,9 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
static const char *__io_error = "file I/O error";
-static void __config_list_destroy(config_list_t *list);
-static void __config_write_setting(const config_t *config,
- const config_setting_t *setting,
+static void __config_list_destroy(struct config_list_t *list);
+static void __config_write_setting(const struct config_t *config,
+ const struct config_setting_t *setting,
FILE *stream, int depth);
/* ------------------------------------------------------------------------- */
@@ -174,8 +174,8 @@ static void __config_indent(FILE *stream, int depth, unsigned short w)
/* ------------------------------------------------------------------------- */
-static void __config_write_value(const config_t *config,
- const config_value_t *value, int type,
+static void __config_write_value(const struct config_t *config,
+ const union config_value_t *value, int type,
int format, int depth, FILE *stream)
{
char fbuf[64];
@@ -302,14 +302,14 @@ static void __config_write_value(const config_t *config,
/* list */
case CONFIG_TYPE_LIST:
{
- config_list_t *list = value->list;
+ struct config_list_t *list = value->list;
fprintf(stream, "( ");
if(list)
{
int len = list->length;
- config_setting_t **s;
+ struct config_setting_t **s;
for(s = list->elements; len--; s++)
{
@@ -331,14 +331,14 @@ static void __config_write_value(const config_t *config,
/* array */
case CONFIG_TYPE_ARRAY:
{
- config_list_t *list = value->list;
+ struct config_list_t *list = value->list;
fprintf(stream, "[ ");
if(list)
{
int len = list->length;
- config_setting_t **s;
+ struct config_setting_t **s;
for(s = list->elements; len--; s++)
{
@@ -360,7 +360,7 @@ static void __config_write_value(const config_t *config,
/* group */
case CONFIG_TYPE_GROUP:
{
- config_list_t *list = value->list;
+ struct config_list_t *list = value->list;
if(depth > 0)
{
@@ -378,7 +378,7 @@ static void __config_write_value(const config_t *config,
if(list)
{
int len = list->length;
- config_setting_t **s;
+ struct config_setting_t **s;
for(s = list->elements; len--; s++)
__config_write_setting(config, *s, stream, depth + 1);
@@ -402,13 +402,13 @@ static void __config_write_value(const config_t *config,
/* ------------------------------------------------------------------------- */
-static void __config_list_add(config_list_t *list, config_setting_t *setting)
+static void __config_list_add(struct config_list_t *list, struct config_setting_t *setting)
{
if((list->length % CHUNK_SIZE) == 0)
{
- list->elements = (config_setting_t **)realloc(
+ list->elements = (struct config_setting_t **)realloc(
list->elements,
- (list->length + CHUNK_SIZE) * sizeof(config_setting_t *));
+ (list->length + CHUNK_SIZE) * sizeof(struct config_setting_t *));
}
list->elements[list->length] = setting;
@@ -417,11 +417,11 @@ static void __config_list_add(config_list_t *list, config_setting_t *setting)
/* ------------------------------------------------------------------------- */
-static config_setting_t *__config_list_search(config_list_t *list,
+static struct config_setting_t *__config_list_search(struct config_list_t *list,
const char *name,
unsigned int *idx)
{
- config_setting_t **found = NULL;
+ struct config_setting_t **found = NULL;
unsigned int i;
if(! list)
@@ -446,15 +446,15 @@ static config_setting_t *__config_list_search(config_list_t *list,
/* ------------------------------------------------------------------------- */
-static config_setting_t *__config_list_remove(config_list_t *list, int idx)
+static struct config_setting_t *__config_list_remove(struct config_list_t *list, int idx)
{
- config_setting_t *removed = *(list->elements + idx);
- int offset = (idx * sizeof(config_setting_t *));
+ struct config_setting_t *removed = *(list->elements + idx);
+ int offset = (idx * sizeof(struct config_setting_t *));
int len = list->length - 1 - idx;
char *base = (char *)list->elements + offset;
- memmove(base, base + sizeof(config_setting_t *),
- len * sizeof(config_setting_t *));
+ memmove(base, base + sizeof(struct config_setting_t *),
+ len * sizeof(struct config_setting_t *));
list->length--;
@@ -465,7 +465,7 @@ static config_setting_t *__config_list_remove(config_list_t *list, int idx)
/* ------------------------------------------------------------------------- */
-static void __config_setting_destroy(config_setting_t *setting)
+static void __config_setting_destroy(struct config_setting_t *setting)
{
if(setting)
{
@@ -492,9 +492,9 @@ static void __config_setting_destroy(config_setting_t *setting)
/* ------------------------------------------------------------------------- */
-static void __config_list_destroy(config_list_t *list)
+static void __config_list_destroy(struct config_list_t *list)
{
- config_setting_t **p;
+ struct config_setting_t **p;
unsigned int i;
if(! list)
@@ -513,7 +513,7 @@ static void __config_list_destroy(config_list_t *list)
/* ------------------------------------------------------------------------- */
-static int __config_vector_checktype(const config_setting_t *vector, int type)
+static int __config_vector_checktype(const struct config_setting_t *vector, int type)
{
/* if the array is empty, then it has no type yet */
@@ -557,7 +557,7 @@ static int __config_validate_name(const char *name)
/* ------------------------------------------------------------------------- */
-static int __config_read(config_t *config, FILE *stream, const char *filename,
+static int __config_read(struct config_t *config, FILE *stream, const char *filename,
const char *str)
{
yyscan_t scanner;
@@ -623,22 +623,22 @@ static int __config_read(config_t *config, FILE *stream, const char *filename,
/* ------------------------------------------------------------------------- */
-int config_read(config_t *config, FILE *stream)
+int config_read(struct config_t *config, FILE *stream)
{
return(__config_read(config, stream, NULL, NULL));
}
/* ------------------------------------------------------------------------- */
-int config_read_string(config_t *config, const char *str)
+int config_read_string(struct config_t *config, const char *str)
{
return(__config_read(config, NULL, NULL, str));
}
/* ------------------------------------------------------------------------- */
-static void __config_write_setting(const config_t *config,
- const config_setting_t *setting,
+static void __config_write_setting(const struct config_t *config,
+ const struct config_setting_t *setting,
FILE *stream, int depth)
{
char group_assign_char = __config_has_option(
@@ -673,7 +673,7 @@ static void __config_write_setting(const config_t *config,
/* ------------------------------------------------------------------------- */
-void config_write(const config_t *config, FILE *stream)
+void config_write(const struct config_t *config, FILE *stream)
{
__config_locale_override();
@@ -684,7 +684,7 @@ void config_write(const config_t *config, FILE *stream)
/* ------------------------------------------------------------------------- */
-int config_read_file(config_t *config, const char *filename)
+int config_read_file(struct config_t *config, const char *filename)
{
int ret, ok = 0;
@@ -721,7 +721,7 @@ int config_read_file(config_t *config, const char *filename)
/* ------------------------------------------------------------------------- */
-int config_write_file(config_t *config, const char *filename)
+int config_write_file(struct config_t *config, const char *filename)
{
FILE *stream = fopen(filename, "wt");
if(stream == NULL)
@@ -740,7 +740,7 @@ int config_write_file(config_t *config, const char *filename)
/* ------------------------------------------------------------------------- */
-void config_destroy(config_t *config)
+void config_destroy(struct config_t *config)
{
unsigned int count = config->num_filenames;
const char **f;
@@ -753,16 +753,16 @@ void config_destroy(config_t *config)
_delete(config->filenames);
_delete(config->include_dir);
- memset((void *)config, 0, sizeof(config_t));
+ memset((void *)config, 0, sizeof(struct config_t));
}
/* ------------------------------------------------------------------------- */
-void config_init(config_t *config)
+void config_init(struct config_t *config)
{
- memset((void *)config, 0, sizeof(config_t));
+ memset((void *)config, 0, sizeof(struct config_t));
- config->root = _new(config_setting_t);
+ config->root = _new(struct config_setting_t);
config->root->type = CONFIG_TYPE_GROUP;
config->root->config = config;
config->options = (CONFIG_OPTION_SEMICOLON_SEPARATORS
@@ -773,7 +773,7 @@ void config_init(config_t *config)
/* ------------------------------------------------------------------------- */
-void config_set_auto_convert(config_t *config, int flag)
+void config_set_auto_convert(struct config_t *config, int flag)
{
if(flag)
config->options |= CONFIG_OPTION_AUTOCONVERT;
@@ -783,39 +783,39 @@ void config_set_auto_convert(config_t *config, int flag)
/* ------------------------------------------------------------------------- */
-int config_get_auto_convert(const config_t *config)
+int config_get_auto_convert(const struct config_t *config)
{
return(__config_has_option(config, CONFIG_OPTION_AUTOCONVERT));
}
/* ------------------------------------------------------------------------- */
-void config_set_options(config_t *config, int options)
+void config_set_options(struct config_t *config, int options)
{
config->options = options;
}
/* ------------------------------------------------------------------------- */
-int config_get_options(const config_t *config)
+int config_get_options(const struct config_t *config)
{
return(config->options);
}
/* ------------------------------------------------------------------------- */
-static config_setting_t *config_setting_create(config_setting_t *parent,
+static struct config_setting_t *config_setting_create(struct config_setting_t *parent,
const char *name, int type)
{
- config_setting_t *setting;
- config_list_t *list;
+ struct config_setting_t *setting;
+ struct config_list_t *list;
if((parent->type != CONFIG_TYPE_GROUP)
&& (parent->type != CONFIG_TYPE_ARRAY)
&& (parent->type != CONFIG_TYPE_LIST))
return(NULL);
- setting = _new(config_setting_t);
+ setting = _new(struct config_setting_t);
setting->parent = parent;
setting->name = (name == NULL) ? NULL : strdup(name);
setting->type = type;
@@ -826,7 +826,7 @@ static config_setting_t *config_setting_create(config_setting_t *parent,
list = parent->value.list;
if(! list)
- list = parent->value.list = _new(config_list_t);
+ list = parent->value.list = _new(struct config_list_t);
__config_list_add(list, setting);
@@ -835,7 +835,7 @@ static config_setting_t *config_setting_create(config_setting_t *parent,
/* ------------------------------------------------------------------------- */
-static int __config_setting_get_int(const config_setting_t *setting,
+static int __config_setting_get_int(const struct config_setting_t *setting,
int *value)
{
switch(setting->type)
@@ -868,7 +868,7 @@ static int __config_setting_get_int(const config_setting_t *setting,
/* ------------------------------------------------------------------------- */
-int config_setting_get_int(const config_setting_t *setting)
+int config_setting_get_int(const struct config_setting_t *setting)
{
int value = 0;
__config_setting_get_int(setting, &value);
@@ -877,7 +877,7 @@ int config_setting_get_int(const config_setting_t *setting)
/* ------------------------------------------------------------------------- */
-static int __config_setting_get_int64(const config_setting_t *setting,
+static int __config_setting_get_int64(const struct config_setting_t *setting,
long long *value)
{
switch(setting->type)
@@ -906,7 +906,7 @@ static int __config_setting_get_int64(const config_setting_t *setting,
/* ------------------------------------------------------------------------- */
-long long config_setting_get_int64(const config_setting_t *setting)
+long long config_setting_get_int64(const struct config_setting_t *setting)
{
long long value = 0;
__config_setting_get_int64(setting, &value);
@@ -915,10 +915,10 @@ long long config_setting_get_int64(const config_setting_t *setting)
/* ------------------------------------------------------------------------- */
-int config_setting_lookup_int(const config_setting_t *setting,
+int config_setting_lookup_int(const struct config_setting_t *setting,
const char *name, int *value)
{
- config_setting_t *member = config_setting_get_member(setting, name);
+ struct config_setting_t *member = config_setting_get_member(setting, name);
if(! member)
return(CONFIG_FALSE);
@@ -927,10 +927,10 @@ int config_setting_lookup_int(const config_setting_t *setting,
/* ------------------------------------------------------------------------- */
-int config_setting_lookup_int64(const config_setting_t *setting,
+int config_setting_lookup_int64(const struct config_setting_t *setting,
const char *name, long long *value)
{
- config_setting_t *member = config_setting_get_member(setting, name);
+ struct config_setting_t *member = config_setting_get_member(setting, name);
if(! member)
return(CONFIG_FALSE);
@@ -939,7 +939,7 @@ int config_setting_lookup_int64(const config_setting_t *setting,
/* ------------------------------------------------------------------------- */
-static int __config_setting_get_float(const config_setting_t *setting,
+static int __config_setting_get_float(const struct config_setting_t *setting,
double *value)
{
switch(setting->type)
@@ -973,7 +973,7 @@ static int __config_setting_get_float(const config_setting_t *setting,
/* ------------------------------------------------------------------------- */
-double config_setting_get_float(const config_setting_t *setting)
+double config_setting_get_float(const struct config_setting_t *setting)
{
double value = 0.0;
__config_setting_get_float(setting, &value);
@@ -982,10 +982,10 @@ double config_setting_get_float(const config_setting_t *setting)
/* ------------------------------------------------------------------------- */
-int config_setting_lookup_float(const config_setting_t *setting,
+int config_setting_lookup_float(const struct config_setting_t *setting,
const char *name, double *value)
{
- config_setting_t *member = config_setting_get_member(setting, name);
+ struct config_setting_t *member = config_setting_get_member(setting, name);
if(! member)
return(CONFIG_FALSE);
@@ -994,10 +994,10 @@ int config_setting_lookup_float(const config_setting_t *setting,
/* ------------------------------------------------------------------------- */
-int config_setting_lookup_string(const config_setting_t *setting,
+int config_setting_lookup_string(const struct config_setting_t *setting,
const char *name, const char **value)
{
- config_setting_t *member = config_setting_get_member(setting, name);
+ struct config_setting_t *member = config_setting_get_member(setting, name);
if(! member)
return(CONFIG_FALSE);
@@ -1010,10 +1010,10 @@ int config_setting_lookup_string(const config_setting_t *setting,
/* ------------------------------------------------------------------------- */
-int config_setting_lookup_bool(const config_setting_t *setting,
+int config_setting_lookup_bool(const struct config_setting_t *setting,
const char *name, int *value)
{
- config_setting_t *member = config_setting_get_member(setting, name);
+ struct config_setting_t *member = config_setting_get_member(setting, name);
if(! member)
return(CONFIG_FALSE);
@@ -1026,7 +1026,7 @@ int config_setting_lookup_bool(const config_setting_t *setting,
/* ------------------------------------------------------------------------- */
-int config_setting_set_int(config_setting_t *setting, int value)
+int config_setting_set_int(struct config_setting_t *setting, int value)
{
switch(setting->type)
{
@@ -1054,7 +1054,7 @@ int config_setting_set_int(config_setting_t *setting, int value)
/* ------------------------------------------------------------------------- */
-int config_setting_set_int64(config_setting_t *setting, long long value)
+int config_setting_set_int64(struct config_setting_t *setting, long long value)
{
switch(setting->type)
{
@@ -1089,7 +1089,7 @@ int config_setting_set_int64(config_setting_t *setting, long long value)
/* ------------------------------------------------------------------------- */
-int config_setting_set_float(config_setting_t *setting, double value)
+int config_setting_set_float(struct config_setting_t *setting, double value)
{
switch(setting->type)
{
@@ -1126,14 +1126,14 @@ int config_setting_set_float(config_setting_t *setting, double value)
/* ------------------------------------------------------------------------- */
-int config_setting_get_bool(const config_setting_t *setting)
+int config_setting_get_bool(const struct config_setting_t *setting)
{
return((setting->type == CONFIG_TYPE_BOOL) ? setting->value.ival : 0);
}
/* ------------------------------------------------------------------------- */
-int config_setting_set_bool(config_setting_t *setting, int value)
+int config_setting_set_bool(struct config_setting_t *setting, int value)
{
if(setting->type == CONFIG_TYPE_NONE)
setting->type = CONFIG_TYPE_BOOL;
@@ -1146,14 +1146,14 @@ int config_setting_set_bool(config_setting_t *setting, int value)
/* ------------------------------------------------------------------------- */
-const char *config_setting_get_string(const config_setting_t *setting)
+const char *config_setting_get_string(const struct config_setting_t *setting)
{
return((setting->type == CONFIG_TYPE_STRING) ? setting->value.sval : NULL);
}
/* ------------------------------------------------------------------------- */
-int config_setting_set_string(config_setting_t *setting, const char *value)
+int config_setting_set_string(struct config_setting_t *setting, const char *value)
{
if(setting->type == CONFIG_TYPE_NONE)
setting->type = CONFIG_TYPE_STRING;
@@ -1169,7 +1169,7 @@ int config_setting_set_string(config_setting_t *setting, const char *value)
/* ------------------------------------------------------------------------- */
-int config_setting_set_format(config_setting_t *setting, short format)
+int config_setting_set_format(struct config_setting_t *setting, short format)
{
if(((setting->type != CONFIG_TYPE_INT)
&& (setting->type != CONFIG_TYPE_INT64))
@@ -1183,7 +1183,7 @@ int config_setting_set_format(config_setting_t *setting, short format)
/* ------------------------------------------------------------------------- */
-short config_setting_get_format(const config_setting_t *setting)
+short config_setting_get_format(const struct config_setting_t *setting)
{
return(setting->format != 0 ? setting->format
: setting->config->default_format);
@@ -1191,11 +1191,11 @@ short config_setting_get_format(const config_setting_t *setting)
/* ------------------------------------------------------------------------- */
-config_setting_t *config_setting_lookup(config_setting_t *setting,
+struct config_setting_t *config_setting_lookup(struct config_setting_t *setting,
const char *path)
{
const char *p = path;
- config_setting_t *found;
+ struct config_setting_t *found;
for(;;)
{
@@ -1224,17 +1224,17 @@ config_setting_t *config_setting_lookup(config_setting_t *setting,
/* ------------------------------------------------------------------------- */
-config_setting_t *config_lookup(const config_t *config, const char *path)
+struct config_setting_t *config_lookup(const struct config_t *config, const char *path)
{
return(config_setting_lookup(config->root, path));
}
/* ------------------------------------------------------------------------- */
-int config_lookup_string(const config_t *config, const char *path,
+int config_lookup_string(const struct config_t *config, const char *path,
const char **value)
{
- const config_setting_t *s = config_lookup(config, path);
+ const struct config_setting_t *s = config_lookup(config, path);
if(! s)
return(CONFIG_FALSE);
@@ -1248,10 +1248,10 @@ int config_lookup_string(const config_t *config, const char *path,
/* ------------------------------------------------------------------------- */
-int config_lookup_int(const config_t *config, const char *path,
+int config_lookup_int(const struct config_t *config, const char *path,
int *value)
{
- const config_setting_t *s = config_lookup(config, path);
+ const struct config_setting_t *s = config_lookup(config, path);
if(! s)
return(CONFIG_FALSE);
@@ -1260,10 +1260,10 @@ int config_lookup_int(const config_t *config, const char *path,
/* ------------------------------------------------------------------------- */
-int config_lookup_int64(const config_t *config, const char *path,
+int config_lookup_int64(const struct config_t *config, const char *path,
long long *value)
{
- const config_setting_t *s = config_lookup(config, path);
+ const struct config_setting_t *s = config_lookup(config, path);
if(! s)
return(CONFIG_FALSE);
@@ -1272,10 +1272,10 @@ int config_lookup_int64(const config_t *config, const char *path,
/* ------------------------------------------------------------------------- */
-int config_lookup_float(const config_t *config, const char *path,
+int config_lookup_float(const struct config_t *config, const char *path,
double *value)
{
- const config_setting_t *s = config_lookup(config, path);
+ const struct config_setting_t *s = config_lookup(config, path);
if(! s)
return(CONFIG_FALSE);
@@ -1284,9 +1284,9 @@ int config_lookup_float(const config_t *config, const char *path,
/* ------------------------------------------------------------------------- */
-int config_lookup_bool(const config_t *config, const char *path, int *value)
+int config_lookup_bool(const struct config_t *config, const char *path, int *value)
{
- const config_setting_t *s = config_lookup(config, path);
+ const struct config_setting_t *s = config_lookup(config, path);
if(! s)
return(CONFIG_FALSE);
@@ -1299,19 +1299,19 @@ int config_lookup_bool(const config_t *config, const char *path, int *value)
/* ------------------------------------------------------------------------- */
-int config_setting_get_int_elem(const config_setting_t *vector, int idx)
+int config_setting_get_int_elem(const struct config_setting_t *vector, int idx)
{
- const config_setting_t *element = config_setting_get_elem(vector, idx);
+ const struct config_setting_t *element = config_setting_get_elem(vector, idx);
return(element ? config_setting_get_int(element) : 0);
}
/* ------------------------------------------------------------------------- */
-config_setting_t *config_setting_set_int_elem(config_setting_t *vector,
+struct config_setting_t *config_setting_set_int_elem(struct config_setting_t *vector,
int idx, int value)
{
- config_setting_t *element = NULL;
+ struct config_setting_t *element = NULL;
if((vector->type != CONFIG_TYPE_ARRAY) && (vector->type != CONFIG_TYPE_LIST))
return(NULL);
@@ -1339,20 +1339,20 @@ config_setting_t *config_setting_set_int_elem(config_setting_t *vector,
/* ------------------------------------------------------------------------- */
-long long config_setting_get_int64_elem(const config_setting_t *vector,
+long long config_setting_get_int64_elem(const struct config_setting_t *vector,
int idx)
{
- const config_setting_t *element = config_setting_get_elem(vector, idx);
+ const struct config_setting_t *element = config_setting_get_elem(vector, idx);
return(element ? config_setting_get_int64(element) : 0);
}
/* ------------------------------------------------------------------------- */
-config_setting_t *config_setting_set_int64_elem(config_setting_t *vector,
+struct config_setting_t *config_setting_set_int64_elem(struct config_setting_t *vector,
int idx, long long value)
{
- config_setting_t *element = NULL;
+ struct config_setting_t *element = NULL;
if((vector->type != CONFIG_TYPE_ARRAY) && (vector->type != CONFIG_TYPE_LIST))
return(NULL);
@@ -1380,19 +1380,19 @@ config_setting_t *config_setting_set_int64_elem(config_setting_t *vector,
/* ------------------------------------------------------------------------- */
-double config_setting_get_float_elem(const config_setting_t *vector, int idx)
+double config_setting_get_float_elem(const struct config_setting_t *vector, int idx)
{
- config_setting_t *element = config_setting_get_elem(vector, idx);
+ struct config_setting_t *element = config_setting_get_elem(vector, idx);
return(element ? config_setting_get_float(element) : 0.0);
}
/* ------------------------------------------------------------------------- */
-config_setting_t *config_setting_set_float_elem(config_setting_t *vector,
+struct config_setting_t *config_setting_set_float_elem(struct config_setting_t *vector,
int idx, double value)
{
- config_setting_t *element = NULL;
+ struct config_setting_t *element = NULL;
if((vector->type != CONFIG_TYPE_ARRAY) && (vector->type != CONFIG_TYPE_LIST))
return(NULL);
@@ -1418,9 +1418,9 @@ config_setting_t *config_setting_set_float_elem(config_setting_t *vector,
/* ------------------------------------------------------------------------- */
-int config_setting_get_bool_elem(const config_setting_t *vector, int idx)
+int config_setting_get_bool_elem(const struct config_setting_t *vector, int idx)
{
- config_setting_t *element = config_setting_get_elem(vector, idx);
+ struct config_setting_t *element = config_setting_get_elem(vector, idx);
if(! element)
return(CONFIG_FALSE);
@@ -1433,10 +1433,10 @@ int config_setting_get_bool_elem(const config_setting_t *vector, int idx)
/* ------------------------------------------------------------------------- */
-config_setting_t *config_setting_set_bool_elem(config_setting_t *vector,
+struct config_setting_t *config_setting_set_bool_elem(struct config_setting_t *vector,
int idx, int value)
{
- config_setting_t *element = NULL;
+ struct config_setting_t *element = NULL;
if((vector->type != CONFIG_TYPE_ARRAY) && (vector->type != CONFIG_TYPE_LIST))
return(NULL);
@@ -1462,10 +1462,10 @@ config_setting_t *config_setting_set_bool_elem(config_setting_t *vector,
/* ------------------------------------------------------------------------- */
-const char *config_setting_get_string_elem(const config_setting_t *vector,
+const char *config_setting_get_string_elem(const struct config_setting_t *vector,
int idx)
{
- config_setting_t *element = config_setting_get_elem(vector, idx);
+ struct config_setting_t *element = config_setting_get_elem(vector, idx);
if(! element)
return(NULL);
@@ -1478,10 +1478,10 @@ const char *config_setting_get_string_elem(const config_setting_t *vector,
/* ------------------------------------------------------------------------- */
-config_setting_t *config_setting_set_string_elem(config_setting_t *vector,
+struct config_setting_t *config_setting_set_string_elem(struct config_setting_t *vector,
int idx, const char *value)
{
- config_setting_t *element = NULL;
+ struct config_setting_t *element = NULL;
if((vector->type != CONFIG_TYPE_ARRAY) && (vector->type != CONFIG_TYPE_LIST))
return(NULL);
@@ -1507,10 +1507,10 @@ config_setting_t *config_setting_set_string_elem(config_setting_t *vector,
/* ------------------------------------------------------------------------- */
-config_setting_t *config_setting_get_elem(const config_setting_t *vector,
+struct config_setting_t *config_setting_get_elem(const struct config_setting_t *vector,
unsigned int idx)
{
- config_list_t *list = vector->value.list;
+ struct config_list_t *list = vector->value.list;
if(((vector->type != CONFIG_TYPE_ARRAY)
&& (vector->type != CONFIG_TYPE_LIST)
@@ -1525,7 +1525,7 @@ config_setting_t *config_setting_get_elem(const config_setting_t *vector,
/* ------------------------------------------------------------------------- */
-config_setting_t *config_setting_get_member(const config_setting_t *setting,
+struct config_setting_t *config_setting_get_member(const struct config_setting_t *setting,
const char *name)
{
if(setting->type != CONFIG_TYPE_GROUP)
@@ -1536,14 +1536,14 @@ config_setting_t *config_setting_get_member(const config_setting_t *setting,
/* ------------------------------------------------------------------------- */
-void config_set_destructor(config_t *config, void (*destructor)(void *))
+void config_set_destructor(struct config_t *config, void (*destructor)(void *))
{
config->destructor = destructor;
}
/* ------------------------------------------------------------------------- */
-void config_set_include_dir(config_t *config, const char *include_dir)
+void config_set_include_dir(struct config_t *config, const char *include_dir)
{
_delete(config->include_dir);
config->include_dir = strdup(include_dir);
@@ -1551,7 +1551,7 @@ void config_set_include_dir(config_t *config, const char *include_dir)
/* ------------------------------------------------------------------------- */
-int config_setting_length(const config_setting_t *setting)
+int config_setting_length(const struct config_setting_t *setting)
{
if((setting->type != CONFIG_TYPE_GROUP)
&& (setting->type != CONFIG_TYPE_ARRAY)
@@ -1566,14 +1566,14 @@ int config_setting_length(const config_setting_t *setting)
/* ------------------------------------------------------------------------- */
-void config_setting_set_hook(config_setting_t *setting, void *hook)
+void config_setting_set_hook(struct config_setting_t *setting, void *hook)
{
setting->hook = hook;
}
/* ------------------------------------------------------------------------- */
-config_setting_t *config_setting_add(config_setting_t *parent,
+struct config_setting_t *config_setting_add(struct config_setting_t *parent,
const char *name, int type)
{
if((type < CONFIG_TYPE_NONE) || (type > CONFIG_TYPE_LIST))
@@ -1608,10 +1608,10 @@ config_setting_t *config_setting_add(config_setting_t *parent,
/* ------------------------------------------------------------------------- */
-int config_setting_remove(config_setting_t *parent, const char *name)
+int config_setting_remove(struct config_setting_t *parent, const char *name)
{
unsigned int idx;
- config_setting_t *setting;
+ struct config_setting_t *setting;
if(! parent)
return(CONFIG_FALSE);
@@ -1630,10 +1630,10 @@ int config_setting_remove(config_setting_t *parent, const char *name)
/* ------------------------------------------------------------------------- */
-int config_setting_remove_elem(config_setting_t *parent, unsigned int idx)
+int config_setting_remove_elem(struct config_setting_t *parent, unsigned int idx)
{
- config_list_t *list;
- config_setting_t *removed = NULL;
+ struct config_list_t *list;
+ struct config_setting_t *removed = NULL;
if(! parent)
return(CONFIG_FALSE);
@@ -1656,10 +1656,10 @@ int config_setting_remove_elem(config_setting_t *parent, unsigned int idx)
/* ------------------------------------------------------------------------- */
-int config_setting_index(const config_setting_t *setting)
+int config_setting_index(const struct config_setting_t *setting)
{
- config_setting_t **found = NULL;
- config_list_t *list;
+ struct config_setting_t **found = NULL;
+ struct config_list_t *list;
int i;
if(! setting->parent)
diff --git a/3rdparty/libconfig/libconfig.h b/3rdparty/libconfig/libconfig.h
index cf54775a3..58c1f914e 100644
--- a/3rdparty/libconfig/libconfig.h
+++ b/3rdparty/libconfig/libconfig.h
@@ -67,44 +67,44 @@ extern "C" {
#define CONFIG_TRUE (1)
#define CONFIG_FALSE (0)
-typedef union config_value_t
+union config_value_t
{
int ival;
long long llval;
double fval;
char *sval;
struct config_list_t *list;
-} config_value_t;
+};
-typedef struct config_setting_t
+struct config_setting_t
{
char *name;
short type;
short format;
- config_value_t value;
+ union config_value_t value;
struct config_setting_t *parent;
struct config_t *config;
void *hook;
unsigned int line;
const char *file;
-} config_setting_t;
+};
-typedef enum
+enum config_error_t
{
CONFIG_ERR_NONE = 0,
CONFIG_ERR_FILE_IO = 1,
CONFIG_ERR_PARSE = 2
-} config_error_t;
+};
-typedef struct config_list_t
+struct config_list_t
{
unsigned int length;
- config_setting_t **elements;
-} config_list_t;
+ struct config_setting_t **elements;
+};
-typedef struct config_t
+struct config_t
{
- config_setting_t *root;
+ struct config_setting_t *root;
void (*destructor)(void *);
int options;
unsigned short tab_width;
@@ -113,212 +113,212 @@ typedef struct config_t
const char *error_text;
const char *error_file;
int error_line;
- config_error_t error_type;
+ enum config_error_t error_type;
const char **filenames;
unsigned int num_filenames;
-} config_t;
+};
-extern LIBCONFIG_API int config_read(config_t *config, FILE *stream);
-extern LIBCONFIG_API void config_write(const config_t *config, FILE *stream);
+extern LIBCONFIG_API int config_read(struct config_t *config, FILE *stream);
+extern LIBCONFIG_API void config_write(const struct config_t *config, FILE *stream);
-extern LIBCONFIG_API void config_set_default_format(config_t *config,
+extern LIBCONFIG_API void config_set_default_format(struct 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_options(struct config_t *config, int options);
+extern LIBCONFIG_API int config_get_options(const struct 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);
+extern LIBCONFIG_API void config_set_auto_convert(struct config_t *config, int flag);
+extern LIBCONFIG_API int config_get_auto_convert(const struct config_t *config);
-extern LIBCONFIG_API int config_read_string(config_t *config, const char *str);
+extern LIBCONFIG_API int config_read_string(struct config_t *config, const char *str);
-extern LIBCONFIG_API int config_read_file(config_t *config,
+extern LIBCONFIG_API int config_read_file(struct config_t *config,
const char *filename);
-extern LIBCONFIG_API int config_write_file(config_t *config,
+extern LIBCONFIG_API int config_write_file(struct config_t *config,
const char *filename);
-extern LIBCONFIG_API void config_set_destructor(config_t *config,
+extern LIBCONFIG_API void config_set_destructor(struct config_t *config,
void (*destructor)(void *));
-extern LIBCONFIG_API void config_set_include_dir(config_t *config,
+extern LIBCONFIG_API void config_set_include_dir(struct config_t *config,
const char *include_dir);
-extern LIBCONFIG_API void config_init(config_t *config);
-extern LIBCONFIG_API void config_destroy(config_t *config);
+extern LIBCONFIG_API void config_init(struct config_t *config);
+extern LIBCONFIG_API void config_destroy(struct config_t *config);
extern LIBCONFIG_API int config_setting_get_int(
- const config_setting_t *setting);
+ const struct config_setting_t *setting);
extern LIBCONFIG_API long long config_setting_get_int64(
- const config_setting_t *setting);
+ const struct config_setting_t *setting);
extern LIBCONFIG_API double config_setting_get_float(
- const config_setting_t *setting);
+ const struct config_setting_t *setting);
extern LIBCONFIG_API int config_setting_get_bool(
- const config_setting_t *setting);
+ const struct config_setting_t *setting);
extern LIBCONFIG_API const char *config_setting_get_string(
- const config_setting_t *setting);
+ const struct config_setting_t *setting);
extern LIBCONFIG_API int config_setting_lookup_int(
- const config_setting_t *setting, const char *name, int *value);
+ const struct config_setting_t *setting, const char *name, int *value);
extern LIBCONFIG_API int config_setting_lookup_int64(
- const config_setting_t *setting, const char *name, long long *value);
+ const struct config_setting_t *setting, const char *name, long long *value);
extern LIBCONFIG_API int config_setting_lookup_float(
- const config_setting_t *setting, const char *name, double *value);
+ const struct config_setting_t *setting, const char *name, double *value);
extern LIBCONFIG_API int config_setting_lookup_bool(
- const config_setting_t *setting, const char *name, int *value);
+ const struct config_setting_t *setting, const char *name, int *value);
extern LIBCONFIG_API int config_setting_lookup_string(
- const config_setting_t *setting, const char *name, const char **value);
+ const struct config_setting_t *setting, const char *name, const char **value);
-extern LIBCONFIG_API int config_setting_set_int(config_setting_t *setting,
+extern LIBCONFIG_API int config_setting_set_int(struct config_setting_t *setting,
int value);
-extern LIBCONFIG_API int config_setting_set_int64(config_setting_t *setting,
+extern LIBCONFIG_API int config_setting_set_int64(struct config_setting_t *setting,
long long value);
-extern LIBCONFIG_API int config_setting_set_float(config_setting_t *setting,
+extern LIBCONFIG_API int config_setting_set_float(struct config_setting_t *setting,
double value);
-extern LIBCONFIG_API int config_setting_set_bool(config_setting_t *setting,
+extern LIBCONFIG_API int config_setting_set_bool(struct config_setting_t *setting,
int value);
-extern LIBCONFIG_API int config_setting_set_string(config_setting_t *setting,
+extern LIBCONFIG_API int config_setting_set_string(struct config_setting_t *setting,
const char *value);
-extern LIBCONFIG_API int config_setting_set_format(config_setting_t *setting,
+extern LIBCONFIG_API int config_setting_set_format(struct config_setting_t *setting,
short format);
extern LIBCONFIG_API short config_setting_get_format(
- const config_setting_t *setting);
+ const struct config_setting_t *setting);
extern LIBCONFIG_API int config_setting_get_int_elem(
- const config_setting_t *setting, int idx);
+ const struct config_setting_t *setting, int idx);
extern LIBCONFIG_API long long config_setting_get_int64_elem(
- const config_setting_t *setting, int idx);
+ const struct config_setting_t *setting, int idx);
extern LIBCONFIG_API double config_setting_get_float_elem(
- const config_setting_t *setting, int idx);
+ const struct config_setting_t *setting, int idx);
extern LIBCONFIG_API int config_setting_get_bool_elem(
- const config_setting_t *setting, int idx);
+ const struct config_setting_t *setting, int idx);
extern LIBCONFIG_API const char *config_setting_get_string_elem(
- const config_setting_t *setting, int idx);
-
-extern LIBCONFIG_API config_setting_t *config_setting_set_int_elem(
- config_setting_t *setting, int idx, int value);
-extern LIBCONFIG_API config_setting_t *config_setting_set_int64_elem(
- config_setting_t *setting, int idx, long long value);
-extern LIBCONFIG_API config_setting_t *config_setting_set_float_elem(
- config_setting_t *setting, int idx, double value);
-extern LIBCONFIG_API config_setting_t *config_setting_set_bool_elem(
- config_setting_t *setting, int idx, int value);
-extern LIBCONFIG_API config_setting_t *config_setting_set_string_elem(
- config_setting_t *setting, int idx, const char *value);
-
-#define /* const char * */ config_get_include_dir(/* const config_t * */ C) \
+ const struct config_setting_t *setting, int idx);
+
+extern LIBCONFIG_API struct config_setting_t *config_setting_set_int_elem(
+ struct config_setting_t *setting, int idx, int value);
+extern LIBCONFIG_API struct config_setting_t *config_setting_set_int64_elem(
+ struct config_setting_t *setting, int idx, long long value);
+extern LIBCONFIG_API struct config_setting_t *config_setting_set_float_elem(
+ struct config_setting_t *setting, int idx, double value);
+extern LIBCONFIG_API struct config_setting_t *config_setting_set_bool_elem(
+ struct config_setting_t *setting, int idx, int value);
+extern LIBCONFIG_API struct config_setting_t *config_setting_set_string_elem(
+ struct config_setting_t *setting, int idx, const char *value);
+
+#define /* const char * */ config_get_include_dir(/* const struct config_t * */ C) \
((C)->include_dir)
-#define /* int */ config_setting_type(/* const config_setting_t * */ S) \
+#define /* int */ config_setting_type(/* const struct config_setting_t * */ S) \
((S)->type)
-#define /* int */ config_setting_is_group(/* const config_setting_t * */ S) \
+#define /* int */ config_setting_is_group(/* const struct config_setting_t * */ S) \
((S)->type == CONFIG_TYPE_GROUP)
-#define /* int */ config_setting_is_array(/* const config_setting_t * */ S) \
+#define /* int */ config_setting_is_array(/* const struct config_setting_t * */ S) \
((S)->type == CONFIG_TYPE_ARRAY)
-#define /* int */ config_setting_is_list(/* const config_setting_t * */ S) \
+#define /* int */ config_setting_is_list(/* const struct config_setting_t * */ S) \
((S)->type == CONFIG_TYPE_LIST)
#define /* int */ config_setting_is_aggregate( \
- /* const config_setting_t * */ S) \
+ /* const struct config_setting_t * */ S) \
(((S)->type == CONFIG_TYPE_GROUP) || ((S)->type == CONFIG_TYPE_LIST) \
|| ((S)->type == CONFIG_TYPE_ARRAY))
-#define /* int */ config_setting_is_number(/* const config_setting_t * */ S) \
+#define /* int */ config_setting_is_number(/* const struct config_setting_t * */ S) \
(((S)->type == CONFIG_TYPE_INT) \
|| ((S)->type == CONFIG_TYPE_INT64) \
|| ((S)->type == CONFIG_TYPE_FLOAT))
-#define /* int */ config_setting_is_scalar(/* const config_setting_t * */ S) \
+#define /* int */ config_setting_is_scalar(/* const struct config_setting_t * */ S) \
(((S)->type == CONFIG_TYPE_BOOL) || ((S)->type == CONFIG_TYPE_STRING) \
|| config_setting_is_number(S))
#define /* const char * */ config_setting_name( \
- /* const config_setting_t * */ S) \
+ /* const struct config_setting_t * */ S) \
((S)->name)
-#define /* config_setting_t * */ config_setting_parent( \
- /* const config_setting_t * */ S) \
+#define /* struct config_setting_t * */ config_setting_parent( \
+ /* const struct config_setting_t * */ S) \
((S)->parent)
#define /* int */ config_setting_is_root( \
- /* const config_setting_t * */ S) \
+ /* const struct config_setting_t * */ S) \
((S)->parent ? CONFIG_FALSE : CONFIG_TRUE)
-extern LIBCONFIG_API int config_setting_index(const config_setting_t *setting);
+extern LIBCONFIG_API int config_setting_index(const struct config_setting_t *setting);
extern LIBCONFIG_API int config_setting_length(
- const config_setting_t *setting);
-extern LIBCONFIG_API config_setting_t *config_setting_get_elem(
- const config_setting_t *setting, unsigned int idx);
+ const struct config_setting_t *setting);
+extern LIBCONFIG_API struct config_setting_t *config_setting_get_elem(
+ const struct config_setting_t *setting, unsigned int idx);
-extern LIBCONFIG_API config_setting_t *config_setting_get_member(
- const config_setting_t *setting, const char *name);
+extern LIBCONFIG_API struct config_setting_t *config_setting_get_member(
+ const struct config_setting_t *setting, const char *name);
-extern LIBCONFIG_API config_setting_t *config_setting_add(
- config_setting_t *parent, const char *name, int type);
-extern LIBCONFIG_API int config_setting_remove(config_setting_t *parent,
+extern LIBCONFIG_API struct config_setting_t *config_setting_add(
+ struct config_setting_t *parent, const char *name, int type);
+extern LIBCONFIG_API int config_setting_remove(struct config_setting_t *parent,
const char *name);
-extern LIBCONFIG_API int config_setting_remove_elem(config_setting_t *parent,
+extern LIBCONFIG_API int config_setting_remove_elem(struct config_setting_t *parent,
unsigned int idx);
-extern LIBCONFIG_API void config_setting_set_hook(config_setting_t *setting,
+extern LIBCONFIG_API void config_setting_set_hook(struct config_setting_t *setting,
void *hook);
#define config_setting_get_hook(S) ((S)->hook)
-extern LIBCONFIG_API config_setting_t *config_lookup(const config_t *config,
+extern LIBCONFIG_API struct config_setting_t *config_lookup(const struct config_t *config,
const char *path);
-extern LIBCONFIG_API config_setting_t *config_setting_lookup(
- config_setting_t *setting, const char *path);
+extern LIBCONFIG_API struct config_setting_t *config_setting_lookup(
+ struct config_setting_t *setting, const char *path);
-extern LIBCONFIG_API int config_lookup_int(const config_t *config,
+extern LIBCONFIG_API int config_lookup_int(const struct config_t *config,
const char *path, int *value);
-extern LIBCONFIG_API int config_lookup_int64(const config_t *config,
+extern LIBCONFIG_API int config_lookup_int64(const struct config_t *config,
const char *path,
long long *value);
-extern LIBCONFIG_API int config_lookup_float(const config_t *config,
+extern LIBCONFIG_API int config_lookup_float(const struct config_t *config,
const char *path, double *value);
-extern LIBCONFIG_API int config_lookup_bool(const config_t *config,
+extern LIBCONFIG_API int config_lookup_bool(const struct config_t *config,
const char *path, int *value);
-extern LIBCONFIG_API int config_lookup_string(const config_t *config,
+extern LIBCONFIG_API int config_lookup_string(const struct config_t *config,
const char *path,
const char **value);
-#define /* config_setting_t * */ config_root_setting( \
- /* const config_t * */ C) \
+#define /* struct config_setting_t * */ config_root_setting( \
+ /* const struct config_t * */ C) \
((C)->root)
-#define /* void */ config_set_default_format(/* config_t * */ C, \
+#define /* void */ config_set_default_format(/* struct config_t * */ C, \
/* short */ F) \
(C)->default_format = (F)
-#define /* short */ config_get_default_format(/* config_t * */ C) \
+#define /* short */ config_get_default_format(/* struct config_t * */ C) \
((C)->default_format)
-#define /* void */ config_set_tab_width(/* config_t * */ C, \
+#define /* void */ config_set_tab_width(/* struct config_t * */ C, \
/* unsigned short */ W) \
(C)->tab_width = ((W) & 0x0F)
-#define /* unsigned char */ config_get_tab_width(/* const config_t * */ C) \
+#define /* unsigned char */ config_get_tab_width(/* const struct config_t * */ C) \
((C)->tab_width)
#define /* unsigned short */ config_setting_source_line( \
- /* const config_setting_t * */ S) \
+ /* const struct config_setting_t * */ S) \
((S)->line)
#define /* const char */ config_setting_source_file( \
- /* const config_setting_t * */ S) \
+ /* const struct config_setting_t * */ S) \
((S)->file)
-#define /* const char * */ config_error_text(/* const config_t * */ C) \
+#define /* const char * */ config_error_text(/* const struct config_t * */ C) \
((C)->error_text)
-#define /* const char * */ config_error_file(/* const config_t * */ C) \
+#define /* const char * */ config_error_file(/* const struct config_t * */ C) \
((C)->error_file)
-#define /* int */ config_error_line(/* const config_t * */ C) \
+#define /* int */ config_error_line(/* const struct config_t * */ C) \
((C)->error_line)
-#define /* config_error_t */ config_error_type(/* const config_t * */ C) \
+#define /* enum config_error_t */ config_error_type(/* const struct config_t * */ C) \
((C)->error_type)
#ifdef __cplusplus
diff --git a/3rdparty/libconfig/parsectx.h b/3rdparty/libconfig/parsectx.h
index 93cc979c9..4d1f261d9 100644
--- a/3rdparty/libconfig/parsectx.h
+++ b/3rdparty/libconfig/parsectx.h
@@ -28,9 +28,9 @@
struct parse_context
{
- config_t *config;
- config_setting_t *parent;
- config_setting_t *setting;
+ struct config_t *config;
+ struct config_setting_t *parent;
+ struct config_setting_t *setting;
char *name;
strbuf_t string;
};
diff --git a/3rdparty/libconfig/scanctx.h b/3rdparty/libconfig/scanctx.h
index c8dc22f87..004523e2a 100644
--- a/3rdparty/libconfig/scanctx.h
+++ b/3rdparty/libconfig/scanctx.h
@@ -33,7 +33,7 @@
struct scan_context
{
- config_t *config;
+ struct config_t *config;
const char *top_filename;
const char *files[MAX_INCLUDE_DEPTH];
void *buffers[MAX_INCLUDE_DEPTH];