summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-11-20 01:00:45 +0300
committerGitHub <noreply@github.com>2016-11-20 01:00:45 +0300
commit511219ae00986d41586f99421fef2126325f1e15 (patch)
treefd6e8c47b35379099ce9ce60041ae2de8bee102e
parent20b44f8fcaff75657386783c2696ca9dc2cbc7d6 (diff)
parent187e8853c503142dedebb9c5210ed9ef7992d679 (diff)
downloadhercules-511219ae00986d41586f99421fef2126325f1e15.tar.gz
hercules-511219ae00986d41586f99421fef2126325f1e15.tar.bz2
hercules-511219ae00986d41586f99421fef2126325f1e15.tar.xz
hercules-511219ae00986d41586f99421fef2126325f1e15.zip
Merge pull request #1517 from HerculesWS/libconfig-quickupdate
Libconfig quickupdate
-rw-r--r--3rdparty/libconfig/extra/gen/clangwarnings.patch27
-rw-r--r--3rdparty/libconfig/grammar.c926
-rw-r--r--3rdparty/libconfig/grammar.h94
-rw-r--r--3rdparty/libconfig/scanner.c282
-rw-r--r--3rdparty/libconfig/scanner.h106
-rw-r--r--src/char/Makefile.in6
-rw-r--r--src/char/char.c2
-rw-r--r--src/common/conf.c86
-rw-r--r--src/common/conf.h14
-rw-r--r--src/login/Makefile.in6
-rw-r--r--src/map/Makefile.in6
-rw-r--r--src/plugins/HPMHooking/HPMHooking.Defs.inc24
-rw-r--r--src/plugins/HPMHooking/HPMHooking_char.Hooks.inc40
-rw-r--r--src/plugins/HPMHooking/HPMHooking_login.Hooks.inc40
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.Hooks.inc40
-rw-r--r--src/test/Makefile.in4
-rw-r--r--src/test/test_libconfig.c37
-rw-r--r--src/test/test_spinlock.c12
-rw-r--r--src/tool/Makefile.in4
-rwxr-xr-xtools/ci/travis.sh22
20 files changed, 852 insertions, 926 deletions
diff --git a/3rdparty/libconfig/extra/gen/clangwarnings.patch b/3rdparty/libconfig/extra/gen/clangwarnings.patch
index c3b45ef33..0270dfc44 100644
--- a/3rdparty/libconfig/extra/gen/clangwarnings.patch
+++ b/3rdparty/libconfig/extra/gen/clangwarnings.patch
@@ -2,14 +2,35 @@ diff --git a/grammar.c b/grammar.c
index 3595578..26444f8 100644
--- a/grammar.c
+++ b/grammar.c
-@@ -1211,9 +1211,7 @@ void libconfig_yyerror(void *scanner, struct parse_context *ctx,
+@@ -1084,9 +1084,7 @@ void libconfig_yyerror(void *scanner, struct parse_context *ctx,
+ YYUSE (scanner);
YYUSE (ctx);
YYUSE (scan_ctx);
-
- if (!yymsg)
- yymsg = "Deleting";
- YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
-+ YY_SYMBOL_PRINT (yymsg ? yymsg : "Deleting", yytype, yyvaluep, yylocationp);
++ YY_SYMBOL_PRINT (yymsg != NULL ? yymsg : "Deleting", yytype, yyvaluep, yylocationp);
+ YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
YYUSE (yytype);
+diff --git a/scanner.c b/scanner.c
+index 60882db..8b8af33 100644
+--- a/scanner.c
++++ b/scanner.c
+@@ -21,6 +21,7 @@
+ #include <string.h>
+ #include <errno.h>
+ #include <stdlib.h>
++#include <assert.h>
+
+ /* end standard C headers. */
+
+@@ -1702,6 +1703,8 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
+ libconfig_yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner);
+ }
+
++ assert(YY_CURRENT_BUFFER != NULL); // Fixes compiler warning -Wnull-dereference on gcc-6 and -O3
++
+ libconfig_yy_init_buffer(YY_CURRENT_BUFFER,input_file ,yyscanner);
+ libconfig_yy_load_buffer_state(yyscanner );
}
diff --git a/3rdparty/libconfig/grammar.c b/3rdparty/libconfig/grammar.c
index 6cd6fb722..a1b099678 100644
--- a/3rdparty/libconfig/grammar.c
+++ b/3rdparty/libconfig/grammar.c
@@ -1,19 +1,19 @@
-/* A Bison parser, made by GNU Bison 2.7.12-4996. */
+/* A Bison parser, made by GNU Bison 3.0.4. */
/* Bison implementation for Yacc-like parsers in C
-
- Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc.
-
+
+ Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc.
+
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
-
+
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
@@ -26,7 +26,7 @@
special exception, which will cause the skeleton and the resulting
Bison output files to be licensed under the GNU General Public
License without this special exception.
-
+
This special exception was added by the Free Software Foundation in
version 2.2 of Bison. */
@@ -44,7 +44,7 @@
#define YYBISON 1
/* Bison version. */
-#define YYBISON_VERSION "2.7.12-4996"
+#define YYBISON_VERSION "3.0.4"
/* Skeleton name. */
#define YYSKELETON_NAME "yacc.c"
@@ -63,14 +63,12 @@
#define yyparse libconfig_yyparse
#define yylex libconfig_yylex
#define yyerror libconfig_yyerror
-#define yylval libconfig_yylval
-#define yychar libconfig_yychar
#define yydebug libconfig_yydebug
#define yynerrs libconfig_yynerrs
+
/* Copy the first part of user declarations. */
-/* Line 371 of yacc.c */
-#line 33 "grammar.y"
+#line 33 "grammar.y" /* yacc.c:339 */
#include <string.h>
#include <stdlib.h>
@@ -122,14 +120,13 @@ void libconfig_yyerror(void *scanner, struct parse_context *ctx,
}
-/* Line 371 of yacc.c */
-#line 127 "grammar.c"
+#line 124 "grammar.c" /* yacc.c:339 */
-# ifndef YY_NULL
+# ifndef YY_NULLPTR
# if defined __cplusplus && 201103L <= __cplusplus
-# define YY_NULL nullptr
+# define YY_NULLPTR nullptr
# else
-# define YY_NULL 0
+# define YY_NULLPTR 0
# endif
# endif
@@ -145,7 +142,7 @@ void libconfig_yyerror(void *scanner, struct parse_context *ctx,
by #include "y.tab.h". */
#ifndef YY_LIBCONFIG_YY_GRAMMAR_H_INCLUDED
# define YY_LIBCONFIG_YY_GRAMMAR_H_INCLUDED
-/* Enabling traces. */
+/* Debug traces. */
#ifndef YYDEBUG
# define YYDEBUG 0
#endif
@@ -153,33 +150,32 @@ void libconfig_yyerror(void *scanner, struct parse_context *ctx,
extern int libconfig_yydebug;
#endif
-/* Tokens. */
+/* Token type. */
#ifndef YYTOKENTYPE
# define YYTOKENTYPE
- /* Put the tokens into the symbol table, so that GDB and other debuggers
- know about them. */
- enum yytokentype {
- TOK_BOOLEAN = 258,
- TOK_INTEGER = 259,
- TOK_HEX = 260,
- TOK_INTEGER64 = 261,
- TOK_HEX64 = 262,
- TOK_FLOAT = 263,
- TOK_STRING = 264,
- TOK_NAME = 265,
- TOK_EQUALS = 266,
- TOK_NEWLINE = 267,
- TOK_ARRAY_START = 268,
- TOK_ARRAY_END = 269,
- TOK_LIST_START = 270,
- TOK_LIST_END = 271,
- TOK_COMMA = 272,
- TOK_GROUP_START = 273,
- TOK_GROUP_END = 274,
- TOK_SEMICOLON = 275,
- TOK_GARBAGE = 276,
- TOK_ERROR = 277
- };
+ enum yytokentype
+ {
+ TOK_BOOLEAN = 258,
+ TOK_INTEGER = 259,
+ TOK_HEX = 260,
+ TOK_INTEGER64 = 261,
+ TOK_HEX64 = 262,
+ TOK_FLOAT = 263,
+ TOK_STRING = 264,
+ TOK_NAME = 265,
+ TOK_EQUALS = 266,
+ TOK_NEWLINE = 267,
+ TOK_ARRAY_START = 268,
+ TOK_ARRAY_END = 269,
+ TOK_LIST_START = 270,
+ TOK_LIST_END = 271,
+ TOK_COMMA = 272,
+ TOK_GROUP_START = 273,
+ TOK_GROUP_END = 274,
+ TOK_SEMICOLON = 275,
+ TOK_GARBAGE = 276,
+ TOK_ERROR = 277
+ };
#endif
/* Tokens. */
#define TOK_BOOLEAN 258
@@ -203,49 +199,35 @@ extern int libconfig_yydebug;
#define TOK_GARBAGE 276
#define TOK_ERROR 277
-
-
+/* Value type. */
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
-typedef union YYSTYPE
+
+union YYSTYPE
{
-/* Line 387 of yacc.c */
-#line 86 "grammar.y"
+#line 86 "grammar.y" /* yacc.c:355 */
int ival;
long long llval;
double fval;
char *sval;
+#line 215 "grammar.c" /* yacc.c:355 */
+};
-/* Line 387 of yacc.c */
-#line 222 "grammar.c"
-} YYSTYPE;
+typedef union YYSTYPE YYSTYPE;
# define YYSTYPE_IS_TRIVIAL 1
-# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1
#endif
-#ifdef YYPARSE_PARAM
-#if defined __STDC__ || defined __cplusplus
-int libconfig_yyparse (void *YYPARSE_PARAM);
-#else
-int libconfig_yyparse ();
-#endif
-#else /* ! YYPARSE_PARAM */
-#if defined __STDC__ || defined __cplusplus
+
int libconfig_yyparse (void *scanner, struct parse_context *ctx, struct scan_context *scan_ctx);
-#else
-int libconfig_yyparse ();
-#endif
-#endif /* ! YYPARSE_PARAM */
#endif /* !YY_LIBCONFIG_YY_GRAMMAR_H_INCLUDED */
/* Copy the second part of user declarations. */
-/* Line 390 of yacc.c */
-#line 249 "grammar.c"
+#line 231 "grammar.c" /* yacc.c:358 */
#ifdef short
# undef short
@@ -259,11 +241,8 @@ typedef unsigned char yytype_uint8;
#ifdef YYTYPE_INT8
typedef YYTYPE_INT8 yytype_int8;
-#elif (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-typedef signed char yytype_int8;
#else
-typedef short int yytype_int8;
+typedef signed char yytype_int8;
#endif
#ifdef YYTYPE_UINT16
@@ -283,8 +262,7 @@ typedef short int yytype_int16;
# define YYSIZE_T __SIZE_TYPE__
# elif defined size_t
# define YYSIZE_T size_t
-# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
+# elif ! defined YYSIZE_T
# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
# define YYSIZE_T size_t
# else
@@ -306,11 +284,30 @@ typedef short int yytype_int16;
# endif
#endif
-#ifndef __attribute__
-/* This feature is available in gcc versions 2.5 and later. */
-# if (! defined __GNUC__ || __GNUC__ < 2 \
- || (__GNUC__ == 2 && __GNUC_MINOR__ < 5))
-# define __attribute__(Spec) /* empty */
+#ifndef YY_ATTRIBUTE
+# if (defined __GNUC__ \
+ && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \
+ || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C
+# define YY_ATTRIBUTE(Spec) __attribute__(Spec)
+# else
+# define YY_ATTRIBUTE(Spec) /* empty */
+# endif
+#endif
+
+#ifndef YY_ATTRIBUTE_PURE
+# define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__))
+#endif
+
+#ifndef YY_ATTRIBUTE_UNUSED
+# define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__))
+#endif
+
+#if !defined _Noreturn \
+ && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112)
+# if defined _MSC_VER && 1200 <= _MSC_VER
+# define _Noreturn __declspec (noreturn)
+# else
+# define _Noreturn YY_ATTRIBUTE ((__noreturn__))
# endif
#endif
@@ -321,25 +318,26 @@ typedef short int yytype_int16;
# define YYUSE(E) /* empty */
#endif
-
-/* Identity function, used to suppress warnings about constant conditions. */
-#ifndef lint
-# define YYID(N) (N)
-#else
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-static int
-YYID (int yyi)
+#if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
+/* Suppress an incorrect diagnostic about yylval being uninitialized. */
+# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
+ _Pragma ("GCC diagnostic push") \
+ _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\
+ _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
+# define YY_IGNORE_MAYBE_UNINITIALIZED_END \
+ _Pragma ("GCC diagnostic pop")
#else
-static int
-YYID (yyi)
- int yyi;
+# define YY_INITIAL_VALUE(Value) Value
#endif
-{
- return yyi;
-}
+#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
+# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
+# define YY_IGNORE_MAYBE_UNINITIALIZED_END
+#endif
+#ifndef YY_INITIAL_VALUE
+# define YY_INITIAL_VALUE(Value) /* Nothing. */
#endif
+
#if ! defined yyoverflow || YYERROR_VERBOSE
/* The parser invokes alloca or malloc; define the necessary symbols. */
@@ -357,8 +355,7 @@ YYID (yyi)
# define alloca _alloca
# else
# define YYSTACK_ALLOC alloca
-# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
+# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
/* Use EXIT_SUCCESS as a witness for stdlib.h. */
# ifndef EXIT_SUCCESS
@@ -370,8 +367,8 @@ YYID (yyi)
# endif
# ifdef YYSTACK_ALLOC
- /* Pacify GCC's `empty if-body' warning. */
-# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
+ /* Pacify GCC's 'empty if-body' warning. */
+# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
# ifndef YYSTACK_ALLOC_MAXIMUM
/* The OS might guarantee only one guard page at the bottom of the stack,
and a page size can be as small as 4096 bytes. So we cannot safely
@@ -387,7 +384,7 @@ YYID (yyi)
# endif
# if (defined __cplusplus && ! defined EXIT_SUCCESS \
&& ! ((defined YYMALLOC || defined malloc) \
- && (defined YYFREE || defined free)))
+ && (defined YYFREE || defined free)))
# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
# ifndef EXIT_SUCCESS
# define EXIT_SUCCESS 0
@@ -395,15 +392,13 @@ YYID (yyi)
# endif
# ifndef YYMALLOC
# define YYMALLOC malloc
-# if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
+# if ! defined malloc && ! defined EXIT_SUCCESS
void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
# endif
# endif
# ifndef YYFREE
# define YYFREE free
-# if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
+# if ! defined free && ! defined EXIT_SUCCESS
void free (void *); /* INFRINGES ON USER NAME SPACE */
# endif
# endif
@@ -413,7 +408,7 @@ void free (void *); /* INFRINGES ON USER NAME SPACE */
#if (! defined yyoverflow \
&& (! defined __cplusplus \
- || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
+ || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
/* A type that is properly aligned for any stack member. */
union yyalloc
@@ -438,16 +433,16 @@ union yyalloc
elements in the stack, and YYPTR gives the new location of the
stack. Advance YYPTR to a properly aligned location for the next
stack. */
-# define YYSTACK_RELOCATE(Stack_alloc, Stack) \
- do \
- { \
- YYSIZE_T yynewbytes; \
- YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
- Stack = &yyptr->Stack_alloc; \
- yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
- yyptr += yynewbytes / sizeof (*yyptr); \
- } \
- while (YYID (0))
+# define YYSTACK_RELOCATE(Stack_alloc, Stack) \
+ do \
+ { \
+ YYSIZE_T yynewbytes; \
+ YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
+ Stack = &yyptr->Stack_alloc; \
+ yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
+ yyptr += yynewbytes / sizeof (*yyptr); \
+ } \
+ while (0)
#endif
@@ -466,7 +461,7 @@ union yyalloc
for (yyi = 0; yyi < (Count); yyi++) \
(Dst)[yyi] = (Src)[yyi]; \
} \
- while (YYID (0))
+ while (0)
# endif
# endif
#endif /* !YYCOPY_NEEDED */
@@ -482,17 +477,19 @@ union yyalloc
#define YYNNTS 23
/* YYNRULES -- Number of rules. */
#define YYNRULES 43
-/* YYNRULES -- Number of states. */
+/* YYNSTATES -- Number of states. */
#define YYNSTATES 51
-/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
+/* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned
+ by yylex, with out-of-bounds checking. */
#define YYUNDEFTOK 2
#define YYMAXUTOK 277
-#define YYTRANSLATE(YYX) \
+#define YYTRANSLATE(YYX) \
((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
-/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
+/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
+ as returned by yylex, without out-of-bounds checking. */
static const yytype_uint8 yytranslate[] =
{
0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
@@ -526,33 +523,7 @@ static const yytype_uint8 yytranslate[] =
};
#if YYDEBUG
-/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
- YYRHS. */
-static const yytype_uint8 yyprhs[] =
-{
- 0, 0, 3, 4, 6, 8, 11, 12, 14, 15,
- 17, 19, 20, 22, 23, 29, 30, 35, 36, 41,
- 43, 45, 47, 49, 51, 54, 56, 58, 60, 62,
- 64, 66, 68, 70, 74, 77, 78, 80, 82, 86,
- 89, 90, 92, 93
-};
-
-/* YYRHS -- A `-1'-separated list of the rules' RHS. */
-static const yytype_int8 yyrhs[] =
-{
- 24, 0, -1, -1, 25, -1, 29, -1, 25, 29,
- -1, -1, 25, -1, -1, 20, -1, 17, -1, -1,
- 17, -1, -1, 10, 30, 11, 35, 27, -1, -1,
- 13, 32, 43, 14, -1, -1, 15, 34, 40, 16,
- -1, 37, -1, 31, -1, 33, -1, 44, -1, 9,
- -1, 36, 9, -1, 3, -1, 4, -1, 6, -1,
- 5, -1, 7, -1, 8, -1, 36, -1, 35, -1,
- 38, 17, 35, -1, 38, 28, -1, -1, 39, -1,
- 37, -1, 41, 17, 37, -1, 41, 28, -1, -1,
- 42, -1, -1, 18, 45, 26, 19, -1
-};
-
-/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
+ /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
static const yytype_uint16 yyrline[] =
{
0, 101, 101, 103, 107, 108, 111, 113, 116, 118,
@@ -577,13 +548,13 @@ static const char *const yytname[] =
"setting_terminator", "comma_optional", "setting", "$@1", "array", "$@2",
"list", "$@3", "value", "string", "simple_value", "value_list_sub",
"value_list", "value_list_optional", "simple_value_list_sub",
- "simple_value_list", "simple_value_list_optional", "group", "$@4", YY_NULL
+ "simple_value_list", "simple_value_list_optional", "group", "$@4", YY_NULLPTR
};
#endif
# ifdef YYPRINT
-/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
- token YYLEX-NUM. */
+/* YYTOKNUM[NUM] -- (External) token number corresponding to the
+ (internal) symbol number NUM (which must be that of a token). */
static const yytype_uint16 yytoknum[] =
{
0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
@@ -592,50 +563,18 @@ static const yytype_uint16 yytoknum[] =
};
# endif
-/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
-static const yytype_uint8 yyr1[] =
-{
- 0, 23, 24, 24, 25, 25, 26, 26, 27, 27,
- 27, 28, 28, 30, 29, 32, 31, 34, 33, 35,
- 35, 35, 35, 36, 36, 37, 37, 37, 37, 37,
- 37, 37, 38, 38, 39, 40, 40, 41, 41, 42,
- 43, 43, 45, 44
-};
+#define YYPACT_NINF -26
-/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
-static const yytype_uint8 yyr2[] =
-{
- 0, 2, 0, 1, 1, 2, 0, 1, 0, 1,
- 1, 0, 1, 0, 5, 0, 4, 0, 4, 1,
- 1, 1, 1, 1, 2, 1, 1, 1, 1, 1,
- 1, 1, 1, 3, 2, 0, 1, 1, 3, 2,
- 0, 1, 0, 4
-};
+#define yypact_value_is_default(Yystate) \
+ (!!((Yystate) == (-26)))
-/* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM.
- Performed when YYTABLE doesn't specify something else to do. Zero
- means the default is an error. */
-static const yytype_uint8 yydefact[] =
-{
- 2, 13, 0, 3, 4, 0, 1, 5, 0, 25,
- 26, 28, 27, 29, 30, 23, 15, 17, 42, 20,
- 21, 8, 31, 19, 22, 40, 35, 6, 10, 9,
- 14, 24, 37, 11, 41, 0, 32, 11, 36, 0,
- 7, 0, 12, 39, 16, 12, 34, 18, 43, 38,
- 33
-};
+#define YYTABLE_NINF -1
-/* YYDEFGOTO[NTERM-NUM]. */
-static const yytype_int8 yydefgoto[] =
-{
- -1, 2, 3, 41, 30, 43, 4, 5, 19, 25,
- 20, 26, 21, 22, 23, 37, 38, 39, 33, 34,
- 35, 24, 27
-};
+#define yytable_value_is_error(Yytable_value) \
+ 0
-/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
- STATE-NUM. */
-#define YYPACT_NINF -26
+ /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
+ STATE-NUM. */
static const yytype_int8 yypact[] =
{
2, -26, 10, 2, -26, 5, -26, -26, 0, -26,
@@ -646,7 +585,20 @@ static const yytype_int8 yypact[] =
-26
};
-/* YYPGOTO[NTERM-NUM]. */
+ /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
+ Performed when YYTABLE does not specify something else to do. Zero
+ means the default is an error. */
+static const yytype_uint8 yydefact[] =
+{
+ 2, 13, 0, 3, 4, 0, 1, 5, 0, 25,
+ 26, 28, 27, 29, 30, 23, 15, 17, 42, 20,
+ 21, 8, 31, 19, 22, 40, 35, 6, 10, 9,
+ 14, 24, 37, 11, 41, 0, 32, 11, 36, 0,
+ 7, 0, 12, 39, 16, 12, 34, 18, 43, 38,
+ 33
+};
+
+ /* YYPGOTO[NTERM-NUM]. */
static const yytype_int8 yypgoto[] =
{
-26, -26, 6, -26, -26, -2, -3, -26, -26, -26,
@@ -654,10 +606,17 @@ static const yytype_int8 yypgoto[] =
-26, -26, -26
};
-/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
- positive, shift that token. If negative, reduce the rule which
- number is the opposite. If YYTABLE_NINF, syntax error. */
-#define YYTABLE_NINF -1
+ /* YYDEFGOTO[NTERM-NUM]. */
+static const yytype_int8 yydefgoto[] =
+{
+ -1, 2, 3, 41, 30, 43, 4, 5, 19, 25,
+ 20, 26, 21, 22, 23, 37, 38, 39, 33, 34,
+ 35, 24, 27
+};
+
+ /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
+ positive, shift that token. If negative, reduce the rule whose
+ number is the opposite. If YYTABLE_NINF, syntax error. */
static const yytype_uint8 yytable[] =
{
7, 36, 32, 9, 10, 11, 12, 13, 14, 15,
@@ -666,12 +625,6 @@ static const yytype_uint8 yytable[] =
45, 48, 47, 40, 0, 46, 0, 7
};
-#define yypact_value_is_default(Yystate) \
- (!!((Yystate) == (-26)))
-
-#define yytable_value_is_error(Yytable_value) \
- YYID (0)
-
static const yytype_int8 yycheck[] =
{
3, 26, 25, 3, 4, 5, 6, 7, 8, 9,
@@ -680,8 +633,8 @@ static const yytype_int8 yycheck[] =
17, 19, 16, 27, -1, 37, -1, 40
};
-/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
- symbol of state STATE-NUM. */
+ /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
+ symbol of state STATE-NUM. */
static const yytype_uint8 yystos[] =
{
0, 10, 24, 25, 29, 30, 0, 29, 11, 3,
@@ -692,30 +645,36 @@ static const yytype_uint8 yystos[] =
35
};
-#define yyerrok (yyerrstatus = 0)
-#define yyclearin (yychar = YYEMPTY)
-#define YYEMPTY (-2)
-#define YYEOF 0
-
-#define YYACCEPT goto yyacceptlab
-#define YYABORT goto yyabortlab
-#define YYERROR goto yyerrorlab
-
-
-/* Like YYERROR except do call yyerror. This remains here temporarily
- to ease the transition to the new meaning of YYERROR, for GCC.
- Once GCC version 2 has supplanted version 1, this can go. However,
- YYFAIL appears to be in use. Nevertheless, it is formally deprecated
- in Bison 2.4.2's NEWS entry, where a plan to phase it out is
- discussed. */
-
-#define YYFAIL goto yyerrlab
-#if defined YYFAIL
- /* This is here to suppress warnings from the GCC cpp's
- -Wunused-macros. Normally we don't worry about that warning, but
- some users do, and we want to make it easy for users to remove
- YYFAIL uses, which will produce warnings from Bison 2.5. */
-#endif
+ /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
+static const yytype_uint8 yyr1[] =
+{
+ 0, 23, 24, 24, 25, 25, 26, 26, 27, 27,
+ 27, 28, 28, 30, 29, 32, 31, 34, 33, 35,
+ 35, 35, 35, 36, 36, 37, 37, 37, 37, 37,
+ 37, 37, 38, 38, 39, 40, 40, 41, 41, 42,
+ 43, 43, 45, 44
+};
+
+ /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */
+static const yytype_uint8 yyr2[] =
+{
+ 0, 2, 0, 1, 1, 2, 0, 1, 0, 1,
+ 1, 0, 1, 0, 5, 0, 4, 0, 4, 1,
+ 1, 1, 1, 1, 2, 1, 1, 1, 1, 1,
+ 1, 1, 1, 3, 2, 0, 1, 1, 3, 2,
+ 0, 1, 0, 4
+};
+
+
+#define yyerrok (yyerrstatus = 0)
+#define yyclearin (yychar = YYEMPTY)
+#define YYEMPTY (-2)
+#define YYEOF 0
+
+#define YYACCEPT goto yyacceptlab
+#define YYABORT goto yyabortlab
+#define YYERROR goto yyerrorlab
+
#define YYRECOVERING() (!!yyerrstatus)
@@ -732,27 +691,15 @@ do \
else \
{ \
yyerror (scanner, ctx, scan_ctx, YY_("syntax error: cannot back up")); \
- YYERROR; \
- } \
-while (YYID (0))
+ YYERROR; \
+ } \
+while (0)
/* Error token number */
-#define YYTERROR 1
-#define YYERRCODE 256
-
-
-/* This macro is provided for backward compatibility. */
-#ifndef YY_LOCATION_PRINT
-# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
-#endif
+#define YYTERROR 1
+#define YYERRCODE 256
-/* YYLEX -- calling `yylex' with the right arguments. */
-#ifdef YYLEX_PARAM
-# define YYLEX yylex (&yylval, YYLEX_PARAM)
-#else
-# define YYLEX yylex (&yylval, scanner)
-#endif
/* Enable debugging if requested. */
#if YYDEBUG
@@ -762,56 +709,47 @@ while (YYID (0))
# define YYFPRINTF fprintf
# endif
-# define YYDPRINTF(Args) \
-do { \
- if (yydebug) \
- YYFPRINTF Args; \
-} while (YYID (0))
+# define YYDPRINTF(Args) \
+do { \
+ if (yydebug) \
+ YYFPRINTF Args; \
+} while (0)
-# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
-do { \
- if (yydebug) \
- { \
- YYFPRINTF (stderr, "%s ", Title); \
- yy_symbol_print (stderr, \
- Type, Value, scanner, ctx, scan_ctx); \
- YYFPRINTF (stderr, "\n"); \
- } \
-} while (YYID (0))
+/* This macro is provided for backward compatibility. */
+#ifndef YY_LOCATION_PRINT
+# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
+#endif
-/*--------------------------------.
-| Print this symbol on YYOUTPUT. |
-`--------------------------------*/
+# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
+do { \
+ if (yydebug) \
+ { \
+ YYFPRINTF (stderr, "%s ", Title); \
+ yy_symbol_print (stderr, \
+ Type, Value, scanner, ctx, scan_ctx); \
+ YYFPRINTF (stderr, "\n"); \
+ } \
+} while (0)
+
+
+/*----------------------------------------.
+| Print this symbol's value on YYOUTPUT. |
+`----------------------------------------*/
-/*ARGSUSED*/
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
static void
yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, void *scanner, struct parse_context *ctx, struct scan_context *scan_ctx)
-#else
-static void
-yy_symbol_value_print (yyoutput, yytype, yyvaluep, scanner, ctx, scan_ctx)
- FILE *yyoutput;
- int yytype;
- YYSTYPE const * const yyvaluep;
- void *scanner;
- struct parse_context *ctx;
- struct scan_context *scan_ctx;
-#endif
{
FILE *yyo = yyoutput;
YYUSE (yyo);
- if (!yyvaluep)
- return;
YYUSE (scanner);
YYUSE (ctx);
YYUSE (scan_ctx);
+ if (!yyvaluep)
+ return;
# ifdef YYPRINT
if (yytype < YYNTOKENS)
YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
-# else
- YYUSE (yyoutput);
# endif
YYUSE (yytype);
}
@@ -821,25 +759,11 @@ yy_symbol_value_print (yyoutput, yytype, yyvaluep, scanner, ctx, scan_ctx)
| Print this symbol on YYOUTPUT. |
`--------------------------------*/
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
static void
yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, void *scanner, struct parse_context *ctx, struct scan_context *scan_ctx)
-#else
-static void
-yy_symbol_print (yyoutput, yytype, yyvaluep, scanner, ctx, scan_ctx)
- FILE *yyoutput;
- int yytype;
- YYSTYPE const * const yyvaluep;
- void *scanner;
- struct parse_context *ctx;
- struct scan_context *scan_ctx;
-#endif
{
- if (yytype < YYNTOKENS)
- YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
- else
- YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
+ YYFPRINTF (yyoutput, "%s %s (",
+ yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]);
yy_symbol_value_print (yyoutput, yytype, yyvaluep, scanner, ctx, scan_ctx);
YYFPRINTF (yyoutput, ")");
@@ -850,16 +774,8 @@ yy_symbol_print (yyoutput, yytype, yyvaluep, scanner, ctx, scan_ctx)
| TOP (included). |
`------------------------------------------------------------------*/
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
static void
yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
-#else
-static void
-yy_stack_print (yybottom, yytop)
- yytype_int16 *yybottom;
- yytype_int16 *yytop;
-#endif
{
YYFPRINTF (stderr, "Stack now");
for (; yybottom <= yytop; yybottom++)
@@ -870,52 +786,42 @@ yy_stack_print (yybottom, yytop)
YYFPRINTF (stderr, "\n");
}
-# define YY_STACK_PRINT(Bottom, Top) \
-do { \
- if (yydebug) \
- yy_stack_print ((Bottom), (Top)); \
-} while (YYID (0))
+# define YY_STACK_PRINT(Bottom, Top) \
+do { \
+ if (yydebug) \
+ yy_stack_print ((Bottom), (Top)); \
+} while (0)
/*------------------------------------------------.
| Report that the YYRULE is going to be reduced. |
`------------------------------------------------*/
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-static void
-yy_reduce_print (YYSTYPE *yyvsp, int yyrule, void *scanner, struct parse_context *ctx, struct scan_context *scan_ctx)
-#else
static void
-yy_reduce_print (yyvsp, yyrule, scanner, ctx, scan_ctx)
- YYSTYPE *yyvsp;
- int yyrule;
- void *scanner;
- struct parse_context *ctx;
- struct scan_context *scan_ctx;
-#endif
+yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, int yyrule, void *scanner, struct parse_context *ctx, struct scan_context *scan_ctx)
{
+ unsigned long int yylno = yyrline[yyrule];
int yynrhs = yyr2[yyrule];
int yyi;
- unsigned long int yylno = yyrline[yyrule];
YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
- yyrule - 1, yylno);
+ yyrule - 1, yylno);
/* The symbols being reduced. */
for (yyi = 0; yyi < yynrhs; yyi++)
{
YYFPRINTF (stderr, " $%d = ", yyi + 1);
- yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
- &(yyvsp[(yyi + 1) - (yynrhs)])
- , scanner, ctx, scan_ctx);
+ yy_symbol_print (stderr,
+ yystos[yyssp[yyi + 1 - yynrhs]],
+ &(yyvsp[(yyi + 1) - (yynrhs)])
+ , scanner, ctx, scan_ctx);
YYFPRINTF (stderr, "\n");
}
}
-# define YY_REDUCE_PRINT(Rule) \
-do { \
- if (yydebug) \
- yy_reduce_print (yyvsp, Rule, scanner, ctx, scan_ctx); \
-} while (YYID (0))
+# define YY_REDUCE_PRINT(Rule) \
+do { \
+ if (yydebug) \
+ yy_reduce_print (yyssp, yyvsp, Rule, scanner, ctx, scan_ctx); \
+} while (0)
/* Nonzero means print parse trace. It is left uninitialized so that
multiple parsers can coexist. */
@@ -929,7 +835,7 @@ int yydebug;
/* YYINITDEPTH -- initial size of the parser's stacks. */
-#ifndef YYINITDEPTH
+#ifndef YYINITDEPTH
# define YYINITDEPTH 200
#endif
@@ -952,15 +858,8 @@ int yydebug;
# define yystrlen strlen
# else
/* Return the length of YYSTR. */
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
static YYSIZE_T
yystrlen (const char *yystr)
-#else
-static YYSIZE_T
-yystrlen (yystr)
- const char *yystr;
-#endif
{
YYSIZE_T yylen;
for (yylen = 0; yystr[yylen]; yylen++)
@@ -976,16 +875,8 @@ yystrlen (yystr)
# else
/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
YYDEST. */
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
static char *
yystpcpy (char *yydest, const char *yysrc)
-#else
-static char *
-yystpcpy (yydest, yysrc)
- char *yydest;
- const char *yysrc;
-#endif
{
char *yyd = yydest;
const char *yys = yysrc;
@@ -1015,27 +906,27 @@ yytnamerr (char *yyres, const char *yystr)
char const *yyp = yystr;
for (;;)
- switch (*++yyp)
- {
- case '\'':
- case ',':
- goto do_not_strip_quotes;
-
- case '\\':
- if (*++yyp != '\\')
- goto do_not_strip_quotes;
- /* Fall through. */
- default:
- if (yyres)
- yyres[yyn] = *yyp;
- yyn++;
- break;
-
- case '"':
- if (yyres)
- yyres[yyn] = '\0';
- return yyn;
- }
+ switch (*++yyp)
+ {
+ case '\'':
+ case ',':
+ goto do_not_strip_quotes;
+
+ case '\\':
+ if (*++yyp != '\\')
+ goto do_not_strip_quotes;
+ /* Fall through. */
+ default:
+ if (yyres)
+ yyres[yyn] = *yyp;
+ yyn++;
+ break;
+
+ case '"':
+ if (yyres)
+ yyres[yyn] = '\0';
+ return yyn;
+ }
do_not_strip_quotes: ;
}
@@ -1058,11 +949,11 @@ static int
yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
yytype_int16 *yyssp, int yytoken)
{
- YYSIZE_T yysize0 = yytnamerr (YY_NULL, yytname[yytoken]);
+ YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]);
YYSIZE_T yysize = yysize0;
enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
/* Internationalized format string. */
- const char *yyformat = YY_NULL;
+ const char *yyformat = YY_NULLPTR;
/* Arguments of yyformat. */
char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
/* Number of reported tokens (one for the "unexpected", one per
@@ -1070,10 +961,6 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
int yycount = 0;
/* There are many possibilities here to consider:
- - Assume YYFAIL is not used. It's too flawed to consider. See
- <http://lists.gnu.org/archive/html/bison-patches/2009-12/msg00024.html>
- for details. YYERROR is fine as it does not invoke this
- function.
- If this state is a consistent state with a default action, then
the only way this function was invoked is if the default action
is an error action. In that case, don't check for expected
@@ -1123,7 +1010,7 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
}
yyarg[yycount++] = yytname[yyx];
{
- YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULL, yytname[yyx]);
+ YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]);
if (! (yysize <= yysize1
&& yysize1 <= YYSTACK_ALLOC_MAXIMUM))
return 2;
@@ -1190,30 +1077,18 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
| Release the memory associated to this symbol. |
`-----------------------------------------------*/
-/*ARGSUSED*/
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
static void
yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, void *scanner, struct parse_context *ctx, struct scan_context *scan_ctx)
-#else
-static void
-yydestruct (yymsg, yytype, yyvaluep, scanner, ctx, scan_ctx)
- const char *yymsg;
- int yytype;
- YYSTYPE *yyvaluep;
- void *scanner;
- struct parse_context *ctx;
- struct scan_context *scan_ctx;
-#endif
{
YYUSE (yyvaluep);
YYUSE (scanner);
YYUSE (ctx);
YYUSE (scan_ctx);
+ YY_SYMBOL_PRINT (yymsg != NULL ? yymsg : "Deleting", yytype, yyvaluep, yylocationp);
- YY_SYMBOL_PRINT (yymsg ? yymsg : "Deleting", yytype, yyvaluep, yylocationp);
-
+ YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
YYUSE (yytype);
+ YY_IGNORE_MAYBE_UNINITIALIZED_END
}
@@ -1223,58 +1098,18 @@ yydestruct (yymsg, yytype, yyvaluep, scanner, ctx, scan_ctx)
| yyparse. |
`----------*/
-#ifdef YYPARSE_PARAM
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-int
-yyparse (void *YYPARSE_PARAM)
-#else
-int
-yyparse (YYPARSE_PARAM)
- void *YYPARSE_PARAM;
-#endif
-#else /* ! YYPARSE_PARAM */
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
int
yyparse (void *scanner, struct parse_context *ctx, struct scan_context *scan_ctx)
-#else
-int
-yyparse (scanner, ctx, scan_ctx)
- void *scanner;
- struct parse_context *ctx;
- struct scan_context *scan_ctx;
-#endif
-#endif
{
/* The lookahead symbol. */
int yychar;
-#if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
-/* Suppress an incorrect diagnostic about yylval being uninitialized. */
-# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
- _Pragma ("GCC diagnostic push") \
- _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\
- _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
-# define YY_IGNORE_MAYBE_UNINITIALIZED_END \
- _Pragma ("GCC diagnostic pop")
-#else
+/* The semantic value of the lookahead symbol. */
/* Default value used for initialization, for pacifying older GCCs
or non-GCC compilers. */
-static YYSTYPE yyval_default;
-# define YY_INITIAL_VALUE(Value) = Value
-#endif
-#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
-# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
-# define YY_IGNORE_MAYBE_UNINITIALIZED_END
-#endif
-#ifndef YY_INITIAL_VALUE
-# define YY_INITIAL_VALUE(Value) /* Nothing. */
-#endif
-
-/* The semantic value of the lookahead symbol. */
-YYSTYPE yylval YY_INITIAL_VALUE(yyval_default);
+YY_INITIAL_VALUE (static YYSTYPE yyval_default;)
+YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
/* Number of syntax errors so far. */
int yynerrs;
@@ -1284,8 +1119,8 @@ YYSTYPE yylval YY_INITIAL_VALUE(yyval_default);
int yyerrstatus;
/* The stacks and their tools:
- `yyss': related to states.
- `yyvs': related to semantic values.
+ 'yyss': related to states.
+ 'yyvs': related to semantic values.
Refer to the stacks through separate pointers, to allow yyoverflow
to reallocate them elsewhere. */
@@ -1353,23 +1188,23 @@ YYSTYPE yylval YY_INITIAL_VALUE(yyval_default);
#ifdef yyoverflow
{
- /* Give user a chance to reallocate the stack. Use copies of
- these so that the &'s don't force the real ones into
- memory. */
- YYSTYPE *yyvs1 = yyvs;
- yytype_int16 *yyss1 = yyss;
-
- /* Each stack pointer address is followed by the size of the
- data in use in that stack, in bytes. This used to be a
- conditional around just the two extra args, but that might
- be undefined if yyoverflow is a macro. */
- yyoverflow (YY_("memory exhausted"),
- &yyss1, yysize * sizeof (*yyssp),
- &yyvs1, yysize * sizeof (*yyvsp),
- &yystacksize);
-
- yyss = yyss1;
- yyvs = yyvs1;
+ /* Give user a chance to reallocate the stack. Use copies of
+ these so that the &'s don't force the real ones into
+ memory. */
+ YYSTYPE *yyvs1 = yyvs;
+ yytype_int16 *yyss1 = yyss;
+
+ /* Each stack pointer address is followed by the size of the
+ data in use in that stack, in bytes. This used to be a
+ conditional around just the two extra args, but that might
+ be undefined if yyoverflow is a macro. */
+ yyoverflow (YY_("memory exhausted"),
+ &yyss1, yysize * sizeof (*yyssp),
+ &yyvs1, yysize * sizeof (*yyvsp),
+ &yystacksize);
+
+ yyss = yyss1;
+ yyvs = yyvs1;
}
#else /* no yyoverflow */
# ifndef YYSTACK_RELOCATE
@@ -1377,22 +1212,22 @@ YYSTYPE yylval YY_INITIAL_VALUE(yyval_default);
# else
/* Extend the stack our own way. */
if (YYMAXDEPTH <= yystacksize)
- goto yyexhaustedlab;
+ goto yyexhaustedlab;
yystacksize *= 2;
if (YYMAXDEPTH < yystacksize)
- yystacksize = YYMAXDEPTH;
+ yystacksize = YYMAXDEPTH;
{
- yytype_int16 *yyss1 = yyss;
- union yyalloc *yyptr =
- (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
- if (! yyptr)
- goto yyexhaustedlab;
- YYSTACK_RELOCATE (yyss_alloc, yyss);
- YYSTACK_RELOCATE (yyvs_alloc, yyvs);
+ yytype_int16 *yyss1 = yyss;
+ union yyalloc *yyptr =
+ (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
+ if (! yyptr)
+ goto yyexhaustedlab;
+ YYSTACK_RELOCATE (yyss_alloc, yyss);
+ YYSTACK_RELOCATE (yyvs_alloc, yyvs);
# undef YYSTACK_RELOCATE
- if (yyss1 != yyssa)
- YYSTACK_FREE (yyss1);
+ if (yyss1 != yyssa)
+ YYSTACK_FREE (yyss1);
}
# endif
#endif /* no yyoverflow */
@@ -1401,10 +1236,10 @@ YYSTYPE yylval YY_INITIAL_VALUE(yyval_default);
yyvsp = yyvs + yysize - 1;
YYDPRINTF ((stderr, "Stack size increased to %lu\n",
- (unsigned long int) yystacksize));
+ (unsigned long int) yystacksize));
if (yyss + yystacksize - 1 <= yyssp)
- YYABORT;
+ YYABORT;
}
YYDPRINTF ((stderr, "Entering state %d\n", yystate));
@@ -1433,7 +1268,7 @@ yybackup:
if (yychar == YYEMPTY)
{
YYDPRINTF ((stderr, "Reading a token: "));
- yychar = YYLEX;
+ yychar = yylex (&yylval, scanner);
}
if (yychar <= YYEOF)
@@ -1498,7 +1333,7 @@ yyreduce:
yylen = yyr2[yyn];
/* If YYLEN is nonzero, implement the default value of the action:
- `$$ = $1'.
+ '$$ = $1'.
Otherwise, the following line sets YYVAL to garbage.
This behavior is undocumented and Bison
@@ -1512,10 +1347,9 @@ yyreduce:
switch (yyn)
{
case 13:
-/* Line 1802 of yacc.c */
-#line 129 "grammar.y"
+#line 129 "grammar.y" /* yacc.c:1661 */
{
- ctx->setting = config_setting_add(ctx->parent, (yyvsp[(1) - (1)].sval), CONFIG_TYPE_NONE);
+ ctx->setting = config_setting_add(ctx->parent, (yyvsp[0].sval), CONFIG_TYPE_NONE);
if(ctx->setting == NULL)
{
@@ -1527,11 +1361,11 @@ yyreduce:
CAPTURE_PARSE_POS(ctx->setting);
}
}
+#line 1367 "grammar.c" /* yacc.c:1661 */
break;
case 15:
-/* Line 1802 of yacc.c */
-#line 148 "grammar.y"
+#line 148 "grammar.y" /* yacc.c:1661 */
{
if(IN_LIST())
{
@@ -1545,20 +1379,20 @@ yyreduce:
ctx->setting = NULL;
}
}
+#line 1385 "grammar.c" /* yacc.c:1661 */
break;
case 16:
-/* Line 1802 of yacc.c */
-#line 163 "grammar.y"
+#line 163 "grammar.y" /* yacc.c:1661 */
{
if(ctx->parent)
ctx->parent = ctx->parent->parent;
}
+#line 1394 "grammar.c" /* yacc.c:1661 */
break;
case 17:
-/* Line 1802 of yacc.c */
-#line 171 "grammar.y"
+#line 171 "grammar.y" /* yacc.c:1661 */
{
if(IN_LIST())
{
@@ -1572,37 +1406,37 @@ yyreduce:
ctx->setting = NULL;
}
}
+#line 1412 "grammar.c" /* yacc.c:1661 */
break;
case 18:
-/* Line 1802 of yacc.c */
-#line 186 "grammar.y"
+#line 186 "grammar.y" /* yacc.c:1661 */
{
if(ctx->parent)
ctx->parent = ctx->parent->parent;
}
+#line 1421 "grammar.c" /* yacc.c:1661 */
break;
case 23:
-/* Line 1802 of yacc.c */
-#line 200 "grammar.y"
- { parsectx_append_string(ctx, (yyvsp[(1) - (1)].sval)); free((yyvsp[(1) - (1)].sval)); }
+#line 200 "grammar.y" /* yacc.c:1661 */
+ { parsectx_append_string(ctx, (yyvsp[0].sval)); free((yyvsp[0].sval)); }
+#line 1427 "grammar.c" /* yacc.c:1661 */
break;
case 24:
-/* Line 1802 of yacc.c */
-#line 201 "grammar.y"
- { parsectx_append_string(ctx, (yyvsp[(2) - (2)].sval)); free((yyvsp[(2) - (2)].sval)); }
+#line 201 "grammar.y" /* yacc.c:1661 */
+ { parsectx_append_string(ctx, (yyvsp[0].sval)); free((yyvsp[0].sval)); }
+#line 1433 "grammar.c" /* yacc.c:1661 */
break;
case 25:
-/* Line 1802 of yacc.c */
-#line 206 "grammar.y"
+#line 206 "grammar.y" /* yacc.c:1661 */
{
if(IN_ARRAY() || IN_LIST())
{
struct config_setting_t *e = config_setting_set_bool_elem(ctx->parent, -1,
- (int)(yyvsp[(1) - (1)].ival));
+ (int)(yyvsp[0].ival));
if(! e)
{
@@ -1615,17 +1449,17 @@ yyreduce:
}
}
else
- config_setting_set_bool(ctx->setting, (int)(yyvsp[(1) - (1)].ival));
+ config_setting_set_bool(ctx->setting, (int)(yyvsp[0].ival));
}
+#line 1457 "grammar.c" /* yacc.c:1661 */
break;
case 26:
-/* Line 1802 of yacc.c */
-#line 226 "grammar.y"
+#line 226 "grammar.y" /* yacc.c:1661 */
{
if(IN_ARRAY() || IN_LIST())
{
- struct 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[0].ival));
if(! e)
{
libconfig_yyerror(scanner, ctx, scan_ctx, err_array_elem_type);
@@ -1639,19 +1473,19 @@ yyreduce:
}
else
{
- config_setting_set_int(ctx->setting, (yyvsp[(1) - (1)].ival));
+ config_setting_set_int(ctx->setting, (yyvsp[0].ival));
config_setting_set_format(ctx->setting, CONFIG_FORMAT_DEFAULT);
}
}
+#line 1483 "grammar.c" /* yacc.c:1661 */
break;
case 27:
-/* Line 1802 of yacc.c */
-#line 248 "grammar.y"
+#line 248 "grammar.y" /* yacc.c:1661 */
{
if(IN_ARRAY() || IN_LIST())
{
- struct 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[0].llval));
if(! e)
{
libconfig_yyerror(scanner, ctx, scan_ctx, err_array_elem_type);
@@ -1665,19 +1499,19 @@ yyreduce:
}
else
{
- config_setting_set_int64(ctx->setting, (yyvsp[(1) - (1)].llval));
+ config_setting_set_int64(ctx->setting, (yyvsp[0].llval));
config_setting_set_format(ctx->setting, CONFIG_FORMAT_DEFAULT);
}
}
+#line 1509 "grammar.c" /* yacc.c:1661 */
break;
case 28:
-/* Line 1802 of yacc.c */
-#line 270 "grammar.y"
+#line 270 "grammar.y" /* yacc.c:1661 */
{
if(IN_ARRAY() || IN_LIST())
{
- struct 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[0].ival));
if(! e)
{
libconfig_yyerror(scanner, ctx, scan_ctx, err_array_elem_type);
@@ -1691,19 +1525,19 @@ yyreduce:
}
else
{
- config_setting_set_int(ctx->setting, (yyvsp[(1) - (1)].ival));
+ config_setting_set_int(ctx->setting, (yyvsp[0].ival));
config_setting_set_format(ctx->setting, CONFIG_FORMAT_HEX);
}
}
+#line 1535 "grammar.c" /* yacc.c:1661 */
break;
case 29:
-/* Line 1802 of yacc.c */
-#line 292 "grammar.y"
+#line 292 "grammar.y" /* yacc.c:1661 */
{
if(IN_ARRAY() || IN_LIST())
{
- struct 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[0].llval));
if(! e)
{
libconfig_yyerror(scanner, ctx, scan_ctx, err_array_elem_type);
@@ -1717,19 +1551,19 @@ yyreduce:
}
else
{
- config_setting_set_int64(ctx->setting, (yyvsp[(1) - (1)].llval));
+ config_setting_set_int64(ctx->setting, (yyvsp[0].llval));
config_setting_set_format(ctx->setting, CONFIG_FORMAT_HEX);
}
}
+#line 1561 "grammar.c" /* yacc.c:1661 */
break;
case 30:
-/* Line 1802 of yacc.c */
-#line 314 "grammar.y"
+#line 314 "grammar.y" /* yacc.c:1661 */
{
if(IN_ARRAY() || IN_LIST())
{
- struct 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[0].fval));
if(! e)
{
libconfig_yyerror(scanner, ctx, scan_ctx, err_array_elem_type);
@@ -1741,13 +1575,13 @@ yyreduce:
}
}
else
- config_setting_set_float(ctx->setting, (yyvsp[(1) - (1)].fval));
+ config_setting_set_float(ctx->setting, (yyvsp[0].fval));
}
+#line 1583 "grammar.c" /* yacc.c:1661 */
break;
case 31:
-/* Line 1802 of yacc.c */
-#line 332 "grammar.y"
+#line 332 "grammar.y" /* yacc.c:1661 */
{
if(IN_ARRAY() || IN_LIST())
{
@@ -1772,11 +1606,11 @@ yyreduce:
_delete(s);
}
}
+#line 1612 "grammar.c" /* yacc.c:1661 */
break;
case 42:
-/* Line 1802 of yacc.c */
-#line 388 "grammar.y"
+#line 388 "grammar.y" /* yacc.c:1661 */
{
if(IN_LIST())
{
@@ -1790,20 +1624,20 @@ yyreduce:
ctx->setting = NULL;
}
}
+#line 1630 "grammar.c" /* yacc.c:1661 */
break;
case 43:
-/* Line 1802 of yacc.c */
-#line 403 "grammar.y"
+#line 403 "grammar.y" /* yacc.c:1661 */
{
if(ctx->parent)
ctx->parent = ctx->parent->parent;
}
+#line 1639 "grammar.c" /* yacc.c:1661 */
break;
-/* Line 1802 of yacc.c */
-#line 1809 "grammar.c"
+#line 1643 "grammar.c" /* yacc.c:1661 */
default: break;
}
/* User semantic actions sometimes alter yychar, and that requires
@@ -1825,7 +1659,7 @@ yyreduce:
*++yyvsp = yyval;
- /* Now `shift' the result of the reduction. Determine what state
+ /* Now 'shift' the result of the reduction. Determine what state
that goes to, based on the state we popped back to and the rule
number reduced by. */
@@ -1840,9 +1674,9 @@ yyreduce:
goto yynewstate;
-/*------------------------------------.
-| yyerrlab -- here on detecting error |
-`------------------------------------*/
+/*--------------------------------------.
+| yyerrlab -- here on detecting error. |
+`--------------------------------------*/
yyerrlab:
/* Make sure we have latest lookahead translation. See comments at
user semantic actions for why this is necessary. */
@@ -1893,20 +1727,20 @@ yyerrlab:
if (yyerrstatus == 3)
{
/* If just tried and failed to reuse lookahead token after an
- error, discard it. */
+ error, discard it. */
if (yychar <= YYEOF)
- {
- /* Return failure if at end of input. */
- if (yychar == YYEOF)
- YYABORT;
- }
+ {
+ /* Return failure if at end of input. */
+ if (yychar == YYEOF)
+ YYABORT;
+ }
else
- {
- yydestruct ("Error: discarding",
- yytoken, &yylval, scanner, ctx, scan_ctx);
- yychar = YYEMPTY;
- }
+ {
+ yydestruct ("Error: discarding",
+ yytoken, &yylval, scanner, ctx, scan_ctx);
+ yychar = YYEMPTY;
+ }
}
/* Else will try to reuse lookahead token after shifting the error
@@ -1925,7 +1759,7 @@ yyerrorlab:
if (/*CONSTCOND*/ 0)
goto yyerrorlab;
- /* Do not reclaim the symbols of the rule which action triggered
+ /* Do not reclaim the symbols of the rule whose action triggered
this YYERROR. */
YYPOPSTACK (yylen);
yylen = 0;
@@ -1938,29 +1772,29 @@ yyerrorlab:
| yyerrlab1 -- common code for both syntax error and YYERROR. |
`-------------------------------------------------------------*/
yyerrlab1:
- yyerrstatus = 3; /* Each real token shifted decrements this. */
+ yyerrstatus = 3; /* Each real token shifted decrements this. */
for (;;)
{
yyn = yypact[yystate];
if (!yypact_value_is_default (yyn))
- {
- yyn += YYTERROR;
- if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
- {
- yyn = yytable[yyn];
- if (0 < yyn)
- break;
- }
- }
+ {
+ yyn += YYTERROR;
+ if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
+ {
+ yyn = yytable[yyn];
+ if (0 < yyn)
+ break;
+ }
+ }
/* Pop the current state because it cannot handle the error token. */
if (yyssp == yyss)
- YYABORT;
+ YYABORT;
yydestruct ("Error: popping",
- yystos[yystate], yyvsp, scanner, ctx, scan_ctx);
+ yystos[yystate], yyvsp, scanner, ctx, scan_ctx);
YYPOPSTACK (1);
yystate = *yyssp;
YY_STACK_PRINT (yyss, yyssp);
@@ -2011,14 +1845,14 @@ yyreturn:
yydestruct ("Cleanup: discarding lookahead",
yytoken, &yylval, scanner, ctx, scan_ctx);
}
- /* Do not reclaim the symbols of the rule which action triggered
+ /* Do not reclaim the symbols of the rule whose action triggered
this YYABORT or YYACCEPT. */
YYPOPSTACK (yylen);
YY_STACK_PRINT (yyss, yyssp);
while (yyssp != yyss)
{
yydestruct ("Cleanup: popping",
- yystos[*yyssp], yyvsp, scanner, ctx, scan_ctx);
+ yystos[*yyssp], yyvsp, scanner, ctx, scan_ctx);
YYPOPSTACK (1);
}
#ifndef yyoverflow
@@ -2029,11 +1863,7 @@ yyreturn:
if (yymsg != yymsgbuf)
YYSTACK_FREE (yymsg);
#endif
- /* Make sure YYID is used. */
- return YYID (yyresult);
+ return yyresult;
}
-
-
-/* Line 2050 of yacc.c */
-#line 409 "grammar.y"
+#line 409 "grammar.y" /* yacc.c:1906 */
diff --git a/3rdparty/libconfig/grammar.h b/3rdparty/libconfig/grammar.h
index 86b7b65cd..09e7ae0b4 100644
--- a/3rdparty/libconfig/grammar.h
+++ b/3rdparty/libconfig/grammar.h
@@ -1,19 +1,19 @@
-/* A Bison parser, made by GNU Bison 2.7.12-4996. */
+/* A Bison parser, made by GNU Bison 3.0.4. */
/* Bison interface for Yacc-like parsers in C
-
- Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc.
-
+
+ Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc.
+
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
-
+
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
@@ -26,13 +26,13 @@
special exception, which will cause the skeleton and the resulting
Bison output files to be licensed under the GNU General Public
License without this special exception.
-
+
This special exception was added by the Free Software Foundation in
version 2.2 of Bison. */
#ifndef YY_LIBCONFIG_YY_GRAMMAR_H_INCLUDED
# define YY_LIBCONFIG_YY_GRAMMAR_H_INCLUDED
-/* Enabling traces. */
+/* Debug traces. */
#ifndef YYDEBUG
# define YYDEBUG 0
#endif
@@ -40,33 +40,32 @@
extern int libconfig_yydebug;
#endif
-/* Tokens. */
+/* Token type. */
#ifndef YYTOKENTYPE
# define YYTOKENTYPE
- /* Put the tokens into the symbol table, so that GDB and other debuggers
- know about them. */
- enum yytokentype {
- TOK_BOOLEAN = 258,
- TOK_INTEGER = 259,
- TOK_HEX = 260,
- TOK_INTEGER64 = 261,
- TOK_HEX64 = 262,
- TOK_FLOAT = 263,
- TOK_STRING = 264,
- TOK_NAME = 265,
- TOK_EQUALS = 266,
- TOK_NEWLINE = 267,
- TOK_ARRAY_START = 268,
- TOK_ARRAY_END = 269,
- TOK_LIST_START = 270,
- TOK_LIST_END = 271,
- TOK_COMMA = 272,
- TOK_GROUP_START = 273,
- TOK_GROUP_END = 274,
- TOK_SEMICOLON = 275,
- TOK_GARBAGE = 276,
- TOK_ERROR = 277
- };
+ enum yytokentype
+ {
+ TOK_BOOLEAN = 258,
+ TOK_INTEGER = 259,
+ TOK_HEX = 260,
+ TOK_INTEGER64 = 261,
+ TOK_HEX64 = 262,
+ TOK_FLOAT = 263,
+ TOK_STRING = 264,
+ TOK_NAME = 265,
+ TOK_EQUALS = 266,
+ TOK_NEWLINE = 267,
+ TOK_ARRAY_START = 268,
+ TOK_ARRAY_END = 269,
+ TOK_LIST_START = 270,
+ TOK_LIST_END = 271,
+ TOK_COMMA = 272,
+ TOK_GROUP_START = 273,
+ TOK_GROUP_END = 274,
+ TOK_SEMICOLON = 275,
+ TOK_GARBAGE = 276,
+ TOK_ERROR = 277
+ };
#endif
/* Tokens. */
#define TOK_BOOLEAN 258
@@ -90,41 +89,28 @@ extern int libconfig_yydebug;
#define TOK_GARBAGE 276
#define TOK_ERROR 277
-
-
+/* Value type. */
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
-typedef union YYSTYPE
+
+union YYSTYPE
{
-/* Line 2060 of yacc.c */
-#line 86 "grammar.y"
+#line 86 "grammar.y" /* yacc.c:1915 */
int ival;
long long llval;
double fval;
char *sval;
+#line 105 "grammar.h" /* yacc.c:1915 */
+};
-/* Line 2060 of yacc.c */
-#line 109 "grammar.h"
-} YYSTYPE;
+typedef union YYSTYPE YYSTYPE;
# define YYSTYPE_IS_TRIVIAL 1
-# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1
#endif
-#ifdef YYPARSE_PARAM
-#if defined __STDC__ || defined __cplusplus
-int libconfig_yyparse (void *YYPARSE_PARAM);
-#else
-int libconfig_yyparse ();
-#endif
-#else /* ! YYPARSE_PARAM */
-#if defined __STDC__ || defined __cplusplus
+
int libconfig_yyparse (void *scanner, struct parse_context *ctx, struct scan_context *scan_ctx);
-#else
-int libconfig_yyparse ();
-#endif
-#endif /* ! YYPARSE_PARAM */
#endif /* !YY_LIBCONFIG_YY_GRAMMAR_H_INCLUDED */
diff --git a/3rdparty/libconfig/scanner.c b/3rdparty/libconfig/scanner.c
index abe173830..cfdd02ccf 100644
--- a/3rdparty/libconfig/scanner.c
+++ b/3rdparty/libconfig/scanner.c
@@ -1,6 +1,6 @@
-#line 2 "scanner.c"
+#line 1 "scanner.c"
-#line 4 "scanner.c"
+#line 3 "scanner.c"
#define YY_INT_ALIGNED short int
@@ -9,7 +9,7 @@
#define FLEX_SCANNER
#define YY_FLEX_MAJOR_VERSION 2
#define YY_FLEX_MINOR_VERSION 6
-#define YY_FLEX_SUBMINOR_VERSION 0
+#define YY_FLEX_SUBMINOR_VERSION 2
#if YY_FLEX_SUBMINOR_VERSION > 0
#define FLEX_BETA
#endif
@@ -21,6 +21,7 @@
#include <string.h>
#include <errno.h>
#include <stdlib.h>
+#include <assert.h>
/* end standard C headers. */
@@ -88,36 +89,22 @@ typedef unsigned int flex_uint32_t;
#endif /* ! FLEXINT_H */
-#ifdef __cplusplus
-
-/* The "const" storage-class-modifier is valid. */
-#define YY_USE_CONST
-
-#else /* ! __cplusplus */
-
-/* C99 requires __STDC__ to be defined as 1. */
-#if defined (__STDC__)
-
-#define YY_USE_CONST
-
-#endif /* defined (__STDC__) */
-#endif /* ! __cplusplus */
-
-#ifdef YY_USE_CONST
+/* TODO: this is always defined, so inline it */
#define yyconst const
+
+#if defined(__GNUC__) && __GNUC__ >= 3
+#define yynoreturn __attribute__((__noreturn__))
#else
-#define yyconst
+#define yynoreturn
#endif
/* Returned upon end-of-file. */
#define YY_NULL 0
-/* Promotes a possibly negative, possibly signed char to an unsigned
- * integer for use as an array index. If the signed char is negative,
- * we want to instead treat it as an 8-bit unsigned char, hence the
- * double cast.
+/* Promotes a possibly negative, possibly signed char to an
+ * integer in range [0..255] for use as an array index.
*/
-#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
+#define YY_SC_TO_UI(c) ((YY_CHAR) (c))
/* An opaque pointer. */
#ifndef YY_TYPEDEF_YY_SCANNER_T
@@ -141,20 +128,16 @@ typedef void* yyscan_t;
* definition of BEGIN.
*/
#define BEGIN yyg->yy_start = 1 + 2 *
-
/* Translate the current start state into a value that can be later handed
* to BEGIN to return to the state. The YYSTATE alias is for lex
* compatibility.
*/
#define YY_START ((yyg->yy_start - 1) / 2)
#define YYSTATE YY_START
-
/* Action number for EOF rule of a given start state. */
#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
-
/* Special action meaning "start processing a new file". */
#define YY_NEW_FILE libconfig_yyrestart(yyin ,yyscanner )
-
#define YY_END_OF_BUFFER_CHAR 0
/* Size of default input buffer. */
@@ -187,7 +170,7 @@ typedef size_t yy_size_t;
#define EOB_ACT_CONTINUE_SCAN 0
#define EOB_ACT_END_OF_FILE 1
#define EOB_ACT_LAST_MATCH 2
-
+
/* Note: We specifically omit the test for yy_rule_can_match_eol because it requires
* access to the local variable yy_act. Since yyless() is a macro, it would break
* existing scanners that call yyless() from OUTSIDE libconfig_yylex.
@@ -223,7 +206,6 @@ typedef size_t yy_size_t;
YY_DO_BEFORE_ACTION; /* set up yytext again */ \
} \
while ( 0 )
-
#define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner )
#ifndef YY_STRUCT_YY_BUFFER_STATE
@@ -238,12 +220,12 @@ struct yy_buffer_state
/* Size of input buffer in bytes, not including room for EOB
* characters.
*/
- yy_size_t yy_buf_size;
+ int yy_buf_size;
/* Number of characters read into yy_ch_buf, not including EOB
* characters.
*/
- yy_size_t yy_n_chars;
+ int yy_n_chars;
/* Whether we "own" the buffer - i.e., we know we created it,
* and can realloc() it to grow it, and should free() it to
@@ -300,36 +282,33 @@ struct yy_buffer_state
#define YY_CURRENT_BUFFER ( yyg->yy_buffer_stack \
? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] \
: NULL)
-
/* Same as previous macro, but useful when we know that the buffer stack is not
* NULL or when we need an lvalue. For internal use only.
*/
#define YY_CURRENT_BUFFER_LVALUE yyg->yy_buffer_stack[yyg->yy_buffer_stack_top]
-void libconfig_yyrestart (FILE *input_file ,yyscan_t yyscanner );
-void libconfig_yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner );
-YY_BUFFER_STATE libconfig_yy_create_buffer (FILE *file,int size ,yyscan_t yyscanner );
-void libconfig_yy_delete_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner );
-void libconfig_yy_flush_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner );
-void libconfig_yypush_buffer_state (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner );
-void libconfig_yypop_buffer_state (yyscan_t yyscanner );
-
-static void libconfig_yyensure_buffer_stack (yyscan_t yyscanner );
-static void libconfig_yy_load_buffer_state (yyscan_t yyscanner );
-static void libconfig_yy_init_buffer (YY_BUFFER_STATE b,FILE *file ,yyscan_t yyscanner );
-
+void libconfig_yyrestart ( FILE *input_file , yyscan_t yyscanner );
+void libconfig_yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner );
+YY_BUFFER_STATE libconfig_yy_create_buffer ( FILE *file, int size , yyscan_t yyscanner );
+void libconfig_yy_delete_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner );
+void libconfig_yy_flush_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner );
+void libconfig_yypush_buffer_state ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner );
+void libconfig_yypop_buffer_state ( yyscan_t yyscanner );
+
+static void libconfig_yyensure_buffer_stack ( yyscan_t yyscanner );
+static void libconfig_yy_load_buffer_state ( yyscan_t yyscanner );
+static void libconfig_yy_init_buffer ( YY_BUFFER_STATE b, FILE *file , yyscan_t yyscanner );
#define YY_FLUSH_BUFFER libconfig_yy_flush_buffer(YY_CURRENT_BUFFER ,yyscanner)
-YY_BUFFER_STATE libconfig_yy_scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner );
-YY_BUFFER_STATE libconfig_yy_scan_string (yyconst char *yy_str ,yyscan_t yyscanner );
-YY_BUFFER_STATE libconfig_yy_scan_bytes (yyconst char *bytes,yy_size_t len ,yyscan_t yyscanner );
+YY_BUFFER_STATE libconfig_yy_scan_buffer ( char *base, yy_size_t size , yyscan_t yyscanner );
+YY_BUFFER_STATE libconfig_yy_scan_string ( const char *yy_str , yyscan_t yyscanner );
+YY_BUFFER_STATE libconfig_yy_scan_bytes ( const char *bytes, int len , yyscan_t yyscanner );
-void *libconfig_yyalloc (yy_size_t ,yyscan_t yyscanner );
-void *libconfig_yyrealloc (void *,yy_size_t ,yyscan_t yyscanner );
-void libconfig_yyfree (void * ,yyscan_t yyscanner );
+void *libconfig_yyalloc ( yy_size_t , yyscan_t yyscanner );
+void *libconfig_yyrealloc ( void *, yy_size_t , yyscan_t yyscanner );
+void libconfig_yyfree ( void * , yyscan_t yyscanner );
#define yy_new_buffer libconfig_yy_create_buffer
-
#define yy_set_interactive(is_interactive) \
{ \
if ( ! YY_CURRENT_BUFFER ){ \
@@ -339,7 +318,6 @@ void libconfig_yyfree (void * ,yyscan_t yyscanner );
} \
YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
}
-
#define yy_set_bol(at_bol) \
{ \
if ( ! YY_CURRENT_BUFFER ){\
@@ -349,36 +327,30 @@ void libconfig_yyfree (void * ,yyscan_t yyscanner );
} \
YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
}
-
#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
#define libconfig_yywrap(yyscanner) (/*CONSTCOND*/1)
#define YY_SKIP_YYWRAP
-
-typedef unsigned char YY_CHAR;
+typedef flex_uint8_t YY_CHAR;
typedef int yy_state_type;
#define yytext_ptr yytext_r
-static yy_state_type yy_get_previous_state (yyscan_t yyscanner );
-static yy_state_type yy_try_NUL_trans (yy_state_type current_state ,yyscan_t yyscanner);
-static int yy_get_next_buffer (yyscan_t yyscanner );
-#if defined(__GNUC__) && __GNUC__ >= 3
-__attribute__((__noreturn__))
-#endif
-static void yy_fatal_error (yyconst char msg[] ,yyscan_t yyscanner );
+static yy_state_type yy_get_previous_state ( yyscan_t yyscanner );
+static yy_state_type yy_try_NUL_trans ( yy_state_type current_state , yyscan_t yyscanner);
+static int yy_get_next_buffer ( yyscan_t yyscanner );
+static void yynoreturn yy_fatal_error ( const char* msg , yyscan_t yyscanner );
/* Done after the current pattern has been matched and before the
* corresponding action - sets up yytext.
*/
#define YY_DO_BEFORE_ACTION \
yyg->yytext_ptr = yy_bp; \
- yyleng = (size_t) (yy_cp - yy_bp); \
+ yyleng = (int) (yy_cp - yy_bp); \
yyg->yy_hold_char = *yy_cp; \
*yy_cp = '\0'; \
yyg->yy_c_buf_p = yy_cp;
-
#define YY_NUM_RULES 45
#define YY_END_OF_BUFFER 46
/* This struct is not used in this scanner,
@@ -388,7 +360,7 @@ struct yy_trans_info
flex_int32_t yy_verify;
flex_int32_t yy_nxt;
};
-static yyconst flex_int16_t yy_accept[123] =
+static const flex_int16_t yy_accept[123] =
{ 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
46, 44, 25, 24, 24, 5, 44, 40, 41, 37,
@@ -406,7 +378,7 @@ static yyconst flex_int16_t yy_accept[123] =
19, 0
} ;
-static yyconst YY_CHAR yy_ec[256] =
+static const YY_CHAR yy_ec[256] =
{ 0,
1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
1, 4, 5, 1, 1, 1, 1, 1, 1, 1,
@@ -438,7 +410,7 @@ static yyconst YY_CHAR yy_ec[256] =
1, 1, 1, 1, 1
} ;
-static yyconst YY_CHAR yy_meta[51] =
+static const YY_CHAR yy_meta[51] =
{ 0,
1, 1, 1, 1, 1, 2, 1, 3, 1, 1,
3, 1, 1, 3, 3, 1, 4, 4, 1, 1,
@@ -447,7 +419,7 @@ static yyconst YY_CHAR yy_meta[51] =
4, 4, 3, 3, 3, 3, 3, 3, 1, 1
} ;
-static yyconst flex_uint16_t yy_base[134] =
+static const flex_int16_t yy_base[134] =
{ 0,
0, 49, 49, 50, 48, 49, 50, 51, 244, 243,
248, 251, 245, 251, 251, 251, 243, 251, 251, 0,
@@ -466,7 +438,7 @@ static yyconst flex_uint16_t yy_base[134] =
227, 115, 104
} ;
-static yyconst flex_int16_t yy_def[134] =
+static const flex_int16_t yy_def[134] =
{ 0,
122, 1, 123, 123, 124, 124, 125, 125, 126, 126,
122, 122, 122, 122, 122, 122, 127, 122, 122, 128,
@@ -485,7 +457,7 @@ static yyconst flex_int16_t yy_def[134] =
122, 122, 122
} ;
-static yyconst flex_uint16_t yy_nxt[302] =
+static const flex_int16_t yy_nxt[302] =
{ 0,
12, 13, 14, 15, 15, 16, 17, 12, 18, 19,
20, 21, 22, 21, 23, 24, 25, 26, 27, 28,
@@ -523,7 +495,7 @@ static yyconst flex_uint16_t yy_nxt[302] =
122
} ;
-static yyconst flex_int16_t yy_chk[302] =
+static const flex_int16_t yy_chk[302] =
{ 0,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
@@ -562,7 +534,7 @@ static yyconst flex_int16_t yy_chk[302] =
} ;
/* Table of booleans, true if rule could match eol. */
-static yyconst flex_int32_t yy_rule_can_match_eol[46] =
+static const flex_int32_t yy_rule_can_match_eol[46] =
{ 0,
0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0,
1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -651,8 +623,9 @@ static unsigned long long fromhex(const char *s)
#endif /* __MINGW32__ */
}
+#line 625 "scanner.c"
-#line 656 "scanner.c"
+#line 627 "scanner.c"
#define INITIAL 0
#define COMMENT 1
@@ -675,8 +648,8 @@ struct yyguts_t
size_t yy_buffer_stack_max; /**< capacity of stack. */
YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */
char yy_hold_char;
- yy_size_t yy_n_chars;
- yy_size_t yyleng_r;
+ int yy_n_chars;
+ int yyleng_r;
char *yy_c_buf_p;
int yy_init;
int yy_start;
@@ -698,7 +671,7 @@ struct yyguts_t
}; /* end struct yyguts_t */
-static int yy_init_globals (yyscan_t yyscanner );
+static int yy_init_globals ( yyscan_t yyscanner );
/* This must go here because YYSTYPE and YYLTYPE are included
* from bison output in section 1.*/
@@ -706,44 +679,44 @@ static int yy_init_globals (yyscan_t yyscanner );
int libconfig_yylex_init (yyscan_t* scanner);
-int libconfig_yylex_init_extra (YY_EXTRA_TYPE user_defined,yyscan_t* scanner);
+int libconfig_yylex_init_extra ( YY_EXTRA_TYPE user_defined, yyscan_t* scanner);
/* Accessor methods to globals.
These are made visible to non-reentrant scanners for convenience. */
-int libconfig_yylex_destroy (yyscan_t yyscanner );
+int libconfig_yylex_destroy ( yyscan_t yyscanner );
-int libconfig_yyget_debug (yyscan_t yyscanner );
+int libconfig_yyget_debug ( yyscan_t yyscanner );
-void libconfig_yyset_debug (int debug_flag ,yyscan_t yyscanner );
+void libconfig_yyset_debug ( int debug_flag , yyscan_t yyscanner );
-YY_EXTRA_TYPE libconfig_yyget_extra (yyscan_t yyscanner );
+YY_EXTRA_TYPE libconfig_yyget_extra ( yyscan_t yyscanner );
-void libconfig_yyset_extra (YY_EXTRA_TYPE user_defined ,yyscan_t yyscanner );
+void libconfig_yyset_extra ( YY_EXTRA_TYPE user_defined , yyscan_t yyscanner );
-FILE *libconfig_yyget_in (yyscan_t yyscanner );
+FILE *libconfig_yyget_in ( yyscan_t yyscanner );
-void libconfig_yyset_in (FILE * _in_str ,yyscan_t yyscanner );
+void libconfig_yyset_in ( FILE * _in_str , yyscan_t yyscanner );
-FILE *libconfig_yyget_out (yyscan_t yyscanner );
+FILE *libconfig_yyget_out ( yyscan_t yyscanner );
-void libconfig_yyset_out (FILE * _out_str ,yyscan_t yyscanner );
+void libconfig_yyset_out ( FILE * _out_str , yyscan_t yyscanner );
-yy_size_t libconfig_yyget_leng (yyscan_t yyscanner );
+ int libconfig_yyget_leng ( yyscan_t yyscanner );
-char *libconfig_yyget_text (yyscan_t yyscanner );
+char *libconfig_yyget_text ( yyscan_t yyscanner );
-int libconfig_yyget_lineno (yyscan_t yyscanner );
+int libconfig_yyget_lineno ( yyscan_t yyscanner );
-void libconfig_yyset_lineno (int _line_number ,yyscan_t yyscanner );
+void libconfig_yyset_lineno ( int _line_number , yyscan_t yyscanner );
-int libconfig_yyget_column (yyscan_t yyscanner );
+int libconfig_yyget_column ( yyscan_t yyscanner );
-void libconfig_yyset_column (int _column_no ,yyscan_t yyscanner );
+void libconfig_yyset_column ( int _column_no , yyscan_t yyscanner );
-YYSTYPE * libconfig_yyget_lval (yyscan_t yyscanner );
+YYSTYPE * libconfig_yyget_lval ( yyscan_t yyscanner );
-void libconfig_yyset_lval (YYSTYPE * yylval_param ,yyscan_t yyscanner );
+void libconfig_yyset_lval ( YYSTYPE * yylval_param , yyscan_t yyscanner );
/* Macros after this point can all be overridden by user definitions in
* section 1.
@@ -751,9 +724,9 @@ void libconfig_yyset_lval (YYSTYPE * yylval_param ,yyscan_t yyscanner );
#ifndef YY_SKIP_YYWRAP
#ifdef __cplusplus
-extern "C" int libconfig_yywrap (yyscan_t yyscanner );
+extern "C" int libconfig_yywrap ( yyscan_t yyscanner );
#else
-extern int libconfig_yywrap (yyscan_t yyscanner );
+extern int libconfig_yywrap ( yyscan_t yyscanner );
#endif
#endif
@@ -762,19 +735,18 @@ extern int libconfig_yywrap (yyscan_t yyscanner );
#endif
#ifndef yytext_ptr
-static void yy_flex_strncpy (char *,yyconst char *,int ,yyscan_t yyscanner);
+static void yy_flex_strncpy ( char *, const char *, int , yyscan_t yyscanner);
#endif
#ifdef YY_NEED_STRLEN
-static int yy_flex_strlen (yyconst char * ,yyscan_t yyscanner);
+static int yy_flex_strlen ( const char * , yyscan_t yyscanner);
#endif
#ifndef YY_NO_INPUT
-
#ifdef __cplusplus
-static int yyinput (yyscan_t yyscanner );
+static int yyinput ( yyscan_t yyscanner );
#else
-static int input (yyscan_t yyscanner );
+static int input ( yyscan_t yyscanner );
#endif
#endif
@@ -794,7 +766,7 @@ static int input (yyscan_t yyscanner );
/* This used to be an fputs(), but since the string might contain NUL's,
* we now use fwrite().
*/
-#define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0)
+#define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0)
#endif
/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
@@ -805,7 +777,7 @@ static int input (yyscan_t yyscanner );
if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
{ \
int c = '*'; \
- size_t n; \
+ int n; \
for ( n = 0; n < max_size && \
(c = getc( yyin )) != EOF && c != '\n'; ++n ) \
buf[n] = (char) c; \
@@ -818,7 +790,7 @@ static int input (yyscan_t yyscanner );
else \
{ \
errno=0; \
- while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
+ while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \
{ \
if( errno != EINTR) \
{ \
@@ -860,7 +832,7 @@ static int input (yyscan_t yyscanner );
#define YY_DECL_IS_OURS 1
extern int libconfig_yylex \
- (YYSTYPE * yylval_param ,yyscan_t yyscanner);
+ (YYSTYPE * yylval_param , yyscan_t yyscanner);
#define YY_DECL int libconfig_yylex \
(YYSTYPE * yylval_param , yyscan_t yyscanner)
@@ -925,7 +897,7 @@ YY_DECL
#line 103 "scanner.l"
-#line 929 "scanner.c"
+#line 899 "scanner.c"
while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */
{
@@ -954,9 +926,9 @@ yy_match:
{
yy_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 123 )
- yy_c = yy_meta[(unsigned int) yy_c];
+ yy_c = yy_meta[yy_c];
}
- yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
+ yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
++yy_cp;
}
while ( yy_current_state != 122 );
@@ -970,7 +942,7 @@ yy_find_action:
if ( yy_act != YY_END_OF_BUFFER && yy_rule_can_match_eol[yy_act] )
{
- yy_size_t yyl;
+ int yyl;
for ( yyl = 0; yyl < yyleng; ++yyl )
if ( yytext[yyl] == '\n' )
@@ -1128,7 +1100,9 @@ YY_RULE_SETUP
if(fp)
{
yyin = fp;
- libconfig_yy_switch_to_buffer(libconfig_yy_create_buffer(yyin,YY_BUF_SIZE,yyscanner),yyscanner);
+ libconfig_yy_switch_to_buffer(
+ libconfig_yy_create_buffer(yyin, YY_BUF_SIZE, yyscanner),
+ yyscanner);
}
else
{
@@ -1281,8 +1255,8 @@ case YY_STATE_EOF(SCRIPTBLOCK):
yyextra);
if(buf)
{
- libconfig_yy_delete_buffer(YY_CURRENT_BUFFER,yyscanner);
- libconfig_yy_switch_to_buffer(buf,yyscanner);
+ libconfig_yy_delete_buffer(YY_CURRENT_BUFFER, yyscanner);
+ libconfig_yy_switch_to_buffer(buf, yyscanner);
}
else
yyterminate();
@@ -1293,7 +1267,7 @@ YY_RULE_SETUP
#line 219 "scanner.l"
ECHO;
YY_BREAK
-#line 1297 "scanner.c"
+#line 1269 "scanner.c"
case YY_END_OF_BUFFER:
{
@@ -1438,7 +1412,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
char *source = yyg->yytext_ptr;
- yy_size_t number_to_move, i;
+ int number_to_move, i;
int ret_val;
if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] )
@@ -1467,7 +1441,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
/* Try to read more data. */
/* First move last chars to start of buffer. */
- number_to_move = (yy_size_t) (yyg->yy_c_buf_p - yyg->yytext_ptr) - 1;
+ number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr - 1);
for ( i = 0; i < number_to_move; ++i )
*(dest++) = *(source++);
@@ -1480,7 +1454,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
else
{
- yy_size_t num_to_read =
+ int num_to_read =
YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
while ( num_to_read <= 0 )
@@ -1494,7 +1468,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
if ( b->yy_is_our_buffer )
{
- yy_size_t new_size = b->yy_buf_size * 2;
+ int new_size = b->yy_buf_size * 2;
if ( new_size <= 0 )
b->yy_buf_size += b->yy_buf_size / 8;
@@ -1503,11 +1477,11 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
b->yy_ch_buf = (char *)
/* Include room in for 2 EOB chars. */
- libconfig_yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ,yyscanner );
+ libconfig_yyrealloc((void *) b->yy_ch_buf,(yy_size_t) (b->yy_buf_size + 2) ,yyscanner );
}
else
/* Can't grow it, we don't own it. */
- b->yy_ch_buf = 0;
+ b->yy_ch_buf = NULL;
if ( ! b->yy_ch_buf )
YY_FATAL_ERROR(
@@ -1549,10 +1523,10 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
else
ret_val = EOB_ACT_CONTINUE_SCAN;
- if ((yy_size_t) (yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
+ if ((yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
/* Extend the array by 50%, plus the number we really need. */
- yy_size_t new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1);
- YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) libconfig_yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ,yyscanner );
+ int new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1);
+ YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) libconfig_yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,(yy_size_t) new_size ,yyscanner );
if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
}
@@ -1589,9 +1563,9 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
{
yy_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 123 )
- yy_c = yy_meta[(unsigned int) yy_c];
+ yy_c = yy_meta[yy_c];
}
- yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
+ yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
}
return yy_current_state;
@@ -1618,9 +1592,9 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
{
yy_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 123 )
- yy_c = yy_meta[(unsigned int) yy_c];
+ yy_c = yy_meta[yy_c];
}
- yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
+ yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
yy_is_jam = (yy_current_state == 122);
(void)yyg;
@@ -1656,7 +1630,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
else
{ /* need more input */
- yy_size_t offset = yyg->yy_c_buf_p - yyg->yytext_ptr;
+ int offset = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr);
++yyg->yy_c_buf_p;
switch ( yy_get_next_buffer( yyscanner ) )
@@ -1680,7 +1654,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
case EOB_ACT_END_OF_FILE:
{
if ( libconfig_yywrap(yyscanner ) )
- return EOF;
+ return 0;
if ( ! yyg->yy_did_buffer_switch_on_eof )
YY_NEW_FILE;
@@ -1729,6 +1703,8 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
libconfig_yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner);
}
+ assert(YY_CURRENT_BUFFER != NULL); // Fixes compiler warning -Wnull-dereference on gcc-6 and -O3
+
libconfig_yy_init_buffer(YY_CURRENT_BUFFER,input_file ,yyscanner);
libconfig_yy_load_buffer_state(yyscanner );
}
@@ -1792,12 +1768,12 @@ static void libconfig_yy_load_buffer_state (yyscan_t yyscanner)
if ( ! b )
YY_FATAL_ERROR( "out of dynamic memory in libconfig_yy_create_buffer()" );
- b->yy_buf_size = (yy_size_t)size;
+ b->yy_buf_size = size;
/* yy_ch_buf has to be 2 characters longer than the size given because
* we need to put in 2 end-of-buffer characters.
*/
- b->yy_ch_buf = (char *) libconfig_yyalloc(b->yy_buf_size + 2 ,yyscanner );
+ b->yy_ch_buf = (char *) libconfig_yyalloc((yy_size_t) (b->yy_buf_size + 2) ,yyscanner );
if ( ! b->yy_ch_buf )
YY_FATAL_ERROR( "out of dynamic memory in libconfig_yy_create_buffer()" );
@@ -1953,7 +1929,7 @@ static void libconfig_yyensure_buffer_stack (yyscan_t yyscanner)
* scanner will even need a stack. We use 2 instead of 1 to avoid an
* immediate realloc on the next call.
*/
- num_to_alloc = 1; // After all that talk, this was set to 1 anyways...
+ num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */
yyg->yy_buffer_stack = (struct yy_buffer_state**)libconfig_yyalloc
(num_to_alloc * sizeof(struct yy_buffer_state*)
, yyscanner);
@@ -2000,16 +1976,16 @@ YY_BUFFER_STATE libconfig_yy_scan_buffer (char * base, yy_size_t size , yyscan
base[size-2] != YY_END_OF_BUFFER_CHAR ||
base[size-1] != YY_END_OF_BUFFER_CHAR )
/* They forgot to leave room for the EOB's. */
- return 0;
+ return NULL;
b = (YY_BUFFER_STATE) libconfig_yyalloc(sizeof( struct yy_buffer_state ) ,yyscanner );
if ( ! b )
YY_FATAL_ERROR( "out of dynamic memory in libconfig_yy_scan_buffer()" );
- b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
+ b->yy_buf_size = (int) (size - 2); /* "- 2" to take care of EOB's */
b->yy_buf_pos = b->yy_ch_buf = base;
b->yy_is_our_buffer = 0;
- b->yy_input_file = 0;
+ b->yy_input_file = NULL;
b->yy_n_chars = b->yy_buf_size;
b->yy_is_interactive = 0;
b->yy_at_bol = 1;
@@ -2029,10 +2005,10 @@ YY_BUFFER_STATE libconfig_yy_scan_buffer (char * base, yy_size_t size , yyscan
* @note If you want to scan bytes that may contain NUL values, then use
* libconfig_yy_scan_bytes() instead.
*/
-YY_BUFFER_STATE libconfig_yy_scan_string (yyconst char * yystr , yyscan_t yyscanner)
+YY_BUFFER_STATE libconfig_yy_scan_string (const char * yystr , yyscan_t yyscanner)
{
- return libconfig_yy_scan_bytes(yystr,strlen(yystr) ,yyscanner);
+ return libconfig_yy_scan_bytes(yystr,(int) strlen(yystr) ,yyscanner);
}
/** Setup the input buffer state to scan the given bytes. The next call to libconfig_yylex() will
@@ -2042,15 +2018,15 @@ YY_BUFFER_STATE libconfig_yy_scan_string (yyconst char * yystr , yyscan_t yyscan
* @param yyscanner The scanner object.
* @return the newly allocated buffer state object.
*/
-YY_BUFFER_STATE libconfig_yy_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len , yyscan_t yyscanner)
+YY_BUFFER_STATE libconfig_yy_scan_bytes (const char * yybytes, int _yybytes_len , yyscan_t yyscanner)
{
YY_BUFFER_STATE b;
char *buf;
yy_size_t n;
- yy_size_t i;
+ int i;
/* Get memory for full buffer, including space for trailing EOB's. */
- n = _yybytes_len + 2;
+ n = (yy_size_t) (_yybytes_len + 2);
buf = (char *) libconfig_yyalloc(n ,yyscanner );
if ( ! buf )
YY_FATAL_ERROR( "out of dynamic memory in libconfig_yy_scan_bytes()" );
@@ -2076,7 +2052,7 @@ YY_BUFFER_STATE libconfig_yy_scan_bytes (yyconst char * yybytes, yy_size_t _yy
#define YY_EXIT_FAILURE 2
#endif
-static void yy_fatal_error (yyconst char* msg , yyscan_t yyscanner)
+static void yynoreturn yy_fatal_error (const char* msg , yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
(void)yyg;
@@ -2159,7 +2135,7 @@ FILE *libconfig_yyget_out (yyscan_t yyscanner)
/** Get the length of the current token.
* @param yyscanner The scanner object.
*/
-yy_size_t libconfig_yyget_leng (yyscan_t yyscanner)
+int libconfig_yyget_leng (yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
return yyleng;
@@ -2265,9 +2241,7 @@ void libconfig_yyset_lval (YYSTYPE * yylval_param , yyscan_t yyscanner)
* the ONLY reentrant function that doesn't take the scanner as the last argument.
* That's why we explicitly handle the declaration, instead of using our macros.
*/
-
int libconfig_yylex_init(yyscan_t* ptr_yy_globals)
-
{
if (ptr_yy_globals == NULL){
errno = EINVAL;
@@ -2294,9 +2268,7 @@ int libconfig_yylex_init(yyscan_t* ptr_yy_globals)
* The user defined value in the first argument will be available to libconfig_yyalloc in
* the yyextra field.
*/
-
int libconfig_yylex_init_extra(YY_EXTRA_TYPE yy_user_defined,yyscan_t* ptr_yy_globals )
-
{
struct yyguts_t dummy_yyguts;
@@ -2330,10 +2302,10 @@ static int yy_init_globals (yyscan_t yyscanner)
* This function is called from libconfig_yylex_destroy(), so don't allocate here.
*/
- yyg->yy_buffer_stack = 0;
+ yyg->yy_buffer_stack = NULL;
yyg->yy_buffer_stack_top = 0;
yyg->yy_buffer_stack_max = 0;
- yyg->yy_c_buf_p = (char *) 0;
+ yyg->yy_c_buf_p = NULL;
yyg->yy_init = 0;
yyg->yy_start = 0;
@@ -2346,8 +2318,8 @@ static int yy_init_globals (yyscan_t yyscanner)
yyin = stdin;
yyout = stdout;
#else
- yyin = (FILE *) 0;
- yyout = (FILE *) 0;
+ yyin = NULL;
+ yyout = NULL;
#endif
/* For future reference: Set errno on error, since we are called by
@@ -2391,7 +2363,7 @@ int libconfig_yylex_destroy (yyscan_t yyscanner)
*/
#ifndef yytext_ptr
-static void yy_flex_strncpy (char* s1, yyconst char * s2, int n , yyscan_t yyscanner)
+static void yy_flex_strncpy (char* s1, const char * s2, int n , yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
(void)yyg;
@@ -2403,7 +2375,7 @@ static void yy_flex_strncpy (char* s1, yyconst char * s2, int n , yyscan_t yysca
#endif
#ifdef YY_NEED_STRLEN
-static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner)
+static int yy_flex_strlen (const char * s , yyscan_t yyscanner)
{
int n;
for ( n = 0; s[n]; ++n )
@@ -2417,7 +2389,7 @@ void *libconfig_yyalloc (yy_size_t size , yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
(void)yyg;
- return (void *) malloc( size );
+ return malloc(size);
}
void *libconfig_yyrealloc (void * ptr, yy_size_t size , yyscan_t yyscanner)
@@ -2432,7 +2404,7 @@ void *libconfig_yyrealloc (void * ptr, yy_size_t size , yyscan_t yyscanner)
* any pointer type to void*, and deal with argument conversions
* as though doing an assignment.
*/
- return (void *) realloc( (char *) ptr, size );
+ return realloc(ptr, size);
}
void libconfig_yyfree (void * ptr , yyscan_t yyscanner)
diff --git a/3rdparty/libconfig/scanner.h b/3rdparty/libconfig/scanner.h
index ce2f5cc95..c1d295594 100644
--- a/3rdparty/libconfig/scanner.h
+++ b/3rdparty/libconfig/scanner.h
@@ -2,9 +2,9 @@
#define libconfig_yyHEADER_H 1
#define libconfig_yyIN_HEADER 1
-#line 6 "scanner.h"
+#line 5 "scanner.h"
-#line 8 "scanner.h"
+#line 7 "scanner.h"
#define YY_INT_ALIGNED short int
@@ -13,7 +13,7 @@
#define FLEX_SCANNER
#define YY_FLEX_MAJOR_VERSION 2
#define YY_FLEX_MINOR_VERSION 6
-#define YY_FLEX_SUBMINOR_VERSION 0
+#define YY_FLEX_SUBMINOR_VERSION 2
#if YY_FLEX_SUBMINOR_VERSION > 0
#define FLEX_BETA
#endif
@@ -92,25 +92,13 @@ typedef unsigned int flex_uint32_t;
#endif /* ! FLEXINT_H */
-#ifdef __cplusplus
-
-/* The "const" storage-class-modifier is valid. */
-#define YY_USE_CONST
-
-#else /* ! __cplusplus */
-
-/* C99 requires __STDC__ to be defined as 1. */
-#if defined (__STDC__)
-
-#define YY_USE_CONST
-
-#endif /* defined (__STDC__) */
-#endif /* ! __cplusplus */
-
-#ifdef YY_USE_CONST
+/* TODO: this is always defined, so inline it */
#define yyconst const
+
+#if defined(__GNUC__) && __GNUC__ >= 3
+#define yynoreturn __attribute__((__noreturn__))
#else
-#define yyconst
+#define yynoreturn
#endif
/* An opaque pointer. */
@@ -165,12 +153,12 @@ struct yy_buffer_state
/* Size of input buffer in bytes, not including room for EOB
* characters.
*/
- yy_size_t yy_buf_size;
+ int yy_buf_size;
/* Number of characters read into yy_ch_buf, not including EOB
* characters.
*/
- yy_size_t yy_n_chars;
+ int yy_n_chars;
/* Whether we "own" the buffer - i.e., we know we created it,
* and can realloc() it to grow it, and should free() it to
@@ -204,21 +192,21 @@ struct yy_buffer_state
};
#endif /* !YY_STRUCT_YY_BUFFER_STATE */
-void libconfig_yyrestart (FILE *input_file ,yyscan_t yyscanner );
-void libconfig_yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner );
-YY_BUFFER_STATE libconfig_yy_create_buffer (FILE *file,int size ,yyscan_t yyscanner );
-void libconfig_yy_delete_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner );
-void libconfig_yy_flush_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner );
-void libconfig_yypush_buffer_state (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner );
-void libconfig_yypop_buffer_state (yyscan_t yyscanner );
+void libconfig_yyrestart ( FILE *input_file , yyscan_t yyscanner );
+void libconfig_yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner );
+YY_BUFFER_STATE libconfig_yy_create_buffer ( FILE *file, int size , yyscan_t yyscanner );
+void libconfig_yy_delete_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner );
+void libconfig_yy_flush_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner );
+void libconfig_yypush_buffer_state ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner );
+void libconfig_yypop_buffer_state ( yyscan_t yyscanner );
-YY_BUFFER_STATE libconfig_yy_scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner );
-YY_BUFFER_STATE libconfig_yy_scan_string (yyconst char *yy_str ,yyscan_t yyscanner );
-YY_BUFFER_STATE libconfig_yy_scan_bytes (yyconst char *bytes,yy_size_t len ,yyscan_t yyscanner );
+YY_BUFFER_STATE libconfig_yy_scan_buffer ( char *base, yy_size_t size , yyscan_t yyscanner );
+YY_BUFFER_STATE libconfig_yy_scan_string ( const char *yy_str , yyscan_t yyscanner );
+YY_BUFFER_STATE libconfig_yy_scan_bytes ( const char *bytes, int len , yyscan_t yyscanner );
-void *libconfig_yyalloc (yy_size_t ,yyscan_t yyscanner );
-void *libconfig_yyrealloc (void *,yy_size_t ,yyscan_t yyscanner );
-void libconfig_yyfree (void * ,yyscan_t yyscanner );
+void *libconfig_yyalloc ( yy_size_t , yyscan_t yyscanner );
+void *libconfig_yyrealloc ( void *, yy_size_t , yyscan_t yyscanner );
+void libconfig_yyfree ( void * , yyscan_t yyscanner );
#define libconfig_yywrap(yyscanner) (/*CONSTCOND*/1)
#define YY_SKIP_YYWRAP
@@ -238,44 +226,44 @@ void libconfig_yyfree (void * ,yyscan_t yyscanner );
int libconfig_yylex_init (yyscan_t* scanner);
-int libconfig_yylex_init_extra (YY_EXTRA_TYPE user_defined,yyscan_t* scanner);
+int libconfig_yylex_init_extra ( YY_EXTRA_TYPE user_defined, yyscan_t* scanner);
/* Accessor methods to globals.
These are made visible to non-reentrant scanners for convenience. */
-int libconfig_yylex_destroy (yyscan_t yyscanner );
+int libconfig_yylex_destroy ( yyscan_t yyscanner );
-int libconfig_yyget_debug (yyscan_t yyscanner );
+int libconfig_yyget_debug ( yyscan_t yyscanner );
-void libconfig_yyset_debug (int debug_flag ,yyscan_t yyscanner );
+void libconfig_yyset_debug ( int debug_flag , yyscan_t yyscanner );
-YY_EXTRA_TYPE libconfig_yyget_extra (yyscan_t yyscanner );
+YY_EXTRA_TYPE libconfig_yyget_extra ( yyscan_t yyscanner );
-void libconfig_yyset_extra (YY_EXTRA_TYPE user_defined ,yyscan_t yyscanner );
+void libconfig_yyset_extra ( YY_EXTRA_TYPE user_defined , yyscan_t yyscanner );
-FILE *libconfig_yyget_in (yyscan_t yyscanner );
+FILE *libconfig_yyget_in ( yyscan_t yyscanner );
-void libconfig_yyset_in (FILE * _in_str ,yyscan_t yyscanner );
+void libconfig_yyset_in ( FILE * _in_str , yyscan_t yyscanner );
-FILE *libconfig_yyget_out (yyscan_t yyscanner );
+FILE *libconfig_yyget_out ( yyscan_t yyscanner );
-void libconfig_yyset_out (FILE * _out_str ,yyscan_t yyscanner );
+void libconfig_yyset_out ( FILE * _out_str , yyscan_t yyscanner );
-yy_size_t libconfig_yyget_leng (yyscan_t yyscanner );
+ int libconfig_yyget_leng ( yyscan_t yyscanner );
-char *libconfig_yyget_text (yyscan_t yyscanner );
+char *libconfig_yyget_text ( yyscan_t yyscanner );
-int libconfig_yyget_lineno (yyscan_t yyscanner );
+int libconfig_yyget_lineno ( yyscan_t yyscanner );
-void libconfig_yyset_lineno (int _line_number ,yyscan_t yyscanner );
+void libconfig_yyset_lineno ( int _line_number , yyscan_t yyscanner );
-int libconfig_yyget_column (yyscan_t yyscanner );
+int libconfig_yyget_column ( yyscan_t yyscanner );
-void libconfig_yyset_column (int _column_no ,yyscan_t yyscanner );
+void libconfig_yyset_column ( int _column_no , yyscan_t yyscanner );
-YYSTYPE * libconfig_yyget_lval (yyscan_t yyscanner );
+YYSTYPE * libconfig_yyget_lval ( yyscan_t yyscanner );
-void libconfig_yyset_lval (YYSTYPE * yylval_param ,yyscan_t yyscanner );
+void libconfig_yyset_lval ( YYSTYPE * yylval_param , yyscan_t yyscanner );
/* Macros after this point can all be overridden by user definitions in
* section 1.
@@ -283,18 +271,18 @@ void libconfig_yyset_lval (YYSTYPE * yylval_param ,yyscan_t yyscanner );
#ifndef YY_SKIP_YYWRAP
#ifdef __cplusplus
-extern "C" int libconfig_yywrap (yyscan_t yyscanner );
+extern "C" int libconfig_yywrap ( yyscan_t yyscanner );
#else
-extern int libconfig_yywrap (yyscan_t yyscanner );
+extern int libconfig_yywrap ( yyscan_t yyscanner );
#endif
#endif
#ifndef yytext_ptr
-static void yy_flex_strncpy (char *,yyconst char *,int ,yyscan_t yyscanner);
+static void yy_flex_strncpy ( char *, const char *, int , yyscan_t yyscanner);
#endif
#ifdef YY_NEED_STRLEN
-static int yy_flex_strlen (yyconst char * ,yyscan_t yyscanner);
+static int yy_flex_strlen ( const char * , yyscan_t yyscanner);
#endif
#ifndef YY_NO_INPUT
@@ -323,7 +311,7 @@ static int yy_flex_strlen (yyconst char * ,yyscan_t yyscanner);
#define YY_DECL_IS_OURS 1
extern int libconfig_yylex \
- (YYSTYPE * yylval_param ,yyscan_t yyscanner);
+ (YYSTYPE * yylval_param , yyscan_t yyscanner);
#define YY_DECL int libconfig_yylex \
(YYSTYPE * yylval_param , yyscan_t yyscanner)
@@ -345,6 +333,6 @@ extern int libconfig_yylex \
#line 219 "scanner.l"
-#line 349 "scanner.h"
+#line 336 "scanner.h"
#undef libconfig_yyIN_HEADER
#endif /* libconfig_yyHEADER_H */
diff --git a/src/char/Makefile.in b/src/char/Makefile.in
index fe40621fb..7806ce2bb 100644
--- a/src/char/Makefile.in
+++ b/src/char/Makefile.in
@@ -51,7 +51,7 @@ CHAR_PH =
HAVE_MYSQL=@HAVE_MYSQL@
ifeq ($(HAVE_MYSQL),yes)
- CHAR_SERVER_SQL_DEPENDS=$(CHAR_OBJ) $(COMMON_D)/obj_sql/common_sql.a $(COMMON_D)/obj_all/common.a $(MT19937AR_OBJ) $(LIBCONFIG_OBJ) $(SYSINFO_INC)
+ CHAR_SERVER_SQL_DEPENDS=$(CHAR_OBJ) $(COMMON_D)/obj_all/common.a $(COMMON_D)/obj_sql/common_sql.a $(MT19937AR_OBJ) $(LIBCONFIG_OBJ) $(SYSINFO_INC)
else
CHAR_SERVER_SQL_DEPENDS=needs_mysql
endif
@@ -110,8 +110,8 @@ char-server: ../../char-server@EXEEXT@
../../char-server@EXEEXT@: $(CHAR_SERVER_SQL_DEPENDS) Makefile
@echo " LD $(notdir $@)"
- @$(CC) @STATIC@ @LDFLAGS@ -o ../../char-server@EXEEXT@ $(CHAR_OBJ) $(COMMON_D)/obj_sql/common_sql.a \
- $(COMMON_D)/obj_all/common.a $(MT19937AR_OBJ) $(LIBCONFIG_OBJ) @LIBS@ @MYSQL_LIBS@
+ @$(CC) @STATIC@ @LDFLAGS@ -o ../../char-server@EXEEXT@ $(CHAR_OBJ) $(COMMON_D)/obj_all/common.a $(COMMON_D)/obj_sql/common_sql.a \
+ $(MT19937AR_OBJ) $(LIBCONFIG_OBJ) @LIBS@ @MYSQL_LIBS@
# missing object files
$(COMMON_D)/obj_all/common.a:
diff --git a/src/char/char.c b/src/char/char.c
index a43f783b5..d69ea0d53 100644
--- a/src/char/char.c
+++ b/src/char/char.c
@@ -5940,7 +5940,7 @@ bool char_config_read_player_new(const char *filename, const struct config_t *co
#else
const char *start_point_setting = "start_point_pre";
#endif
- long long int i64 = 0; // TODO: Temporary until the signature of libconfig->setting_lookup_int64 is changed to take a defined-size int (int64)
+ int64 i64 = 0;
nullpo_retr(false, filename);
nullpo_retr(false, config);
diff --git a/src/common/conf.c b/src/common/conf.c
index 8ec2f3fb4..96b9bff9f 100644
--- a/src/common/conf.c
+++ b/src/common/conf.c
@@ -373,6 +373,80 @@ int config_lookup_mutable_string(const struct config_t *config, const char *name
return CONFIG_FALSE;
}
+/**
+ * Wrapper for config_setting_get_int64() using defined-size variables
+ *
+ * @see config_setting_get_int64_real()
+ */
+int64 config_setting_get_int64_real(const struct config_setting_t *setting)
+{
+ return (int64)config_setting_get_int64(setting);
+}
+
+/**
+ * Wrapper for config_setting_lookup_int64() using defined-size variables
+ *
+ * @see config_setting_lookup_int64()
+ */
+int config_setting_lookup_int64_real(const struct config_setting_t *setting, const char *name, int64 *value)
+{
+ long long int lli = 0;
+
+ if (config_setting_lookup_int64(setting, name, &lli) != CONFIG_TRUE)
+ return CONFIG_FALSE;
+
+ *value = (int64)lli;
+
+ return CONFIG_TRUE;
+}
+
+/**
+ * Wrapper for config_setting_set_int64() using defined-size variables
+ *
+ * @see config_setting_set_int64()
+ */
+int config_setting_set_int64_real(struct config_setting_t *setting, int64 value)
+{
+ return config_setting_set_int64(setting, (long long int)value);
+}
+
+/**
+ * Wrapper for config_setting_get_int64_elem() using defined-size variables
+ *
+ * @see config_setting_get_int64_elem()
+ */
+int64 config_setting_get_int64_elem_real(const struct config_setting_t *setting, int idx)
+{
+ return (int64)config_setting_get_int64_elem(setting, idx);
+}
+
+/**
+ * Wrapper for config_setting_set_int64_elem() using defined-size variables
+ *
+ * @see config_setting_set_int64_elem()
+ */
+struct config_setting_t *config_setting_set_int64_elem_real(struct config_setting_t *setting, int idx, int64 value)
+{
+ return config_setting_set_int64_elem(setting, idx, (long long int)value);
+}
+
+/**
+ * Wrapper for config_lookup_int64() using defined-size variables
+ *
+ * @see config_lookup_int64()
+ */
+int config_lookup_int64_real(const struct config_t *config, const char *filepath, int64 *value)
+{
+ long long int lli = 0;
+
+ if (config_lookup_int64(config, filepath, &lli) != CONFIG_TRUE)
+ return CONFIG_FALSE;
+
+ *value = (int64)lli;
+
+ return CONFIG_TRUE;
+}
+
void libconfig_defaults(void) {
libconfig = &libconfig_s;
@@ -393,20 +467,20 @@ void libconfig_defaults(void) {
libconfig->destroy = config_destroy;
/* */
libconfig->setting_get_int = config_setting_get_int;
- libconfig->setting_get_int64 = config_setting_get_int64;
+ libconfig->setting_get_int64 = config_setting_get_int64_real;
libconfig->setting_get_float = config_setting_get_float;
libconfig->setting_get_bool = config_setting_get_bool;
libconfig->setting_get_string = config_setting_get_string;
/* */
libconfig->setting_lookup = config_setting_lookup;
libconfig->setting_lookup_int = config_setting_lookup_int;
- libconfig->setting_lookup_int64 = config_setting_lookup_int64;
+ libconfig->setting_lookup_int64 = config_setting_lookup_int64_real;
libconfig->setting_lookup_float = config_setting_lookup_float;
libconfig->setting_lookup_bool = config_setting_lookup_bool;
libconfig->setting_lookup_string = config_setting_lookup_string;
/* */
libconfig->setting_set_int = config_setting_set_int;
- libconfig->setting_set_int64 = config_setting_set_int64;
+ libconfig->setting_set_int64 = config_setting_set_int64_real;
libconfig->setting_set_float = config_setting_set_float;
libconfig->setting_set_bool = config_setting_set_bool;
libconfig->setting_set_string = config_setting_set_string;
@@ -415,13 +489,13 @@ void libconfig_defaults(void) {
libconfig->setting_get_format = config_setting_get_format;
/* */
libconfig->setting_get_int_elem = config_setting_get_int_elem;
- libconfig->setting_get_int64_elem = config_setting_get_int64_elem;
+ libconfig->setting_get_int64_elem = config_setting_get_int64_elem_real;
libconfig->setting_get_float_elem = config_setting_get_float_elem;
libconfig->setting_get_bool_elem = config_setting_get_bool_elem;
libconfig->setting_get_string_elem = config_setting_get_string_elem;
/* */
libconfig->setting_set_int_elem = config_setting_set_int_elem;
- libconfig->setting_set_int64_elem = config_setting_set_int64_elem;
+ libconfig->setting_set_int64_elem = config_setting_set_int64_elem_real;
libconfig->setting_set_float_elem = config_setting_set_float_elem;
libconfig->setting_set_bool_elem = config_setting_set_bool_elem;
libconfig->setting_set_string_elem = config_setting_set_string_elem;
@@ -441,7 +515,7 @@ void libconfig_defaults(void) {
libconfig->lookup = config_lookup;
/* */
libconfig->lookup_int = config_lookup_int;
- libconfig->lookup_int64 = config_lookup_int64;
+ libconfig->lookup_int64 = config_lookup_int64_real;
libconfig->lookup_float = config_lookup_float;
libconfig->lookup_bool = config_lookup_bool;
libconfig->lookup_string = config_lookup_string;
diff --git a/src/common/conf.h b/src/common/conf.h
index cb1ca6bee..bd6acc4be 100644
--- a/src/common/conf.h
+++ b/src/common/conf.h
@@ -46,7 +46,7 @@ struct libconfig_interface {
void (*destroy) (struct config_t *config);
int (*setting_get_int) (const struct config_setting_t *setting);
- long long (*setting_get_int64) (const struct config_setting_t *setting);
+ int64 (*setting_get_int64) (const struct config_setting_t *setting);
double (*setting_get_float) (const struct config_setting_t *setting);
int (*setting_get_bool) (const struct config_setting_t *setting);
@@ -55,12 +55,12 @@ struct libconfig_interface {
struct config_setting_t * (*setting_lookup) (struct config_setting_t *setting, const char *name);
int (*setting_lookup_int) (const struct config_setting_t *setting, const char *name, int *value);
- int (*setting_lookup_int64) (const struct config_setting_t *setting, const char *name, long long *value);
+ int (*setting_lookup_int64) (const struct config_setting_t *setting, const char *name, int64 *value);
int (*setting_lookup_float) (const struct config_setting_t *setting, const char *name, double *value);
int (*setting_lookup_bool) (const struct config_setting_t *setting, const char *name, int *value);
int (*setting_lookup_string) (const struct config_setting_t *setting, const char *name, const char **value);
- int (*setting_set_int) (struct config_setting_t *setting ,int value);
- int (*setting_set_int64) (struct config_setting_t *setting, long long value);
+ int (*setting_set_int) (struct config_setting_t *setting, int value);
+ int (*setting_set_int64) (struct config_setting_t *setting, int64 value);
int (*setting_set_float) (struct config_setting_t *setting, double value);
int (*setting_set_bool) (struct config_setting_t *setting, int value);
int (*setting_set_string) (struct config_setting_t *setting, const char *value);
@@ -69,12 +69,12 @@ struct libconfig_interface {
short (*setting_get_format) (const struct config_setting_t *setting);
int (*setting_get_int_elem) (const struct config_setting_t *setting, int idx);
- long long (*setting_get_int64_elem) (const struct config_setting_t *setting, int idx);
+ int64 (*setting_get_int64_elem) (const struct config_setting_t *setting, int idx);
double (*setting_get_float_elem) (const struct config_setting_t *setting, int idx);
int (*setting_get_bool_elem) (const struct config_setting_t *setting, int idx);
const char * (*setting_get_string_elem) (const struct config_setting_t *setting, int idx);
struct config_setting_t * (*setting_set_int_elem) (struct config_setting_t *setting, int idx, int value);
- struct config_setting_t * (*setting_set_int64_elem) (struct config_setting_t *setting, int idx, long long value);
+ struct config_setting_t * (*setting_set_int64_elem) (struct config_setting_t *setting, int idx, int64 value);
struct config_setting_t * (*setting_set_float_elem) (struct config_setting_t *setting, int idx, double value);
struct config_setting_t * (*setting_set_bool_elem) (struct config_setting_t *setting, int idx, int value);
struct config_setting_t * (*setting_set_string_elem) (struct config_setting_t *setting, int idx, const char *value);
@@ -93,7 +93,7 @@ struct libconfig_interface {
struct config_setting_t * (*lookup) (const struct config_t *config, const char *filepath);
int (*lookup_int) (const struct config_t *config, const char *filepath, int *value);
- int (*lookup_int64) (const struct config_t *config, const char *filepath, long long *value);
+ int (*lookup_int64) (const struct config_t *config, const char *filepath, int64 *value);
int (*lookup_float) (const struct config_t *config, const char *filepath, double *value);
int (*lookup_bool) (const struct config_t *config, const char *filepath, int *value);
int (*lookup_string) (const struct config_t *config, const char *filepath, const char **value);
diff --git a/src/login/Makefile.in b/src/login/Makefile.in
index c74ed1e10..69cc6a897 100644
--- a/src/login/Makefile.in
+++ b/src/login/Makefile.in
@@ -47,7 +47,7 @@ LOGIN_PH = lclif.p.h
HAVE_MYSQL=@HAVE_MYSQL@
ifeq ($(HAVE_MYSQL),yes)
- LOGIN_SERVER_SQL_DEPENDS=$(LOGIN_OBJ) $(COMMON_D)/obj_sql/common_sql.a $(COMMON_D)/obj_all/common.a $(MT19937AR_OBJ) $(LIBCONFIG_OBJ $(SYSINFO_INC))
+ LOGIN_SERVER_SQL_DEPENDS=$(LOGIN_OBJ) $(COMMON_D)/obj_all/common.a $(COMMON_D)/obj_sql/common_sql.a $(MT19937AR_OBJ) $(LIBCONFIG_OBJ) $(SYSINFO_INC)
else
LOGIN_SERVER_SQL_DEPENDS=needs_mysql
endif
@@ -106,8 +106,8 @@ login-server: ../../login-server@EXEEXT@
../../login-server@EXEEXT@: $(LOGIN_SERVER_SQL_DEPENDS) Makefile
@echo " LD $(notdir $@)"
- @$(CC) @STATIC@ @LDFLAGS@ -o ../../login-server@EXEEXT@ $(LOGIN_OBJ) $(COMMON_D)/obj_sql/common_sql.a \
- $(COMMON_D)/obj_all/common.a $(MT19937AR_OBJ) $(LIBCONFIG_OBJ) @LIBS@ @MYSQL_LIBS@
+ @$(CC) @STATIC@ @LDFLAGS@ -o ../../login-server@EXEEXT@ $(LOGIN_OBJ) $(COMMON_D)/obj_all/common.a $(COMMON_D)/obj_sql/common_sql.a \
+ $(MT19937AR_OBJ) $(LIBCONFIG_OBJ) @LIBS@ @MYSQL_LIBS@
# missing object files
$(COMMON_D)/obj_all/common.a:
diff --git a/src/map/Makefile.in b/src/map/Makefile.in
index 3c6a3f806..c01826bfb 100644
--- a/src/map/Makefile.in
+++ b/src/map/Makefile.in
@@ -57,7 +57,7 @@ MAP_PH =
HAVE_MYSQL=@HAVE_MYSQL@
ifeq ($(HAVE_MYSQL),yes)
- MAP_SERVER_SQL_DEPENDS=$(MAP_OBJ) $(COMMON_D)/obj_sql/common_sql.a $(COMMON_D)/obj_all/common.a $(MT19937AR_OBJ) $(LIBCONFIG_OBJ $(SYSINFO_INC))
+ MAP_SERVER_SQL_DEPENDS=$(MAP_OBJ) $(COMMON_D)/obj_all/common.a $(COMMON_D)/obj_sql/common_sql.a $(MT19937AR_OBJ) $(LIBCONFIG_OBJ) $(SYSINFO_INC)
else
MAP_SERVER_SQL_DEPENDS=needs_mysql
endif
@@ -116,8 +116,8 @@ map-server: ../../map-server@EXEEXT@
../../map-server@EXEEXT@: $(MAP_SERVER_SQL_DEPENDS) Makefile
@echo " LD $(notdir $@)"
- @$(CC) @STATIC@ @LDFLAGS@ -o ../../map-server@EXEEXT@ $(MAP_OBJ) $(COMMON_D)/obj_sql/common_sql.a \
- $(COMMON_D)/obj_all/common.a $(MT19937AR_OBJ) $(LIBCONFIG_OBJ) @LIBS@ @MYSQL_LIBS@
+ @$(CC) @STATIC@ @LDFLAGS@ -o ../../map-server@EXEEXT@ $(MAP_OBJ) $(COMMON_D)/obj_all/common.a $(COMMON_D)/obj_sql/common_sql.a \
+ $(MT19937AR_OBJ) $(LIBCONFIG_OBJ) @LIBS@ @MYSQL_LIBS@
# missing object files
$(COMMON_D)/obj_all/common.a:
diff --git a/src/plugins/HPMHooking/HPMHooking.Defs.inc b/src/plugins/HPMHooking/HPMHooking.Defs.inc
index af90b1fcc..eb494a6c2 100644
--- a/src/plugins/HPMHooking/HPMHooking.Defs.inc
+++ b/src/plugins/HPMHooking/HPMHooking.Defs.inc
@@ -3480,8 +3480,8 @@ typedef void (*HPMHOOK_pre_libconfig_destroy) (struct config_t **config);
typedef void (*HPMHOOK_post_libconfig_destroy) (struct config_t *config);
typedef int (*HPMHOOK_pre_libconfig_setting_get_int) (const struct config_setting_t **setting);
typedef int (*HPMHOOK_post_libconfig_setting_get_int) (int retVal___, const struct config_setting_t *setting);
-typedef long long (*HPMHOOK_pre_libconfig_setting_get_int64) (const struct config_setting_t **setting);
-typedef long long (*HPMHOOK_post_libconfig_setting_get_int64) (long long retVal___, const struct config_setting_t *setting);
+typedef int64 (*HPMHOOK_pre_libconfig_setting_get_int64) (const struct config_setting_t **setting);
+typedef int64 (*HPMHOOK_post_libconfig_setting_get_int64) (int64 retVal___, const struct config_setting_t *setting);
typedef double (*HPMHOOK_pre_libconfig_setting_get_float) (const struct config_setting_t **setting);
typedef double (*HPMHOOK_post_libconfig_setting_get_float) (double retVal___, const struct config_setting_t *setting);
typedef int (*HPMHOOK_pre_libconfig_setting_get_bool) (const struct config_setting_t **setting);
@@ -3492,8 +3492,8 @@ typedef struct config_setting_t* (*HPMHOOK_pre_libconfig_setting_lookup) (struct
typedef struct config_setting_t* (*HPMHOOK_post_libconfig_setting_lookup) (struct config_setting_t* retVal___, struct config_setting_t *setting, const char *name);
typedef int (*HPMHOOK_pre_libconfig_setting_lookup_int) (const struct config_setting_t **setting, const char **name, int **value);
typedef int (*HPMHOOK_post_libconfig_setting_lookup_int) (int retVal___, const struct config_setting_t *setting, const char *name, int *value);
-typedef int (*HPMHOOK_pre_libconfig_setting_lookup_int64) (const struct config_setting_t **setting, const char **name, long long **value);
-typedef int (*HPMHOOK_post_libconfig_setting_lookup_int64) (int retVal___, const struct config_setting_t *setting, const char *name, long long *value);
+typedef int (*HPMHOOK_pre_libconfig_setting_lookup_int64) (const struct config_setting_t **setting, const char **name, int64 **value);
+typedef int (*HPMHOOK_post_libconfig_setting_lookup_int64) (int retVal___, const struct config_setting_t *setting, const char *name, int64 *value);
typedef int (*HPMHOOK_pre_libconfig_setting_lookup_float) (const struct config_setting_t **setting, const char **name, double **value);
typedef int (*HPMHOOK_post_libconfig_setting_lookup_float) (int retVal___, const struct config_setting_t *setting, const char *name, double *value);
typedef int (*HPMHOOK_pre_libconfig_setting_lookup_bool) (const struct config_setting_t **setting, const char **name, int **value);
@@ -3502,8 +3502,8 @@ typedef int (*HPMHOOK_pre_libconfig_setting_lookup_string) (const struct config_
typedef int (*HPMHOOK_post_libconfig_setting_lookup_string) (int retVal___, const struct config_setting_t *setting, const char *name, const char **value);
typedef int (*HPMHOOK_pre_libconfig_setting_set_int) (struct config_setting_t **setting, int *value);
typedef int (*HPMHOOK_post_libconfig_setting_set_int) (int retVal___, struct config_setting_t *setting, int value);
-typedef int (*HPMHOOK_pre_libconfig_setting_set_int64) (struct config_setting_t **setting, long long *value);
-typedef int (*HPMHOOK_post_libconfig_setting_set_int64) (int retVal___, struct config_setting_t *setting, long long value);
+typedef int (*HPMHOOK_pre_libconfig_setting_set_int64) (struct config_setting_t **setting, int64 *value);
+typedef int (*HPMHOOK_post_libconfig_setting_set_int64) (int retVal___, struct config_setting_t *setting, int64 value);
typedef int (*HPMHOOK_pre_libconfig_setting_set_float) (struct config_setting_t **setting, double *value);
typedef int (*HPMHOOK_post_libconfig_setting_set_float) (int retVal___, struct config_setting_t *setting, double value);
typedef int (*HPMHOOK_pre_libconfig_setting_set_bool) (struct config_setting_t **setting, int *value);
@@ -3516,8 +3516,8 @@ typedef short (*HPMHOOK_pre_libconfig_setting_get_format) (const struct config_s
typedef short (*HPMHOOK_post_libconfig_setting_get_format) (short retVal___, const struct config_setting_t *setting);
typedef int (*HPMHOOK_pre_libconfig_setting_get_int_elem) (const struct config_setting_t **setting, int *idx);
typedef int (*HPMHOOK_post_libconfig_setting_get_int_elem) (int retVal___, const struct config_setting_t *setting, int idx);
-typedef long long (*HPMHOOK_pre_libconfig_setting_get_int64_elem) (const struct config_setting_t **setting, int *idx);
-typedef long long (*HPMHOOK_post_libconfig_setting_get_int64_elem) (long long retVal___, const struct config_setting_t *setting, int idx);
+typedef int64 (*HPMHOOK_pre_libconfig_setting_get_int64_elem) (const struct config_setting_t **setting, int *idx);
+typedef int64 (*HPMHOOK_post_libconfig_setting_get_int64_elem) (int64 retVal___, const struct config_setting_t *setting, int idx);
typedef double (*HPMHOOK_pre_libconfig_setting_get_float_elem) (const struct config_setting_t **setting, int *idx);
typedef double (*HPMHOOK_post_libconfig_setting_get_float_elem) (double retVal___, const struct config_setting_t *setting, int idx);
typedef int (*HPMHOOK_pre_libconfig_setting_get_bool_elem) (const struct config_setting_t **setting, int *idx);
@@ -3526,8 +3526,8 @@ typedef const char* (*HPMHOOK_pre_libconfig_setting_get_string_elem) (const stru
typedef const char* (*HPMHOOK_post_libconfig_setting_get_string_elem) (const char* retVal___, const struct config_setting_t *setting, int idx);
typedef struct config_setting_t* (*HPMHOOK_pre_libconfig_setting_set_int_elem) (struct config_setting_t **setting, int *idx, int *value);
typedef struct config_setting_t* (*HPMHOOK_post_libconfig_setting_set_int_elem) (struct config_setting_t* retVal___, struct config_setting_t *setting, int idx, int value);
-typedef struct config_setting_t* (*HPMHOOK_pre_libconfig_setting_set_int64_elem) (struct config_setting_t **setting, int *idx, long long *value);
-typedef struct config_setting_t* (*HPMHOOK_post_libconfig_setting_set_int64_elem) (struct config_setting_t* retVal___, struct config_setting_t *setting, int idx, long long value);
+typedef struct config_setting_t* (*HPMHOOK_pre_libconfig_setting_set_int64_elem) (struct config_setting_t **setting, int *idx, int64 *value);
+typedef struct config_setting_t* (*HPMHOOK_post_libconfig_setting_set_int64_elem) (struct config_setting_t* retVal___, struct config_setting_t *setting, int idx, int64 value);
typedef struct config_setting_t* (*HPMHOOK_pre_libconfig_setting_set_float_elem) (struct config_setting_t **setting, int *idx, double *value);
typedef struct config_setting_t* (*HPMHOOK_post_libconfig_setting_set_float_elem) (struct config_setting_t* retVal___, struct config_setting_t *setting, int idx, double value);
typedef struct config_setting_t* (*HPMHOOK_pre_libconfig_setting_set_bool_elem) (struct config_setting_t **setting, int *idx, int *value);
@@ -3554,8 +3554,8 @@ typedef struct config_setting_t* (*HPMHOOK_pre_libconfig_lookup) (const struct c
typedef struct config_setting_t* (*HPMHOOK_post_libconfig_lookup) (struct config_setting_t* retVal___, const struct config_t *config, const char *filepath);
typedef int (*HPMHOOK_pre_libconfig_lookup_int) (const struct config_t **config, const char **filepath, int **value);
typedef int (*HPMHOOK_post_libconfig_lookup_int) (int retVal___, const struct config_t *config, const char *filepath, int *value);
-typedef int (*HPMHOOK_pre_libconfig_lookup_int64) (const struct config_t **config, const char **filepath, long long **value);
-typedef int (*HPMHOOK_post_libconfig_lookup_int64) (int retVal___, const struct config_t *config, const char *filepath, long long *value);
+typedef int (*HPMHOOK_pre_libconfig_lookup_int64) (const struct config_t **config, const char **filepath, int64 **value);
+typedef int (*HPMHOOK_post_libconfig_lookup_int64) (int retVal___, const struct config_t *config, const char *filepath, int64 *value);
typedef int (*HPMHOOK_pre_libconfig_lookup_float) (const struct config_t **config, const char **filepath, double **value);
typedef int (*HPMHOOK_post_libconfig_lookup_float) (int retVal___, const struct config_t *config, const char *filepath, double *value);
typedef int (*HPMHOOK_pre_libconfig_lookup_bool) (const struct config_t **config, const char **filepath, int **value);
diff --git a/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc
index 19e127a23..bab2c2721 100644
--- a/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc
+++ b/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc
@@ -8593,11 +8593,11 @@ int HP_libconfig_setting_get_int(const struct config_setting_t *setting) {
}
return retVal___;
}
-long long HP_libconfig_setting_get_int64(const struct config_setting_t *setting) {
+int64 HP_libconfig_setting_get_int64(const struct config_setting_t *setting) {
int hIndex = 0;
- long long retVal___ = 0;
+ int64 retVal___ = 0;
if( HPMHooks.count.HP_libconfig_setting_get_int64_pre ) {
- long long (*preHookFunc) (const struct config_setting_t **setting);
+ int64 (*preHookFunc) (const struct config_setting_t **setting);
*HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int64_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_libconfig_setting_get_int64_pre[hIndex].func;
@@ -8612,7 +8612,7 @@ long long HP_libconfig_setting_get_int64(const struct config_setting_t *setting)
retVal___ = HPMHooks.source.libconfig.setting_get_int64(setting);
}
if( HPMHooks.count.HP_libconfig_setting_get_int64_post ) {
- long long (*postHookFunc) (long long retVal___, const struct config_setting_t *setting);
+ int64 (*postHookFunc) (int64 retVal___, const struct config_setting_t *setting);
for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int64_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_libconfig_setting_get_int64_post[hIndex].func;
retVal___ = postHookFunc(retVal___, setting);
@@ -8755,11 +8755,11 @@ int HP_libconfig_setting_lookup_int(const struct config_setting_t *setting, cons
}
return retVal___;
}
-int HP_libconfig_setting_lookup_int64(const struct config_setting_t *setting, const char *name, long long *value) {
+int HP_libconfig_setting_lookup_int64(const struct config_setting_t *setting, const char *name, int64 *value) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_libconfig_setting_lookup_int64_pre ) {
- int (*preHookFunc) (const struct config_setting_t **setting, const char **name, long long **value);
+ int (*preHookFunc) (const struct config_setting_t **setting, const char **name, int64 **value);
*HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_int64_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_int64_pre[hIndex].func;
@@ -8774,7 +8774,7 @@ int HP_libconfig_setting_lookup_int64(const struct config_setting_t *setting, co
retVal___ = HPMHooks.source.libconfig.setting_lookup_int64(setting, name, value);
}
if( HPMHooks.count.HP_libconfig_setting_lookup_int64_post ) {
- int (*postHookFunc) (int retVal___, const struct config_setting_t *setting, const char *name, long long *value);
+ int (*postHookFunc) (int retVal___, const struct config_setting_t *setting, const char *name, int64 *value);
for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_int64_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_int64_post[hIndex].func;
retVal___ = postHookFunc(retVal___, setting, name, value);
@@ -8890,11 +8890,11 @@ int HP_libconfig_setting_set_int(struct config_setting_t *setting, int value) {
}
return retVal___;
}
-int HP_libconfig_setting_set_int64(struct config_setting_t *setting, long long value) {
+int HP_libconfig_setting_set_int64(struct config_setting_t *setting, int64 value) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_libconfig_setting_set_int64_pre ) {
- int (*preHookFunc) (struct config_setting_t **setting, long long *value);
+ int (*preHookFunc) (struct config_setting_t **setting, int64 *value);
*HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_int64_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_libconfig_setting_set_int64_pre[hIndex].func;
@@ -8909,7 +8909,7 @@ int HP_libconfig_setting_set_int64(struct config_setting_t *setting, long long v
retVal___ = HPMHooks.source.libconfig.setting_set_int64(setting, value);
}
if( HPMHooks.count.HP_libconfig_setting_set_int64_post ) {
- int (*postHookFunc) (int retVal___, struct config_setting_t *setting, long long value);
+ int (*postHookFunc) (int retVal___, struct config_setting_t *setting, int64 value);
for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_int64_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_libconfig_setting_set_int64_post[hIndex].func;
retVal___ = postHookFunc(retVal___, setting, value);
@@ -9079,11 +9079,11 @@ int HP_libconfig_setting_get_int_elem(const struct config_setting_t *setting, in
}
return retVal___;
}
-long long HP_libconfig_setting_get_int64_elem(const struct config_setting_t *setting, int idx) {
+int64 HP_libconfig_setting_get_int64_elem(const struct config_setting_t *setting, int idx) {
int hIndex = 0;
- long long retVal___ = 0;
+ int64 retVal___ = 0;
if( HPMHooks.count.HP_libconfig_setting_get_int64_elem_pre ) {
- long long (*preHookFunc) (const struct config_setting_t **setting, int *idx);
+ int64 (*preHookFunc) (const struct config_setting_t **setting, int *idx);
*HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int64_elem_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_libconfig_setting_get_int64_elem_pre[hIndex].func;
@@ -9098,7 +9098,7 @@ long long HP_libconfig_setting_get_int64_elem(const struct config_setting_t *set
retVal___ = HPMHooks.source.libconfig.setting_get_int64_elem(setting, idx);
}
if( HPMHooks.count.HP_libconfig_setting_get_int64_elem_post ) {
- long long (*postHookFunc) (long long retVal___, const struct config_setting_t *setting, int idx);
+ int64 (*postHookFunc) (int64 retVal___, const struct config_setting_t *setting, int idx);
for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int64_elem_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_libconfig_setting_get_int64_elem_post[hIndex].func;
retVal___ = postHookFunc(retVal___, setting, idx);
@@ -9214,11 +9214,11 @@ struct config_setting_t* HP_libconfig_setting_set_int_elem(struct config_setting
}
return retVal___;
}
-struct config_setting_t* HP_libconfig_setting_set_int64_elem(struct config_setting_t *setting, int idx, long long value) {
+struct config_setting_t* HP_libconfig_setting_set_int64_elem(struct config_setting_t *setting, int idx, int64 value) {
int hIndex = 0;
struct config_setting_t* retVal___ = NULL;
if( HPMHooks.count.HP_libconfig_setting_set_int64_elem_pre ) {
- struct config_setting_t* (*preHookFunc) (struct config_setting_t **setting, int *idx, long long *value);
+ struct config_setting_t* (*preHookFunc) (struct config_setting_t **setting, int *idx, int64 *value);
*HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_int64_elem_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_libconfig_setting_set_int64_elem_pre[hIndex].func;
@@ -9233,7 +9233,7 @@ struct config_setting_t* HP_libconfig_setting_set_int64_elem(struct config_setti
retVal___ = HPMHooks.source.libconfig.setting_set_int64_elem(setting, idx, value);
}
if( HPMHooks.count.HP_libconfig_setting_set_int64_elem_post ) {
- struct config_setting_t* (*postHookFunc) (struct config_setting_t* retVal___, struct config_setting_t *setting, int idx, long long value);
+ struct config_setting_t* (*postHookFunc) (struct config_setting_t* retVal___, struct config_setting_t *setting, int idx, int64 value);
for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_int64_elem_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_libconfig_setting_set_int64_elem_post[hIndex].func;
retVal___ = postHookFunc(retVal___, setting, idx, value);
@@ -9591,11 +9591,11 @@ int HP_libconfig_lookup_int(const struct config_t *config, const char *filepath,
}
return retVal___;
}
-int HP_libconfig_lookup_int64(const struct config_t *config, const char *filepath, long long *value) {
+int HP_libconfig_lookup_int64(const struct config_t *config, const char *filepath, int64 *value) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_libconfig_lookup_int64_pre ) {
- int (*preHookFunc) (const struct config_t **config, const char **filepath, long long **value);
+ int (*preHookFunc) (const struct config_t **config, const char **filepath, int64 **value);
*HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_int64_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_libconfig_lookup_int64_pre[hIndex].func;
@@ -9610,7 +9610,7 @@ int HP_libconfig_lookup_int64(const struct config_t *config, const char *filepat
retVal___ = HPMHooks.source.libconfig.lookup_int64(config, filepath, value);
}
if( HPMHooks.count.HP_libconfig_lookup_int64_post ) {
- int (*postHookFunc) (int retVal___, const struct config_t *config, const char *filepath, long long *value);
+ int (*postHookFunc) (int retVal___, const struct config_t *config, const char *filepath, int64 *value);
for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_int64_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_libconfig_lookup_int64_post[hIndex].func;
retVal___ = postHookFunc(retVal___, config, filepath, value);
diff --git a/src/plugins/HPMHooking/HPMHooking_login.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_login.Hooks.inc
index 097b4b283..b5fc0e70b 100644
--- a/src/plugins/HPMHooking/HPMHooking_login.Hooks.inc
+++ b/src/plugins/HPMHooking/HPMHooking_login.Hooks.inc
@@ -1899,11 +1899,11 @@ int HP_libconfig_setting_get_int(const struct config_setting_t *setting) {
}
return retVal___;
}
-long long HP_libconfig_setting_get_int64(const struct config_setting_t *setting) {
+int64 HP_libconfig_setting_get_int64(const struct config_setting_t *setting) {
int hIndex = 0;
- long long retVal___ = 0;
+ int64 retVal___ = 0;
if( HPMHooks.count.HP_libconfig_setting_get_int64_pre ) {
- long long (*preHookFunc) (const struct config_setting_t **setting);
+ int64 (*preHookFunc) (const struct config_setting_t **setting);
*HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int64_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_libconfig_setting_get_int64_pre[hIndex].func;
@@ -1918,7 +1918,7 @@ long long HP_libconfig_setting_get_int64(const struct config_setting_t *setting)
retVal___ = HPMHooks.source.libconfig.setting_get_int64(setting);
}
if( HPMHooks.count.HP_libconfig_setting_get_int64_post ) {
- long long (*postHookFunc) (long long retVal___, const struct config_setting_t *setting);
+ int64 (*postHookFunc) (int64 retVal___, const struct config_setting_t *setting);
for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int64_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_libconfig_setting_get_int64_post[hIndex].func;
retVal___ = postHookFunc(retVal___, setting);
@@ -2061,11 +2061,11 @@ int HP_libconfig_setting_lookup_int(const struct config_setting_t *setting, cons
}
return retVal___;
}
-int HP_libconfig_setting_lookup_int64(const struct config_setting_t *setting, const char *name, long long *value) {
+int HP_libconfig_setting_lookup_int64(const struct config_setting_t *setting, const char *name, int64 *value) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_libconfig_setting_lookup_int64_pre ) {
- int (*preHookFunc) (const struct config_setting_t **setting, const char **name, long long **value);
+ int (*preHookFunc) (const struct config_setting_t **setting, const char **name, int64 **value);
*HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_int64_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_int64_pre[hIndex].func;
@@ -2080,7 +2080,7 @@ int HP_libconfig_setting_lookup_int64(const struct config_setting_t *setting, co
retVal___ = HPMHooks.source.libconfig.setting_lookup_int64(setting, name, value);
}
if( HPMHooks.count.HP_libconfig_setting_lookup_int64_post ) {
- int (*postHookFunc) (int retVal___, const struct config_setting_t *setting, const char *name, long long *value);
+ int (*postHookFunc) (int retVal___, const struct config_setting_t *setting, const char *name, int64 *value);
for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_int64_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_int64_post[hIndex].func;
retVal___ = postHookFunc(retVal___, setting, name, value);
@@ -2196,11 +2196,11 @@ int HP_libconfig_setting_set_int(struct config_setting_t *setting, int value) {
}
return retVal___;
}
-int HP_libconfig_setting_set_int64(struct config_setting_t *setting, long long value) {
+int HP_libconfig_setting_set_int64(struct config_setting_t *setting, int64 value) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_libconfig_setting_set_int64_pre ) {
- int (*preHookFunc) (struct config_setting_t **setting, long long *value);
+ int (*preHookFunc) (struct config_setting_t **setting, int64 *value);
*HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_int64_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_libconfig_setting_set_int64_pre[hIndex].func;
@@ -2215,7 +2215,7 @@ int HP_libconfig_setting_set_int64(struct config_setting_t *setting, long long v
retVal___ = HPMHooks.source.libconfig.setting_set_int64(setting, value);
}
if( HPMHooks.count.HP_libconfig_setting_set_int64_post ) {
- int (*postHookFunc) (int retVal___, struct config_setting_t *setting, long long value);
+ int (*postHookFunc) (int retVal___, struct config_setting_t *setting, int64 value);
for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_int64_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_libconfig_setting_set_int64_post[hIndex].func;
retVal___ = postHookFunc(retVal___, setting, value);
@@ -2385,11 +2385,11 @@ int HP_libconfig_setting_get_int_elem(const struct config_setting_t *setting, in
}
return retVal___;
}
-long long HP_libconfig_setting_get_int64_elem(const struct config_setting_t *setting, int idx) {
+int64 HP_libconfig_setting_get_int64_elem(const struct config_setting_t *setting, int idx) {
int hIndex = 0;
- long long retVal___ = 0;
+ int64 retVal___ = 0;
if( HPMHooks.count.HP_libconfig_setting_get_int64_elem_pre ) {
- long long (*preHookFunc) (const struct config_setting_t **setting, int *idx);
+ int64 (*preHookFunc) (const struct config_setting_t **setting, int *idx);
*HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int64_elem_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_libconfig_setting_get_int64_elem_pre[hIndex].func;
@@ -2404,7 +2404,7 @@ long long HP_libconfig_setting_get_int64_elem(const struct config_setting_t *set
retVal___ = HPMHooks.source.libconfig.setting_get_int64_elem(setting, idx);
}
if( HPMHooks.count.HP_libconfig_setting_get_int64_elem_post ) {
- long long (*postHookFunc) (long long retVal___, const struct config_setting_t *setting, int idx);
+ int64 (*postHookFunc) (int64 retVal___, const struct config_setting_t *setting, int idx);
for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int64_elem_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_libconfig_setting_get_int64_elem_post[hIndex].func;
retVal___ = postHookFunc(retVal___, setting, idx);
@@ -2520,11 +2520,11 @@ struct config_setting_t* HP_libconfig_setting_set_int_elem(struct config_setting
}
return retVal___;
}
-struct config_setting_t* HP_libconfig_setting_set_int64_elem(struct config_setting_t *setting, int idx, long long value) {
+struct config_setting_t* HP_libconfig_setting_set_int64_elem(struct config_setting_t *setting, int idx, int64 value) {
int hIndex = 0;
struct config_setting_t* retVal___ = NULL;
if( HPMHooks.count.HP_libconfig_setting_set_int64_elem_pre ) {
- struct config_setting_t* (*preHookFunc) (struct config_setting_t **setting, int *idx, long long *value);
+ struct config_setting_t* (*preHookFunc) (struct config_setting_t **setting, int *idx, int64 *value);
*HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_int64_elem_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_libconfig_setting_set_int64_elem_pre[hIndex].func;
@@ -2539,7 +2539,7 @@ struct config_setting_t* HP_libconfig_setting_set_int64_elem(struct config_setti
retVal___ = HPMHooks.source.libconfig.setting_set_int64_elem(setting, idx, value);
}
if( HPMHooks.count.HP_libconfig_setting_set_int64_elem_post ) {
- struct config_setting_t* (*postHookFunc) (struct config_setting_t* retVal___, struct config_setting_t *setting, int idx, long long value);
+ struct config_setting_t* (*postHookFunc) (struct config_setting_t* retVal___, struct config_setting_t *setting, int idx, int64 value);
for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_int64_elem_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_libconfig_setting_set_int64_elem_post[hIndex].func;
retVal___ = postHookFunc(retVal___, setting, idx, value);
@@ -2897,11 +2897,11 @@ int HP_libconfig_lookup_int(const struct config_t *config, const char *filepath,
}
return retVal___;
}
-int HP_libconfig_lookup_int64(const struct config_t *config, const char *filepath, long long *value) {
+int HP_libconfig_lookup_int64(const struct config_t *config, const char *filepath, int64 *value) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_libconfig_lookup_int64_pre ) {
- int (*preHookFunc) (const struct config_t **config, const char **filepath, long long **value);
+ int (*preHookFunc) (const struct config_t **config, const char **filepath, int64 **value);
*HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_int64_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_libconfig_lookup_int64_pre[hIndex].func;
@@ -2916,7 +2916,7 @@ int HP_libconfig_lookup_int64(const struct config_t *config, const char *filepat
retVal___ = HPMHooks.source.libconfig.lookup_int64(config, filepath, value);
}
if( HPMHooks.count.HP_libconfig_lookup_int64_post ) {
- int (*postHookFunc) (int retVal___, const struct config_t *config, const char *filepath, long long *value);
+ int (*postHookFunc) (int retVal___, const struct config_t *config, const char *filepath, int64 *value);
for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_int64_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_libconfig_lookup_int64_post[hIndex].func;
retVal___ = postHookFunc(retVal___, config, filepath, value);
diff --git a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
index acf554d12..7b8fac984 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
@@ -36972,11 +36972,11 @@ int HP_libconfig_setting_get_int(const struct config_setting_t *setting) {
}
return retVal___;
}
-long long HP_libconfig_setting_get_int64(const struct config_setting_t *setting) {
+int64 HP_libconfig_setting_get_int64(const struct config_setting_t *setting) {
int hIndex = 0;
- long long retVal___ = 0;
+ int64 retVal___ = 0;
if( HPMHooks.count.HP_libconfig_setting_get_int64_pre ) {
- long long (*preHookFunc) (const struct config_setting_t **setting);
+ int64 (*preHookFunc) (const struct config_setting_t **setting);
*HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int64_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_libconfig_setting_get_int64_pre[hIndex].func;
@@ -36991,7 +36991,7 @@ long long HP_libconfig_setting_get_int64(const struct config_setting_t *setting)
retVal___ = HPMHooks.source.libconfig.setting_get_int64(setting);
}
if( HPMHooks.count.HP_libconfig_setting_get_int64_post ) {
- long long (*postHookFunc) (long long retVal___, const struct config_setting_t *setting);
+ int64 (*postHookFunc) (int64 retVal___, const struct config_setting_t *setting);
for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int64_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_libconfig_setting_get_int64_post[hIndex].func;
retVal___ = postHookFunc(retVal___, setting);
@@ -37134,11 +37134,11 @@ int HP_libconfig_setting_lookup_int(const struct config_setting_t *setting, cons
}
return retVal___;
}
-int HP_libconfig_setting_lookup_int64(const struct config_setting_t *setting, const char *name, long long *value) {
+int HP_libconfig_setting_lookup_int64(const struct config_setting_t *setting, const char *name, int64 *value) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_libconfig_setting_lookup_int64_pre ) {
- int (*preHookFunc) (const struct config_setting_t **setting, const char **name, long long **value);
+ int (*preHookFunc) (const struct config_setting_t **setting, const char **name, int64 **value);
*HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_int64_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_int64_pre[hIndex].func;
@@ -37153,7 +37153,7 @@ int HP_libconfig_setting_lookup_int64(const struct config_setting_t *setting, co
retVal___ = HPMHooks.source.libconfig.setting_lookup_int64(setting, name, value);
}
if( HPMHooks.count.HP_libconfig_setting_lookup_int64_post ) {
- int (*postHookFunc) (int retVal___, const struct config_setting_t *setting, const char *name, long long *value);
+ int (*postHookFunc) (int retVal___, const struct config_setting_t *setting, const char *name, int64 *value);
for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_int64_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_int64_post[hIndex].func;
retVal___ = postHookFunc(retVal___, setting, name, value);
@@ -37269,11 +37269,11 @@ int HP_libconfig_setting_set_int(struct config_setting_t *setting, int value) {
}
return retVal___;
}
-int HP_libconfig_setting_set_int64(struct config_setting_t *setting, long long value) {
+int HP_libconfig_setting_set_int64(struct config_setting_t *setting, int64 value) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_libconfig_setting_set_int64_pre ) {
- int (*preHookFunc) (struct config_setting_t **setting, long long *value);
+ int (*preHookFunc) (struct config_setting_t **setting, int64 *value);
*HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_int64_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_libconfig_setting_set_int64_pre[hIndex].func;
@@ -37288,7 +37288,7 @@ int HP_libconfig_setting_set_int64(struct config_setting_t *setting, long long v
retVal___ = HPMHooks.source.libconfig.setting_set_int64(setting, value);
}
if( HPMHooks.count.HP_libconfig_setting_set_int64_post ) {
- int (*postHookFunc) (int retVal___, struct config_setting_t *setting, long long value);
+ int (*postHookFunc) (int retVal___, struct config_setting_t *setting, int64 value);
for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_int64_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_libconfig_setting_set_int64_post[hIndex].func;
retVal___ = postHookFunc(retVal___, setting, value);
@@ -37458,11 +37458,11 @@ int HP_libconfig_setting_get_int_elem(const struct config_setting_t *setting, in
}
return retVal___;
}
-long long HP_libconfig_setting_get_int64_elem(const struct config_setting_t *setting, int idx) {
+int64 HP_libconfig_setting_get_int64_elem(const struct config_setting_t *setting, int idx) {
int hIndex = 0;
- long long retVal___ = 0;
+ int64 retVal___ = 0;
if( HPMHooks.count.HP_libconfig_setting_get_int64_elem_pre ) {
- long long (*preHookFunc) (const struct config_setting_t **setting, int *idx);
+ int64 (*preHookFunc) (const struct config_setting_t **setting, int *idx);
*HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int64_elem_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_libconfig_setting_get_int64_elem_pre[hIndex].func;
@@ -37477,7 +37477,7 @@ long long HP_libconfig_setting_get_int64_elem(const struct config_setting_t *set
retVal___ = HPMHooks.source.libconfig.setting_get_int64_elem(setting, idx);
}
if( HPMHooks.count.HP_libconfig_setting_get_int64_elem_post ) {
- long long (*postHookFunc) (long long retVal___, const struct config_setting_t *setting, int idx);
+ int64 (*postHookFunc) (int64 retVal___, const struct config_setting_t *setting, int idx);
for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int64_elem_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_libconfig_setting_get_int64_elem_post[hIndex].func;
retVal___ = postHookFunc(retVal___, setting, idx);
@@ -37593,11 +37593,11 @@ struct config_setting_t* HP_libconfig_setting_set_int_elem(struct config_setting
}
return retVal___;
}
-struct config_setting_t* HP_libconfig_setting_set_int64_elem(struct config_setting_t *setting, int idx, long long value) {
+struct config_setting_t* HP_libconfig_setting_set_int64_elem(struct config_setting_t *setting, int idx, int64 value) {
int hIndex = 0;
struct config_setting_t* retVal___ = NULL;
if( HPMHooks.count.HP_libconfig_setting_set_int64_elem_pre ) {
- struct config_setting_t* (*preHookFunc) (struct config_setting_t **setting, int *idx, long long *value);
+ struct config_setting_t* (*preHookFunc) (struct config_setting_t **setting, int *idx, int64 *value);
*HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_int64_elem_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_libconfig_setting_set_int64_elem_pre[hIndex].func;
@@ -37612,7 +37612,7 @@ struct config_setting_t* HP_libconfig_setting_set_int64_elem(struct config_setti
retVal___ = HPMHooks.source.libconfig.setting_set_int64_elem(setting, idx, value);
}
if( HPMHooks.count.HP_libconfig_setting_set_int64_elem_post ) {
- struct config_setting_t* (*postHookFunc) (struct config_setting_t* retVal___, struct config_setting_t *setting, int idx, long long value);
+ struct config_setting_t* (*postHookFunc) (struct config_setting_t* retVal___, struct config_setting_t *setting, int idx, int64 value);
for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_int64_elem_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_libconfig_setting_set_int64_elem_post[hIndex].func;
retVal___ = postHookFunc(retVal___, setting, idx, value);
@@ -37970,11 +37970,11 @@ int HP_libconfig_lookup_int(const struct config_t *config, const char *filepath,
}
return retVal___;
}
-int HP_libconfig_lookup_int64(const struct config_t *config, const char *filepath, long long *value) {
+int HP_libconfig_lookup_int64(const struct config_t *config, const char *filepath, int64 *value) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_libconfig_lookup_int64_pre ) {
- int (*preHookFunc) (const struct config_t **config, const char **filepath, long long **value);
+ int (*preHookFunc) (const struct config_t **config, const char **filepath, int64 **value);
*HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_int64_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_libconfig_lookup_int64_pre[hIndex].func;
@@ -37989,7 +37989,7 @@ int HP_libconfig_lookup_int64(const struct config_t *config, const char *filepat
retVal___ = HPMHooks.source.libconfig.lookup_int64(config, filepath, value);
}
if( HPMHooks.count.HP_libconfig_lookup_int64_post ) {
- int (*postHookFunc) (int retVal___, const struct config_t *config, const char *filepath, long long *value);
+ int (*postHookFunc) (int retVal___, const struct config_t *config, const char *filepath, int64 *value);
for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_int64_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_libconfig_lookup_int64_post[hIndex].func;
retVal___ = postHookFunc(retVal___, config, filepath, value);
diff --git a/src/test/Makefile.in b/src/test/Makefile.in
index c8006e5cf..3e7549943 100644
--- a/src/test/Makefile.in
+++ b/src/test/Makefile.in
@@ -87,8 +87,8 @@ $(TESTS_ALL): test_%: ../../test_%@EXEEXT@
../../test_%@EXEEXT@: obj/test_%.o $(TEST_DEPENDS) Makefile
@echo " LD $(notdir $@)"
- @$(CC) @STATIC@ @LDFLAGS@ -o $@ $< $(COMMON_D)/obj_sql/common_sql.a \
- $(COMMON_D)/obj_all/common.a $(MT19937AR_OBJ) $(LIBCONFIG_OBJ) @LIBS@ @MYSQL_LIBS@
+ @$(CC) @STATIC@ @LDFLAGS@ -o $@ $< $(COMMON_D)/obj_all/common.a $(COMMON_D)/obj_sql/common_sql.a \
+ $(MT19937AR_OBJ) $(LIBCONFIG_OBJ) @LIBS@ @MYSQL_LIBS@
# object files
diff --git a/src/test/test_libconfig.c b/src/test/test_libconfig.c
index e0a470e21..639cf64e8 100644
--- a/src/test/test_libconfig.c
+++ b/src/test/test_libconfig.c
@@ -86,6 +86,8 @@ static const char *test_libconfig_init_destroy(void)
static const char *test_libconfig_read_file_src(void)
{
struct config_t config;
+ libconfig->init(&config);
+
#define FILENAME "src/test/libconfig/test.conf"
if (libconfig->read_file_src(&config, FILENAME) == CONFIG_FALSE) {
libconfig->destroy(&config);
@@ -108,6 +110,9 @@ static const char *test_libconfig_read(void)
if (!fp) {
return "File not found: '" FILENAME "'.";
}
+
+ libconfig->init(&config);
+
if (libconfig->read(&config, fp) == CONFIG_FALSE) {
fclose(fp);
libconfig->destroy(&config);
@@ -154,6 +159,8 @@ static const char *test_libconfig_write_file(void)
static const char *test_libconfig_read_string(void)
{
struct config_t config;
+ libconfig->init(&config);
+
if (libconfig->read_string(&config, "") == CONFIG_FALSE) {
libconfig->destroy(&config);
return "Unable to read from string.";
@@ -180,6 +187,8 @@ static const char *test_libconfig_syntax(void)
"Setting_List: ( );\n"
"/* End test file */\n";
+ libconfig->init(&config);
+
if (libconfig->read_string(&config, input) == CONFIG_FALSE) {
libconfig->destroy(&config);
return "Unable to read from string.";
@@ -216,6 +225,8 @@ static const char *test_libconfig_lookup(void)
"Setting_List: ( );\n"
"/* End test file */\n";
+ libconfig->init(&config);
+
if (libconfig->read_string(&config, input) == CONFIG_FALSE) {
libconfig->destroy(&config);
return "Unable to parse configuration.";
@@ -278,6 +289,8 @@ static const char *test_libconfig_setting_get(void)
"Setting_List: ( );\n"
"/* End test file */\n";
+ libconfig->init(&config);
+
if (libconfig->read_string(&config, input) == CONFIG_FALSE) {
libconfig->destroy(&config);
return "Unable to parse configuration.";
@@ -366,8 +379,8 @@ static const char *test_libconfig_setting_get(void)
static const char *test_libconfig_set(void)
{
- //int (*setting_set_int) (struct config_setting_t *setting ,int value);
- //int (*setting_set_int64) (struct config_setting_t *setting, long long value);
+ //int (*setting_set_int) (struct config_setting_t *setting, int value);
+ //int (*setting_set_int64) (struct config_setting_t *setting, int64 value);
//int (*setting_set_float) (struct config_setting_t *setting, double value);
//int (*setting_set_bool) (struct config_setting_t *setting, int value);
//int (*setting_set_string) (struct config_setting_t *setting, const char *value);
@@ -392,6 +405,8 @@ static const char *test_libconfig_setting_lookup(void)
"Setting_List: ( );\n"
"/* End test file */\n";
+ libconfig->init(&config);
+
if (libconfig->read_string(&config, input) == CONFIG_FALSE) {
libconfig->destroy(&config);
return "Unable to parse configuration.";
@@ -442,6 +457,8 @@ static const char *test_libconfig_setting_types(void)
"Setting_List: ( );\n"
"/* End test file */\n";
+ libconfig->init(&config);
+
if (libconfig->read_string(&config, input) == CONFIG_FALSE) {
libconfig->destroy(&config);
return "Unable to parse configuration.";
@@ -536,6 +553,8 @@ static const char *test_libconfig_values(void)
"Setting_IntSignedMax: 0x7fffffff;\n"
"/* End test file */\n";
+ libconfig->init(&config);
+
if (libconfig->read_string(&config, input) == CONFIG_FALSE) {
libconfig->destroy(&config);
return "Unable to parse configuration.";
@@ -599,6 +618,9 @@ static const char *test_libconfig_path_lookup(void)
" 10,\n"
");\n"
"/* End test file */\n";
+
+ libconfig->init(&config);
+
if (libconfig->read_string(&config, input) == CONFIG_FALSE) {
libconfig->destroy(&config);
return "Unable to parse configuration.";
@@ -683,6 +705,9 @@ static const char *test_libconfig_setting_names(void)
"};\n"
"1st_setting_with_numbers: 5;\n"
"/* End test file */\n";
+
+ libconfig->init(&config);
+
if (libconfig->read_string(&config, input) == CONFIG_FALSE) {
libconfig->destroy(&config);
return "Unable to parse configuration.";
@@ -736,6 +761,9 @@ static const char *test_libconfig_duplicate_keys(void)
" Duplicate: 4;\n"
"};\n"
"/* End test file */\n";
+
+ libconfig->init(&config);
+
if (libconfig->read_string(&config, input) == CONFIG_FALSE) {
libconfig->destroy(&config);
return "Unable to parse configuration.";
@@ -780,6 +808,9 @@ static const char *test_libconfig_special_string_syntax(void)
const char *input = "/* Test File */\n"
"SpecialString: <\"This is an \"Item_Script\" Special String\n\tWith a line-break inside.\">;\n"
"/* End test file */\n";
+
+ libconfig->init(&config);
+
if (libconfig->read_string(&config, input) == CONFIG_FALSE) {
libconfig->destroy(&config);
return "Unable to parse configuration.";
@@ -818,7 +849,7 @@ int do_init(int argc, char **argv)
//int (*setting_set_format) (struct config_setting_t *setting, short format);
//short (*setting_get_format) (const struct config_setting_t *setting);
//struct config_setting_t * (*setting_set_int_elem) (struct config_setting_t *setting, int idx, int value);
- //struct config_setting_t * (*setting_set_int64_elem) (struct config_setting_t *setting, int idx, long long value);
+ //struct config_setting_t * (*setting_set_int64_elem) (struct config_setting_t *setting, int idx, int64 value);
//struct config_setting_t * (*setting_set_float_elem) (struct config_setting_t *setting, int idx, double value);
//struct config_setting_t * (*setting_set_bool_elem) (struct config_setting_t *setting, int idx, int value);
//struct config_setting_t * (*setting_set_string_elem) (struct config_setting_t *setting, int idx, const char *value);
diff --git a/src/test/test_spinlock.c b/src/test/test_spinlock.c
index 27d742cd1..1c0390d66 100644
--- a/src/test/test_spinlock.c
+++ b/src/test/test_spinlock.c
@@ -81,6 +81,7 @@ int do_init(int argc, char **argv)
for(i =0; i < THRC; i++){
t[i] = thread->create_opt(worker, NULL, 1024*512, THREADPRIO_NORMAL);
}
+ (void)t;
while(1){
if(InterlockedCompareExchange(&done_threads, THRC, THRC) == THRC)
@@ -100,14 +101,13 @@ int do_init(int argc, char **argv)
}
- if(ok != LOOPS){
+ if (ok != LOOPS) {
ShowFatalError("Test failed.\n");
exit(1);
- }else{
- ShowStatus("Test passed.\n");
- exit(0);
}
- return 0;
+
+ core->runflag = CORE_ST_STOP;
+ return EXIT_SUCCESS;
}//end: do_init()
void do_abort(void) {
@@ -118,6 +118,8 @@ void set_server_type(void) {
}//end: set_server_type()
int do_final(void) {
+ ShowStatus("Test passed.\n");
+
return EXIT_SUCCESS;
}//end: do_final()
diff --git a/src/tool/Makefile.in b/src/tool/Makefile.in
index eb1362780..6e8643c56 100644
--- a/src/tool/Makefile.in
+++ b/src/tool/Makefile.in
@@ -39,7 +39,7 @@ LIBCONFIG_H = $(addprefix $(LIBCONFIG_D)/, libconfig.h grammar.h parsectx.h \
MAPCACHE_OBJ = obj_all/mapcache.o
MAPCACHE_C = mapcache.c
MAPCACHE_H =
-MAPCACHE_DEPENDS = $(MAPCACHE_OBJ) $(COMMON_D)/obj_all/common_mini.a $(LIBCONFIG_OBJ $(SYSINFO_INC))
+MAPCACHE_DEPENDS = $(MAPCACHE_OBJ) $(COMMON_D)/obj_all/common_mini.a $(LIBCONFIG_OBJ) $(SYSINFO_INC)
@SET_MAKE@
@@ -55,7 +55,7 @@ mapcache: ../../mapcache@EXEEXT@
../../mapcache@EXEEXT@: $(MAPCACHE_DEPENDS) Makefile
@echo " LD $(notdir $@)"
- @$(CC) @STATIC@ @LDFLAGS@ -o ../../mapcache@EXEEXT@ $(MAPCACHE_DEPENDS) @LIBS@
+ @$(CC) @STATIC@ @LDFLAGS@ -o ../../mapcache@EXEEXT@ $(MAPCACHE_OBJ) $(COMMON_D)/obj_all/common_mini.a $(LIBCONFIG_OBJ) @LIBS@
buildclean:
@echo " CLEAN tool (build temp files)"
diff --git a/tools/ci/travis.sh b/tools/ci/travis.sh
index db1ea5315..9a6322df6 100755
--- a/tools/ci/travis.sh
+++ b/tools/ci/travis.sh
@@ -62,6 +62,24 @@ function run_server {
fi
}
+function run_test {
+ echo "Running: test_$1"
+ ./test_$1 2>runlog.txt
+ export errcode=$?
+ export teststr=$(cat runlog.txt)
+ if [[ -n "${teststr}" ]]; then
+ echo "Errors found in running test $1."
+ cat runlog.txt
+ aborterror "Errors found in running test $1."
+ else
+ echo "No errors found for test $1."
+ fi
+ if [ ${errcode} -ne 0 ]; then
+ echo "test $1 terminated with exit code ${errcode}"
+ aborterror "Test failed"
+ fi
+}
+
# Defaults
DBNAME=ragnarok
DBUSER=ragnarok
@@ -105,6 +123,7 @@ case "$MODE" in
make -j3 || aborterror "Build failed."
make plugins -j3 || aborterror "Build failed."
make plugin.script_mapquit -j3 || aborterror "Build failed."
+ make test || aborterror "Build failed."
;;
test)
cat > conf/travis_sql_connection.conf << EOF
@@ -153,6 +172,9 @@ EOF
ARGS="--load-script npc/dev/test.txt "
ARGS="--load-plugin script_mapquit $ARGS --load-script npc/dev/ci_test.txt"
PLUGINS="--load-plugin HPMHooking --load-plugin sample"
+ echo "run tests"
+ # run_test spinlock # Not running the spinlock test for the time being (too time consuming)
+ run_test libconfig
echo "run all servers without HPM"
run_server ./login-server
run_server ./char-server