diff options
| author | Martin Jansa <martin.jansa@gmail.com> | 2024-11-04 15:59:21 +0100 |
|---|---|---|
| committer | Steve Sakoman <steve@sakoman.com> | 2024-11-11 06:19:18 -0800 |
| commit | 4a9e116da8b3dc2692c7e96d272fd2c839ffde49 (patch) | |
| tree | baa720e6ebe6934ec4de4e2644dadb2c7a508b80 | |
| parent | d2067f7c272bb338140abdbb835734d4ace59f27 (diff) | |
| download | poky-4a9e116da8b3dc2692c7e96d272fd2c839ffde49.tar.gz | |
xmlto: backport a patch to fix build with gcc-14 on host
* need to add dependency on flex-native because now when the
.l file is modified by the .patch file it will try to regenerate
the c code and fail:
| make[1]: Entering directory 'work/x86_64-linux/xmlto-native/0.0.28-r0/build'
| /bin/bash ../xmlto-0.0.28/ylwrap ../xmlto-0.0.28/xmlif/xmlif.l .c xmlif/xmlif.c -- /bin/bash 'work/x86_64-linux/xmlto-native/0.0.28-r0/xmlto-0.0.28/missing' flex
| work/x86_64-linux/xmlto-native/0.0.28-r0/xmlto-0.0.28/missing: line 81: flex: command not found
| WARNING: 'flex' is missing on your system.
| You should only need it if you modified a '.l' file.
| You may want to install the Fast Lexical Analyzer package:
| <https://github.com/westes/flex>
* backport
https://pagure.io/xmlto/c/32376c053733c6c0ebaca3c25c0725509342fdf3?branch=master
as well, so that patched xmlif/xmlif.c is newer than xmlif/xmlif.l and the build
won't try to regenerate it with flex as that leads to random build failures reported
in:
https://lists.openembedded.org/g/openembedded-core/message/206412
https://errors.yoctoproject.org/Errors/Details/810853/
https://lists.openembedded.org/g/openembedded-core/message/206496
https://valkyrie.yoctoproject.org/#/builders/29/builds/355
(From OE-Core rev: 2e8819c0b9ada2b600aecc40c974a18eb7c0a666)
Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
4 files changed, 1344 insertions, 0 deletions
diff --git a/meta/recipes-devtools/xmlto/xmlto-0.0.28/0001-Fix-return-type-of-main-function.patch b/meta/recipes-devtools/xmlto/xmlto-0.0.28/0001-Fix-return-type-of-main-function.patch new file mode 100644 index 0000000000..f28f1fb56a --- /dev/null +++ b/meta/recipes-devtools/xmlto/xmlto-0.0.28/0001-Fix-return-type-of-main-function.patch | |||
| @@ -0,0 +1,42 @@ | |||
| 1 | From 6347e1b9da2140acdd55e3e7ac1199456793e17c Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Thomas Kuehne <thomas@kuehne.cn> | ||
| 3 | Date: Sat, 11 Dec 2021 20:56:00 +0000 | ||
| 4 | Subject: [PATCH] Fix return type of main function | ||
| 5 | MIME-Version: 1.0 | ||
| 6 | Content-Type: text/plain; charset=UTF-8 | ||
| 7 | Content-Transfer-Encoding: 8bit | ||
| 8 | |||
| 9 | Fixes: | ||
| 10 | xmlif/xmlif.l:242:1: warning: return type defaults to ‘int’ [-Wimplicit-int] | ||
| 11 | 242 | main(int argc, char *argv[]) | ||
| 12 | | ^~~~ | ||
| 13 | |||
| 14 | Signed-off-by: Thomas Kuehne <thomas@kuehne.cn> | ||
| 15 | Signed-off-by: Martin Jansa <martin.jansa@gmail.com> | ||
| 16 | Upstream-Status: Backport [v0.0.29 https://pagure.io/xmlto/c/8e34f087bf410bcc5fe445933d6ad9bae54f24b5?branch=master] | ||
| 17 | --- | ||
| 18 | xmlif/xmlif.l | 4 ++-- | ||
| 19 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
| 20 | |||
| 21 | diff --git a/xmlif/xmlif.l b/xmlif/xmlif.l | ||
| 22 | index ac42136..78a62bc 100644 | ||
| 23 | --- a/xmlif/xmlif.l | ||
| 24 | +++ b/xmlif/xmlif.l | ||
| 25 | @@ -239,7 +239,7 @@ WS [ \t\n]* | ||
| 26 | |||
| 27 | int yywrap() {exit(0);}; | ||
| 28 | |||
| 29 | -main(int argc, char *argv[]) | ||
| 30 | +int main(int argc, char *argv[]) | ||
| 31 | { | ||
| 32 | int i; | ||
| 33 | |||
| 34 | @@ -265,7 +265,7 @@ main(int argc, char *argv[]) | ||
| 35 | exit(1); | ||
| 36 | } | ||
| 37 | |||
| 38 | - yylex(); | ||
| 39 | + return yylex(); | ||
| 40 | } | ||
| 41 | |||
| 42 | /* | ||
diff --git a/meta/recipes-devtools/xmlto/xmlto-0.0.28/0001-Regenerate-the-xmlif.c-and-update-xmlif.l-to-comply-.patch b/meta/recipes-devtools/xmlto/xmlto-0.0.28/0001-Regenerate-the-xmlif.c-and-update-xmlif.l-to-comply-.patch new file mode 100644 index 0000000000..2e5344158c --- /dev/null +++ b/meta/recipes-devtools/xmlto/xmlto-0.0.28/0001-Regenerate-the-xmlif.c-and-update-xmlif.l-to-comply-.patch | |||
| @@ -0,0 +1,1259 @@ | |||
| 1 | From 32376c053733c6c0ebaca3c25c0725509342fdf3 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: =?UTF-8?q?Ond=C5=99ej=20Sloup?= <osloup@redhat.com> | ||
| 3 | Date: Thu, 11 Apr 2024 18:09:37 +0200 | ||
| 4 | Subject: [PATCH] Regenerate the xmlif.c and update xmlif.l to comply with the | ||
| 5 | new version of flex and gcc | ||
| 6 | |||
| 7 | Removes warnings in the build process | ||
| 8 | Signed-off-by: Martin Jansa <martin.jansa@gmail.com> | ||
| 9 | Upstream-Status: Backport [v0.0.29 https://pagure.io/xmlto/c/32376c053733c6c0ebaca3c25c0725509342fdf3?branch=master] | ||
| 10 | --- | ||
| 11 | xmlif/xmlif.c | 449 ++++++++++++++++++++++++++------------------------ | ||
| 12 | xmlif/xmlif.l | 2 +- | ||
| 13 | 2 files changed, 232 insertions(+), 219 deletions(-) | ||
| 14 | |||
| 15 | diff --git a/xmlif/xmlif.c b/xmlif/xmlif.c | ||
| 16 | index 50aa1bc..1b87a9e 100644 | ||
| 17 | --- a/xmlif/xmlif.c | ||
| 18 | +++ b/xmlif/xmlif.c | ||
| 19 | @@ -1,3 +1,4 @@ | ||
| 20 | +#line 1 "xmlif/xmlif.c" | ||
| 21 | |||
| 22 | #line 3 "xmlif/xmlif.c" | ||
| 23 | |||
| 24 | @@ -7,8 +8,8 @@ | ||
| 25 | |||
| 26 | #define FLEX_SCANNER | ||
| 27 | #define YY_FLEX_MAJOR_VERSION 2 | ||
| 28 | -#define YY_FLEX_MINOR_VERSION 5 | ||
| 29 | -#define YY_FLEX_SUBMINOR_VERSION 37 | ||
| 30 | +#define YY_FLEX_MINOR_VERSION 6 | ||
| 31 | +#define YY_FLEX_SUBMINOR_VERSION 4 | ||
| 32 | #if YY_FLEX_SUBMINOR_VERSION > 0 | ||
| 33 | #define FLEX_BETA | ||
| 34 | #endif | ||
| 35 | @@ -83,65 +84,61 @@ typedef unsigned int flex_uint32_t; | ||
| 36 | #define UINT32_MAX (4294967295U) | ||
| 37 | #endif | ||
| 38 | |||
| 39 | +#ifndef SIZE_MAX | ||
| 40 | +#define SIZE_MAX (~(size_t)0) | ||
| 41 | +#endif | ||
| 42 | + | ||
| 43 | #endif /* ! C99 */ | ||
| 44 | |||
| 45 | #endif /* ! FLEXINT_H */ | ||
| 46 | |||
| 47 | -#ifdef __cplusplus | ||
| 48 | - | ||
| 49 | -/* The "const" storage-class-modifier is valid. */ | ||
| 50 | -#define YY_USE_CONST | ||
| 51 | - | ||
| 52 | -#else /* ! __cplusplus */ | ||
| 53 | - | ||
| 54 | -/* C99 requires __STDC__ to be defined as 1. */ | ||
| 55 | -#if defined (__STDC__) | ||
| 56 | - | ||
| 57 | -#define YY_USE_CONST | ||
| 58 | - | ||
| 59 | -#endif /* defined (__STDC__) */ | ||
| 60 | -#endif /* ! __cplusplus */ | ||
| 61 | +/* begin standard C++ headers. */ | ||
| 62 | |||
| 63 | -#ifdef YY_USE_CONST | ||
| 64 | +/* TODO: this is always defined, so inline it */ | ||
| 65 | #define yyconst const | ||
| 66 | + | ||
| 67 | +#if defined(__GNUC__) && __GNUC__ >= 3 | ||
| 68 | +#define yynoreturn __attribute__((__noreturn__)) | ||
| 69 | #else | ||
| 70 | -#define yyconst | ||
| 71 | +#define yynoreturn | ||
| 72 | #endif | ||
| 73 | |||
| 74 | /* Returned upon end-of-file. */ | ||
| 75 | #define YY_NULL 0 | ||
| 76 | |||
| 77 | -/* Promotes a possibly negative, possibly signed char to an unsigned | ||
| 78 | - * integer for use as an array index. If the signed char is negative, | ||
| 79 | - * we want to instead treat it as an 8-bit unsigned char, hence the | ||
| 80 | - * double cast. | ||
| 81 | +/* Promotes a possibly negative, possibly signed char to an | ||
| 82 | + * integer in range [0..255] for use as an array index. | ||
| 83 | */ | ||
| 84 | -#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) | ||
| 85 | +#define YY_SC_TO_UI(c) ((YY_CHAR) (c)) | ||
| 86 | |||
| 87 | /* Enter a start condition. This macro really ought to take a parameter, | ||
| 88 | * but we do it the disgusting crufty way forced on us by the ()-less | ||
| 89 | * definition of BEGIN. | ||
| 90 | */ | ||
| 91 | #define BEGIN (yy_start) = 1 + 2 * | ||
| 92 | - | ||
| 93 | /* Translate the current start state into a value that can be later handed | ||
| 94 | * to BEGIN to return to the state. The YYSTATE alias is for lex | ||
| 95 | * compatibility. | ||
| 96 | */ | ||
| 97 | #define YY_START (((yy_start) - 1) / 2) | ||
| 98 | #define YYSTATE YY_START | ||
| 99 | - | ||
| 100 | /* Action number for EOF rule of a given start state. */ | ||
| 101 | #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) | ||
| 102 | - | ||
| 103 | /* Special action meaning "start processing a new file". */ | ||
| 104 | -#define YY_NEW_FILE yyrestart(yyin ) | ||
| 105 | - | ||
| 106 | +#define YY_NEW_FILE yyrestart( yyin ) | ||
| 107 | #define YY_END_OF_BUFFER_CHAR 0 | ||
| 108 | |||
| 109 | /* Size of default input buffer. */ | ||
| 110 | #ifndef YY_BUF_SIZE | ||
| 111 | +#ifdef __ia64__ | ||
| 112 | +/* On IA-64, the buffer size is 16k, not 8k. | ||
| 113 | + * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case. | ||
| 114 | + * Ditto for the __ia64__ case accordingly. | ||
| 115 | + */ | ||
| 116 | +#define YY_BUF_SIZE 32768 | ||
| 117 | +#else | ||
| 118 | #define YY_BUF_SIZE 16384 | ||
| 119 | +#endif /* __ia64__ */ | ||
| 120 | #endif | ||
| 121 | |||
| 122 | /* The state buf must be large enough to hold one state per character in the main buffer. | ||
| 123 | @@ -158,15 +155,16 @@ typedef struct yy_buffer_state *YY_BUFFER_STATE; | ||
| 124 | typedef size_t yy_size_t; | ||
| 125 | #endif | ||
| 126 | |||
| 127 | -extern yy_size_t yyleng; | ||
| 128 | +extern int yyleng; | ||
| 129 | |||
| 130 | extern FILE *yyin, *yyout; | ||
| 131 | |||
| 132 | #define EOB_ACT_CONTINUE_SCAN 0 | ||
| 133 | #define EOB_ACT_END_OF_FILE 1 | ||
| 134 | #define EOB_ACT_LAST_MATCH 2 | ||
| 135 | - | ||
| 136 | + | ||
| 137 | #define YY_LESS_LINENO(n) | ||
| 138 | + #define YY_LINENO_REWIND_TO(ptr) | ||
| 139 | |||
| 140 | /* Return all but the first "n" matched characters back to the input stream. */ | ||
| 141 | #define yyless(n) \ | ||
| 142 | @@ -181,7 +179,6 @@ extern FILE *yyin, *yyout; | ||
| 143 | YY_DO_BEFORE_ACTION; /* set up yytext again */ \ | ||
| 144 | } \ | ||
| 145 | while ( 0 ) | ||
| 146 | - | ||
| 147 | #define unput(c) yyunput( c, (yytext_ptr) ) | ||
| 148 | |||
| 149 | #ifndef YY_STRUCT_YY_BUFFER_STATE | ||
| 150 | @@ -196,12 +193,12 @@ struct yy_buffer_state | ||
| 151 | /* Size of input buffer in bytes, not including room for EOB | ||
| 152 | * characters. | ||
| 153 | */ | ||
| 154 | - yy_size_t yy_buf_size; | ||
| 155 | + int yy_buf_size; | ||
| 156 | |||
| 157 | /* Number of characters read into yy_ch_buf, not including EOB | ||
| 158 | * characters. | ||
| 159 | */ | ||
| 160 | - yy_size_t yy_n_chars; | ||
| 161 | + int yy_n_chars; | ||
| 162 | |||
| 163 | /* Whether we "own" the buffer - i.e., we know we created it, | ||
| 164 | * and can realloc() it to grow it, and should free() it to | ||
| 165 | @@ -224,7 +221,7 @@ struct yy_buffer_state | ||
| 166 | |||
| 167 | int yy_bs_lineno; /**< The line count. */ | ||
| 168 | int yy_bs_column; /**< The column count. */ | ||
| 169 | - | ||
| 170 | + | ||
| 171 | /* Whether to try to fill the input buffer when we reach the | ||
| 172 | * end of it. | ||
| 173 | */ | ||
| 174 | @@ -252,7 +249,7 @@ struct yy_buffer_state | ||
| 175 | /* Stack of input buffers. */ | ||
| 176 | static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */ | ||
| 177 | static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */ | ||
| 178 | -static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */ | ||
| 179 | +static YY_BUFFER_STATE * yy_buffer_stack = NULL; /**< Stack as an array. */ | ||
| 180 | |||
| 181 | /* We provide macros for accessing buffer states in case in the | ||
| 182 | * future we want to put the buffer states in a more general | ||
| 183 | @@ -263,7 +260,6 @@ static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */ | ||
| 184 | #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \ | ||
| 185 | ? (yy_buffer_stack)[(yy_buffer_stack_top)] \ | ||
| 186 | : NULL) | ||
| 187 | - | ||
| 188 | /* Same as previous macro, but useful when we know that the buffer stack is not | ||
| 189 | * NULL or when we need an lvalue. For internal use only. | ||
| 190 | */ | ||
| 191 | @@ -271,11 +267,11 @@ static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */ | ||
| 192 | |||
| 193 | /* yy_hold_char holds the character lost when yytext is formed. */ | ||
| 194 | static char yy_hold_char; | ||
| 195 | -static yy_size_t yy_n_chars; /* number of characters read into yy_ch_buf */ | ||
| 196 | -yy_size_t yyleng; | ||
| 197 | +static int yy_n_chars; /* number of characters read into yy_ch_buf */ | ||
| 198 | +int yyleng; | ||
| 199 | |||
| 200 | /* Points to current character in buffer. */ | ||
| 201 | -static char *yy_c_buf_p = (char *) 0; | ||
| 202 | +static char *yy_c_buf_p = NULL; | ||
| 203 | static int yy_init = 0; /* whether we need to initialize */ | ||
| 204 | static int yy_start = 0; /* start state number */ | ||
| 205 | |||
| 206 | @@ -284,82 +280,78 @@ static int yy_start = 0; /* start state number */ | ||
| 207 | */ | ||
| 208 | static int yy_did_buffer_switch_on_eof; | ||
| 209 | |||
| 210 | -void yyrestart (FILE *input_file ); | ||
| 211 | -void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ); | ||
| 212 | -YY_BUFFER_STATE yy_create_buffer (FILE *file,int size ); | ||
| 213 | -void yy_delete_buffer (YY_BUFFER_STATE b ); | ||
| 214 | -void yy_flush_buffer (YY_BUFFER_STATE b ); | ||
| 215 | -void yypush_buffer_state (YY_BUFFER_STATE new_buffer ); | ||
| 216 | -void yypop_buffer_state (void ); | ||
| 217 | - | ||
| 218 | -static void yyensure_buffer_stack (void ); | ||
| 219 | -static void yy_load_buffer_state (void ); | ||
| 220 | -static void yy_init_buffer (YY_BUFFER_STATE b,FILE *file ); | ||
| 221 | +void yyrestart ( FILE *input_file ); | ||
| 222 | +void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer ); | ||
| 223 | +YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size ); | ||
| 224 | +void yy_delete_buffer ( YY_BUFFER_STATE b ); | ||
| 225 | +void yy_flush_buffer ( YY_BUFFER_STATE b ); | ||
| 226 | +void yypush_buffer_state ( YY_BUFFER_STATE new_buffer ); | ||
| 227 | +void yypop_buffer_state ( void ); | ||
| 228 | |||
| 229 | -#define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER ) | ||
| 230 | +static void yyensure_buffer_stack ( void ); | ||
| 231 | +static void yy_load_buffer_state ( void ); | ||
| 232 | +static void yy_init_buffer ( YY_BUFFER_STATE b, FILE *file ); | ||
| 233 | +#define YY_FLUSH_BUFFER yy_flush_buffer( YY_CURRENT_BUFFER ) | ||
| 234 | |||
| 235 | -YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size ); | ||
| 236 | -YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str ); | ||
| 237 | -YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,yy_size_t len ); | ||
| 238 | +YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size ); | ||
| 239 | +YY_BUFFER_STATE yy_scan_string ( const char *yy_str ); | ||
| 240 | +YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len ); | ||
| 241 | |||
| 242 | -void *yyalloc (yy_size_t ); | ||
| 243 | -void *yyrealloc (void *,yy_size_t ); | ||
| 244 | -void yyfree (void * ); | ||
| 245 | +void *yyalloc ( yy_size_t ); | ||
| 246 | +void *yyrealloc ( void *, yy_size_t ); | ||
| 247 | +void yyfree ( void * ); | ||
| 248 | |||
| 249 | #define yy_new_buffer yy_create_buffer | ||
| 250 | - | ||
| 251 | #define yy_set_interactive(is_interactive) \ | ||
| 252 | { \ | ||
| 253 | if ( ! YY_CURRENT_BUFFER ){ \ | ||
| 254 | yyensure_buffer_stack (); \ | ||
| 255 | YY_CURRENT_BUFFER_LVALUE = \ | ||
| 256 | - yy_create_buffer(yyin,YY_BUF_SIZE ); \ | ||
| 257 | + yy_create_buffer( yyin, YY_BUF_SIZE ); \ | ||
| 258 | } \ | ||
| 259 | YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ | ||
| 260 | } | ||
| 261 | - | ||
| 262 | #define yy_set_bol(at_bol) \ | ||
| 263 | { \ | ||
| 264 | if ( ! YY_CURRENT_BUFFER ){\ | ||
| 265 | yyensure_buffer_stack (); \ | ||
| 266 | YY_CURRENT_BUFFER_LVALUE = \ | ||
| 267 | - yy_create_buffer(yyin,YY_BUF_SIZE ); \ | ||
| 268 | + yy_create_buffer( yyin, YY_BUF_SIZE ); \ | ||
| 269 | } \ | ||
| 270 | YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ | ||
| 271 | } | ||
| 272 | - | ||
| 273 | #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) | ||
| 274 | |||
| 275 | /* Begin user sect3 */ | ||
| 276 | +typedef flex_uint8_t YY_CHAR; | ||
| 277 | |||
| 278 | -typedef unsigned char YY_CHAR; | ||
| 279 | - | ||
| 280 | -FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0; | ||
| 281 | +FILE *yyin = NULL, *yyout = NULL; | ||
| 282 | |||
| 283 | -typedef yyconst struct yy_trans_info *yy_state_type; | ||
| 284 | +typedef const struct yy_trans_info *yy_state_type; | ||
| 285 | |||
| 286 | extern int yylineno; | ||
| 287 | - | ||
| 288 | int yylineno = 1; | ||
| 289 | |||
| 290 | extern char *yytext; | ||
| 291 | +#ifdef yytext_ptr | ||
| 292 | +#undef yytext_ptr | ||
| 293 | +#endif | ||
| 294 | #define yytext_ptr yytext | ||
| 295 | |||
| 296 | -static yy_state_type yy_get_previous_state (void ); | ||
| 297 | -static yy_state_type yy_try_NUL_trans (yy_state_type current_state ); | ||
| 298 | -static int yy_get_next_buffer (void ); | ||
| 299 | -static void yy_fatal_error (yyconst char msg[] ); | ||
| 300 | +static yy_state_type yy_get_previous_state ( void ); | ||
| 301 | +static yy_state_type yy_try_NUL_trans ( yy_state_type current_state ); | ||
| 302 | +static int yy_get_next_buffer ( void ); | ||
| 303 | +static void yynoreturn yy_fatal_error ( const char* msg ); | ||
| 304 | |||
| 305 | /* Done after the current pattern has been matched and before the | ||
| 306 | * corresponding action - sets up yytext. | ||
| 307 | */ | ||
| 308 | #define YY_DO_BEFORE_ACTION \ | ||
| 309 | (yytext_ptr) = yy_bp; \ | ||
| 310 | - yyleng = (size_t) (yy_cp - yy_bp); \ | ||
| 311 | + yyleng = (int) (yy_cp - yy_bp); \ | ||
| 312 | (yy_hold_char) = *yy_cp; \ | ||
| 313 | *yy_cp = '\0'; \ | ||
| 314 | (yy_c_buf_p) = yy_cp; | ||
| 315 | - | ||
| 316 | #define YY_NUM_RULES 13 | ||
| 317 | #define YY_END_OF_BUFFER 14 | ||
| 318 | struct yy_trans_info | ||
| 319 | @@ -367,7 +359,7 @@ struct yy_trans_info | ||
| 320 | flex_int16_t yy_verify; | ||
| 321 | flex_int16_t yy_nxt; | ||
| 322 | }; | ||
| 323 | -static yyconst struct yy_trans_info yy_transition[3478] = | ||
| 324 | +static const struct yy_trans_info yy_transition[3478] = | ||
| 325 | { | ||
| 326 | { 0, 0 }, { 0,3222 }, { 0, 0 }, { 0,3220 }, { 1,1548 }, | ||
| 327 | { 2,1548 }, { 3,1548 }, { 4,1548 }, { 5,1548 }, { 6,1548 }, | ||
| 328 | @@ -1079,7 +1071,7 @@ static yyconst struct yy_trans_info yy_transition[3478] = | ||
| 329 | { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, | ||
| 330 | { 0, 0 }, { 0, 0 }, { 257, 14 }, { 1, 0 }, }; | ||
| 331 | |||
| 332 | -static yyconst struct yy_trans_info *yy_start_state_list[7] = | ||
| 333 | +static const struct yy_trans_info *yy_start_state_list[7] = | ||
| 334 | { | ||
| 335 | &yy_transition[1], | ||
| 336 | &yy_transition[3], | ||
| 337 | @@ -1145,13 +1137,14 @@ char *yytext; | ||
| 338 | */ | ||
| 339 | #include <string.h> | ||
| 340 | #include <stdlib.h> | ||
| 341 | +#include <strings.h> | ||
| 342 | |||
| 343 | #define TRUE 1 | ||
| 344 | #define FALSE 0 | ||
| 345 | |||
| 346 | static char **selections; /* selection tokens */ | ||
| 347 | static int nselections; /* number of selections */ | ||
| 348 | -static ifsense; /* sense of last `if' or unless seen */ | ||
| 349 | +static int ifsense; /* sense of last `if' or unless seen */ | ||
| 350 | static char *attribute; /* last attribute scanned */ | ||
| 351 | |||
| 352 | struct stack_t { | ||
| 353 | @@ -1301,8 +1294,9 @@ static void process_else() | ||
| 354 | } | ||
| 355 | |||
| 356 | |||
| 357 | +#line 1297 "xmlif/xmlif.c" | ||
| 358 | |||
| 359 | -#line 1306 "xmlif/xmlif.c" | ||
| 360 | +#line 1299 "xmlif/xmlif.c" | ||
| 361 | |||
| 362 | #define INITIAL 0 | ||
| 363 | #define attrib 1 | ||
| 364 | @@ -1320,36 +1314,36 @@ static void process_else() | ||
| 365 | #define YY_EXTRA_TYPE void * | ||
| 366 | #endif | ||
| 367 | |||
| 368 | -static int yy_init_globals (void ); | ||
| 369 | +static int yy_init_globals ( void ); | ||
| 370 | |||
| 371 | /* Accessor methods to globals. | ||
| 372 | These are made visible to non-reentrant scanners for convenience. */ | ||
| 373 | |||
| 374 | -int yylex_destroy (void ); | ||
| 375 | +int yylex_destroy ( void ); | ||
| 376 | |||
| 377 | -int yyget_debug (void ); | ||
| 378 | +int yyget_debug ( void ); | ||
| 379 | |||
| 380 | -void yyset_debug (int debug_flag ); | ||
| 381 | +void yyset_debug ( int debug_flag ); | ||
| 382 | |||
| 383 | -YY_EXTRA_TYPE yyget_extra (void ); | ||
| 384 | +YY_EXTRA_TYPE yyget_extra ( void ); | ||
| 385 | |||
| 386 | -void yyset_extra (YY_EXTRA_TYPE user_defined ); | ||
| 387 | +void yyset_extra ( YY_EXTRA_TYPE user_defined ); | ||
| 388 | |||
| 389 | -FILE *yyget_in (void ); | ||
| 390 | +FILE *yyget_in ( void ); | ||
| 391 | |||
| 392 | -void yyset_in (FILE * in_str ); | ||
| 393 | +void yyset_in ( FILE * _in_str ); | ||
| 394 | |||
| 395 | -FILE *yyget_out (void ); | ||
| 396 | +FILE *yyget_out ( void ); | ||
| 397 | |||
| 398 | -void yyset_out (FILE * out_str ); | ||
| 399 | +void yyset_out ( FILE * _out_str ); | ||
| 400 | |||
| 401 | -yy_size_t yyget_leng (void ); | ||
| 402 | + int yyget_leng ( void ); | ||
| 403 | |||
| 404 | -char *yyget_text (void ); | ||
| 405 | +char *yyget_text ( void ); | ||
| 406 | |||
| 407 | -int yyget_lineno (void ); | ||
| 408 | +int yyget_lineno ( void ); | ||
| 409 | |||
| 410 | -void yyset_lineno (int line_number ); | ||
| 411 | +void yyset_lineno ( int _line_number ); | ||
| 412 | |||
| 413 | /* Macros after this point can all be overridden by user definitions in | ||
| 414 | * section 1. | ||
| 415 | @@ -1357,35 +1351,43 @@ void yyset_lineno (int line_number ); | ||
| 416 | |||
| 417 | #ifndef YY_SKIP_YYWRAP | ||
| 418 | #ifdef __cplusplus | ||
| 419 | -extern "C" int yywrap (void ); | ||
| 420 | +extern "C" int yywrap ( void ); | ||
| 421 | #else | ||
| 422 | -extern int yywrap (void ); | ||
| 423 | +extern int yywrap ( void ); | ||
| 424 | #endif | ||
| 425 | #endif | ||
| 426 | |||
| 427 | - static void yyunput (int c,char *buf_ptr ); | ||
| 428 | +#ifndef YY_NO_UNPUT | ||
| 429 | + | ||
| 430 | + static void yyunput ( int c, char *buf_ptr ); | ||
| 431 | |||
| 432 | +#endif | ||
| 433 | + | ||
| 434 | #ifndef yytext_ptr | ||
| 435 | -static void yy_flex_strncpy (char *,yyconst char *,int ); | ||
| 436 | +static void yy_flex_strncpy ( char *, const char *, int ); | ||
| 437 | #endif | ||
| 438 | |||
| 439 | #ifdef YY_NEED_STRLEN | ||
| 440 | -static int yy_flex_strlen (yyconst char * ); | ||
| 441 | +static int yy_flex_strlen ( const char * ); | ||
| 442 | #endif | ||
| 443 | |||
| 444 | #ifndef YY_NO_INPUT | ||
| 445 | - | ||
| 446 | #ifdef __cplusplus | ||
| 447 | -static int yyinput (void ); | ||
| 448 | +static int yyinput ( void ); | ||
| 449 | #else | ||
| 450 | -static int input (void ); | ||
| 451 | +static int input ( void ); | ||
| 452 | #endif | ||
| 453 | |||
| 454 | #endif | ||
| 455 | |||
| 456 | /* Amount of stuff to slurp up with each read. */ | ||
| 457 | #ifndef YY_READ_BUF_SIZE | ||
| 458 | +#ifdef __ia64__ | ||
| 459 | +/* On IA-64, the buffer size is 16k, not 8k */ | ||
| 460 | +#define YY_READ_BUF_SIZE 16384 | ||
| 461 | +#else | ||
| 462 | #define YY_READ_BUF_SIZE 8192 | ||
| 463 | +#endif /* __ia64__ */ | ||
| 464 | #endif | ||
| 465 | |||
| 466 | /* Copy whatever the last rule matched to the standard output. */ | ||
| 467 | @@ -1393,7 +1395,7 @@ static int input (void ); | ||
| 468 | /* This used to be an fputs(), but since the string might contain NUL's, | ||
| 469 | * we now use fwrite(). | ||
| 470 | */ | ||
| 471 | -#define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0) | ||
| 472 | +#define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0) | ||
| 473 | #endif | ||
| 474 | |||
| 475 | /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, | ||
| 476 | @@ -1402,7 +1404,7 @@ static int input (void ); | ||
| 477 | #ifndef YY_INPUT | ||
| 478 | #define YY_INPUT(buf,result,max_size) \ | ||
| 479 | errno=0; \ | ||
| 480 | - while ( (result = read( fileno(yyin), (char *) buf, max_size )) < 0 ) \ | ||
| 481 | + while ( (result = (int) read( fileno(yyin), buf, (yy_size_t) max_size )) < 0 ) \ | ||
| 482 | { \ | ||
| 483 | if( errno != EINTR) \ | ||
| 484 | { \ | ||
| 485 | @@ -1456,7 +1458,7 @@ extern int yylex (void); | ||
| 486 | |||
| 487 | /* Code executed at the end of each rule. */ | ||
| 488 | #ifndef YY_BREAK | ||
| 489 | -#define YY_BREAK break; | ||
| 490 | +#define YY_BREAK /*LINTED*/break; | ||
| 491 | #endif | ||
| 492 | |||
| 493 | #define YY_RULE_SETUP \ | ||
| 494 | @@ -1466,14 +1468,10 @@ extern int yylex (void); | ||
| 495 | */ | ||
| 496 | YY_DECL | ||
| 497 | { | ||
| 498 | - register yy_state_type yy_current_state; | ||
| 499 | - register char *yy_cp, *yy_bp; | ||
| 500 | - register int yy_act; | ||
| 501 | + yy_state_type yy_current_state; | ||
| 502 | + char *yy_cp, *yy_bp; | ||
| 503 | + int yy_act; | ||
| 504 | |||
| 505 | -#line 207 "xmlif/xmlif.l" | ||
| 506 | - | ||
| 507 | -#line 1476 "xmlif/xmlif.c" | ||
| 508 | - | ||
| 509 | if ( !(yy_init) ) | ||
| 510 | { | ||
| 511 | (yy_init) = 1; | ||
| 512 | @@ -1494,13 +1492,18 @@ YY_DECL | ||
| 513 | if ( ! YY_CURRENT_BUFFER ) { | ||
| 514 | yyensure_buffer_stack (); | ||
| 515 | YY_CURRENT_BUFFER_LVALUE = | ||
| 516 | - yy_create_buffer(yyin,YY_BUF_SIZE ); | ||
| 517 | + yy_create_buffer( yyin, YY_BUF_SIZE ); | ||
| 518 | } | ||
| 519 | |||
| 520 | - yy_load_buffer_state( ); | ||
| 521 | + yy_load_buffer_state( ); | ||
| 522 | } | ||
| 523 | |||
| 524 | - while ( 1 ) /* loops until end-of-file is reached */ | ||
| 525 | + { | ||
| 526 | +#line 208 "xmlif/xmlif.l" | ||
| 527 | + | ||
| 528 | +#line 1504 "xmlif/xmlif.c" | ||
| 529 | + | ||
| 530 | + while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */ | ||
| 531 | { | ||
| 532 | yy_cp = (yy_c_buf_p); | ||
| 533 | |||
| 534 | @@ -1515,12 +1518,12 @@ YY_DECL | ||
| 535 | yy_current_state = yy_start_state_list[(yy_start)]; | ||
| 536 | yy_match: | ||
| 537 | { | ||
| 538 | - register yyconst struct yy_trans_info *yy_trans_info; | ||
| 539 | + const struct yy_trans_info *yy_trans_info; | ||
| 540 | |||
| 541 | - register YY_CHAR yy_c; | ||
| 542 | + YY_CHAR yy_c; | ||
| 543 | |||
| 544 | for ( yy_c = YY_SC_TO_UI(*yy_cp); | ||
| 545 | - (yy_trans_info = &yy_current_state[(unsigned int) yy_c])-> | ||
| 546 | + (yy_trans_info = &yy_current_state[yy_c])-> | ||
| 547 | yy_verify == yy_c; | ||
| 548 | yy_c = YY_SC_TO_UI(*++yy_cp) ) | ||
| 549 | { | ||
| 550 | @@ -1553,58 +1556,58 @@ do_action: /* This label is used only to access EOF actions. */ | ||
| 551 | case 1: | ||
| 552 | /* rule 1 can match eol */ | ||
| 553 | YY_RULE_SETUP | ||
| 554 | -#line 208 "xmlif/xmlif.l" | ||
| 555 | +#line 209 "xmlif/xmlif.l" | ||
| 556 | {BEGIN(attrib); ifsense = FALSE; push_level();} | ||
| 557 | YY_BREAK | ||
| 558 | case 2: | ||
| 559 | /* rule 2 can match eol */ | ||
| 560 | YY_RULE_SETUP | ||
| 561 | -#line 209 "xmlif/xmlif.l" | ||
| 562 | +#line 210 "xmlif/xmlif.l" | ||
| 563 | {BEGIN(attrib); ifsense = TRUE; push_level();} | ||
| 564 | YY_BREAK | ||
| 565 | case 3: | ||
| 566 | /* rule 3 can match eol */ | ||
| 567 | YY_RULE_SETUP | ||
| 568 | -#line 210 "xmlif/xmlif.l" | ||
| 569 | +#line 211 "xmlif/xmlif.l" | ||
| 570 | {BEGIN(attrib); ifsense = FALSE;} | ||
| 571 | YY_BREAK | ||
| 572 | case 4: | ||
| 573 | /* rule 4 can match eol */ | ||
| 574 | YY_RULE_SETUP | ||
| 575 | -#line 211 "xmlif/xmlif.l" | ||
| 576 | +#line 212 "xmlif/xmlif.l" | ||
| 577 | {BEGIN(attrib); ifsense = TRUE;} | ||
| 578 | YY_BREAK | ||
| 579 | case 5: | ||
| 580 | /* rule 5 can match eol */ | ||
| 581 | YY_RULE_SETUP | ||
| 582 | -#line 212 "xmlif/xmlif.l" | ||
| 583 | +#line 213 "xmlif/xmlif.l" | ||
| 584 | {process_else();} | ||
| 585 | YY_BREAK | ||
| 586 | case 6: | ||
| 587 | /* rule 6 can match eol */ | ||
| 588 | YY_RULE_SETUP | ||
| 589 | -#line 214 "xmlif/xmlif.l" | ||
| 590 | +#line 215 "xmlif/xmlif.l" | ||
| 591 | {pop_level();} | ||
| 592 | YY_BREAK | ||
| 593 | case 7: | ||
| 594 | YY_RULE_SETUP | ||
| 595 | -#line 216 "xmlif/xmlif.l" | ||
| 596 | +#line 217 "xmlif/xmlif.l" | ||
| 597 | {stash_attribute(yytext);} | ||
| 598 | YY_BREAK | ||
| 599 | case 8: | ||
| 600 | YY_RULE_SETUP | ||
| 601 | -#line 217 "xmlif/xmlif.l" | ||
| 602 | +#line 218 "xmlif/xmlif.l" | ||
| 603 | {BEGIN(val);} | ||
| 604 | YY_BREAK | ||
| 605 | case 9: | ||
| 606 | YY_RULE_SETUP | ||
| 607 | -#line 218 "xmlif/xmlif.l" | ||
| 608 | +#line 219 "xmlif/xmlif.l" | ||
| 609 | {BEGIN(INITIAL); end_attribute();} | ||
| 610 | YY_BREAK | ||
| 611 | case 10: | ||
| 612 | /* rule 10 can match eol */ | ||
| 613 | YY_RULE_SETUP | ||
| 614 | -#line 219 "xmlif/xmlif.l" | ||
| 615 | +#line 220 "xmlif/xmlif.l" | ||
| 616 | { | ||
| 617 | yytext[strlen(yytext)-1]='\0'; | ||
| 618 | process_value(yytext+1); | ||
| 619 | @@ -1613,7 +1616,7 @@ YY_RULE_SETUP | ||
| 620 | YY_BREAK | ||
| 621 | case 11: | ||
| 622 | YY_RULE_SETUP | ||
| 623 | -#line 224 "xmlif/xmlif.l" | ||
| 624 | +#line 225 "xmlif/xmlif.l" | ||
| 625 | { | ||
| 626 | fprintf(stderr, | ||
| 627 | "xmlif: > where value expected\n"); | ||
| 628 | @@ -1622,7 +1625,7 @@ YY_RULE_SETUP | ||
| 629 | YY_BREAK | ||
| 630 | case 12: | ||
| 631 | YY_RULE_SETUP | ||
| 632 | -#line 230 "xmlif/xmlif.l" | ||
| 633 | +#line 231 "xmlif/xmlif.l" | ||
| 634 | { | ||
| 635 | if (!end->suppressed) | ||
| 636 | putchar(yytext[0]); | ||
| 637 | @@ -1630,10 +1633,10 @@ YY_RULE_SETUP | ||
| 638 | YY_BREAK | ||
| 639 | case 13: | ||
| 640 | YY_RULE_SETUP | ||
| 641 | -#line 235 "xmlif/xmlif.l" | ||
| 642 | +#line 236 "xmlif/xmlif.l" | ||
| 643 | ECHO; | ||
| 644 | YY_BREAK | ||
| 645 | -#line 1637 "xmlif/xmlif.c" | ||
| 646 | +#line 1639 "xmlif/xmlif.c" | ||
| 647 | case YY_STATE_EOF(INITIAL): | ||
| 648 | case YY_STATE_EOF(attrib): | ||
| 649 | case YY_STATE_EOF(val): | ||
| 650 | @@ -1713,7 +1716,7 @@ case YY_STATE_EOF(val): | ||
| 651 | { | ||
| 652 | (yy_did_buffer_switch_on_eof) = 0; | ||
| 653 | |||
| 654 | - if ( yywrap( ) ) | ||
| 655 | + if ( yywrap( ) ) | ||
| 656 | { | ||
| 657 | /* Note: because we've taken care in | ||
| 658 | * yy_get_next_buffer() to have set up | ||
| 659 | @@ -1766,6 +1769,7 @@ case YY_STATE_EOF(val): | ||
| 660 | "fatal flex scanner internal error--no action found" ); | ||
| 661 | } /* end of action switch */ | ||
| 662 | } /* end of scanning one token */ | ||
| 663 | + } /* end of user's declarations */ | ||
| 664 | } /* end of yylex */ | ||
| 665 | |||
| 666 | /* yy_get_next_buffer - try to read in a new buffer | ||
| 667 | @@ -1777,9 +1781,9 @@ case YY_STATE_EOF(val): | ||
| 668 | */ | ||
| 669 | static int yy_get_next_buffer (void) | ||
| 670 | { | ||
| 671 | - register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; | ||
| 672 | - register char *source = (yytext_ptr); | ||
| 673 | - register int number_to_move, i; | ||
| 674 | + char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; | ||
| 675 | + char *source = (yytext_ptr); | ||
| 676 | + int number_to_move, i; | ||
| 677 | int ret_val; | ||
| 678 | |||
| 679 | if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] ) | ||
| 680 | @@ -1808,7 +1812,7 @@ static int yy_get_next_buffer (void) | ||
| 681 | /* Try to read more data. */ | ||
| 682 | |||
| 683 | /* First move last chars to start of buffer. */ | ||
| 684 | - number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1; | ||
| 685 | + number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr) - 1); | ||
| 686 | |||
| 687 | for ( i = 0; i < number_to_move; ++i ) | ||
| 688 | *(dest++) = *(source++); | ||
| 689 | @@ -1821,7 +1825,7 @@ static int yy_get_next_buffer (void) | ||
| 690 | |||
| 691 | else | ||
| 692 | { | ||
| 693 | - yy_size_t num_to_read = | ||
| 694 | + int num_to_read = | ||
| 695 | YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; | ||
| 696 | |||
| 697 | while ( num_to_read <= 0 ) | ||
| 698 | @@ -1835,7 +1839,7 @@ static int yy_get_next_buffer (void) | ||
| 699 | |||
| 700 | if ( b->yy_is_our_buffer ) | ||
| 701 | { | ||
| 702 | - yy_size_t new_size = b->yy_buf_size * 2; | ||
| 703 | + int new_size = b->yy_buf_size * 2; | ||
| 704 | |||
| 705 | if ( new_size <= 0 ) | ||
| 706 | b->yy_buf_size += b->yy_buf_size / 8; | ||
| 707 | @@ -1844,11 +1848,12 @@ static int yy_get_next_buffer (void) | ||
| 708 | |||
| 709 | b->yy_ch_buf = (char *) | ||
| 710 | /* Include room in for 2 EOB chars. */ | ||
| 711 | - yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ); | ||
| 712 | + yyrealloc( (void *) b->yy_ch_buf, | ||
| 713 | + (yy_size_t) (b->yy_buf_size + 2) ); | ||
| 714 | } | ||
| 715 | else | ||
| 716 | /* Can't grow it, we don't own it. */ | ||
| 717 | - b->yy_ch_buf = 0; | ||
| 718 | + b->yy_ch_buf = NULL; | ||
| 719 | |||
| 720 | if ( ! b->yy_ch_buf ) | ||
| 721 | YY_FATAL_ERROR( | ||
| 722 | @@ -1876,7 +1881,7 @@ static int yy_get_next_buffer (void) | ||
| 723 | if ( number_to_move == YY_MORE_ADJ ) | ||
| 724 | { | ||
| 725 | ret_val = EOB_ACT_END_OF_FILE; | ||
| 726 | - yyrestart(yyin ); | ||
| 727 | + yyrestart( yyin ); | ||
| 728 | } | ||
| 729 | |||
| 730 | else | ||
| 731 | @@ -1890,12 +1895,15 @@ static int yy_get_next_buffer (void) | ||
| 732 | else | ||
| 733 | ret_val = EOB_ACT_CONTINUE_SCAN; | ||
| 734 | |||
| 735 | - if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { | ||
| 736 | + if (((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { | ||
| 737 | /* Extend the array by 50%, plus the number we really need. */ | ||
| 738 | - yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1); | ||
| 739 | - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ); | ||
| 740 | + int new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1); | ||
| 741 | + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc( | ||
| 742 | + (void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size ); | ||
| 743 | if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) | ||
| 744 | YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); | ||
| 745 | + /* "- 2" to take care of EOB's */ | ||
| 746 | + YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2); | ||
| 747 | } | ||
| 748 | |||
| 749 | (yy_n_chars) += number_to_move; | ||
| 750 | @@ -1911,8 +1919,8 @@ static int yy_get_next_buffer (void) | ||
| 751 | |||
| 752 | static yy_state_type yy_get_previous_state (void) | ||
| 753 | { | ||
| 754 | - register yy_state_type yy_current_state; | ||
| 755 | - register char *yy_cp; | ||
| 756 | + yy_state_type yy_current_state; | ||
| 757 | + char *yy_cp; | ||
| 758 | |||
| 759 | yy_current_state = yy_start_state_list[(yy_start)]; | ||
| 760 | |||
| 761 | @@ -1936,11 +1944,11 @@ static int yy_get_next_buffer (void) | ||
| 762 | */ | ||
| 763 | static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state ) | ||
| 764 | { | ||
| 765 | - register int yy_is_jam; | ||
| 766 | - register char *yy_cp = (yy_c_buf_p); | ||
| 767 | + int yy_is_jam; | ||
| 768 | + char *yy_cp = (yy_c_buf_p); | ||
| 769 | |||
| 770 | - register int yy_c = 256; | ||
| 771 | - register yyconst struct yy_trans_info *yy_trans_info; | ||
| 772 | + int yy_c = 256; | ||
| 773 | + const struct yy_trans_info *yy_trans_info; | ||
| 774 | |||
| 775 | yy_trans_info = &yy_current_state[(unsigned int) yy_c]; | ||
| 776 | yy_current_state += yy_trans_info->yy_nxt; | ||
| 777 | @@ -1958,9 +1966,11 @@ static int yy_get_next_buffer (void) | ||
| 778 | return yy_is_jam ? 0 : yy_current_state; | ||
| 779 | } | ||
| 780 | |||
| 781 | - static void yyunput (int c, register char * yy_bp ) | ||
| 782 | +#ifndef YY_NO_UNPUT | ||
| 783 | + | ||
| 784 | + static void yyunput (int c, char * yy_bp ) | ||
| 785 | { | ||
| 786 | - register char *yy_cp; | ||
| 787 | + char *yy_cp; | ||
| 788 | |||
| 789 | yy_cp = (yy_c_buf_p); | ||
| 790 | |||
| 791 | @@ -1970,10 +1980,10 @@ static int yy_get_next_buffer (void) | ||
| 792 | if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) | ||
| 793 | { /* need to shift things up to make room */ | ||
| 794 | /* +2 for EOB chars. */ | ||
| 795 | - register yy_size_t number_to_move = (yy_n_chars) + 2; | ||
| 796 | - register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[ | ||
| 797 | + int number_to_move = (yy_n_chars) + 2; | ||
| 798 | + char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[ | ||
| 799 | YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2]; | ||
| 800 | - register char *source = | ||
| 801 | + char *source = | ||
| 802 | &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]; | ||
| 803 | |||
| 804 | while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) | ||
| 805 | @@ -1982,7 +1992,7 @@ static int yy_get_next_buffer (void) | ||
| 806 | yy_cp += (int) (dest - source); | ||
| 807 | yy_bp += (int) (dest - source); | ||
| 808 | YY_CURRENT_BUFFER_LVALUE->yy_n_chars = | ||
| 809 | - (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size; | ||
| 810 | + (yy_n_chars) = (int) YY_CURRENT_BUFFER_LVALUE->yy_buf_size; | ||
| 811 | |||
| 812 | if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) | ||
| 813 | YY_FATAL_ERROR( "flex scanner push-back overflow" ); | ||
| 814 | @@ -1995,6 +2005,8 @@ static int yy_get_next_buffer (void) | ||
| 815 | (yy_c_buf_p) = yy_cp; | ||
| 816 | } | ||
| 817 | |||
| 818 | +#endif | ||
| 819 | + | ||
| 820 | #ifndef YY_NO_INPUT | ||
| 821 | #ifdef __cplusplus | ||
| 822 | static int yyinput (void) | ||
| 823 | @@ -2019,7 +2031,7 @@ static int yy_get_next_buffer (void) | ||
| 824 | |||
| 825 | else | ||
| 826 | { /* need more input */ | ||
| 827 | - yy_size_t offset = (yy_c_buf_p) - (yytext_ptr); | ||
| 828 | + int offset = (int) ((yy_c_buf_p) - (yytext_ptr)); | ||
| 829 | ++(yy_c_buf_p); | ||
| 830 | |||
| 831 | switch ( yy_get_next_buffer( ) ) | ||
| 832 | @@ -2036,14 +2048,14 @@ static int yy_get_next_buffer (void) | ||
| 833 | */ | ||
| 834 | |||
| 835 | /* Reset buffer status. */ | ||
| 836 | - yyrestart(yyin ); | ||
| 837 | + yyrestart( yyin ); | ||
| 838 | |||
| 839 | /*FALLTHROUGH*/ | ||
| 840 | |||
| 841 | case EOB_ACT_END_OF_FILE: | ||
| 842 | { | ||
| 843 | - if ( yywrap( ) ) | ||
| 844 | - return EOF; | ||
| 845 | + if ( yywrap( ) ) | ||
| 846 | + return 0; | ||
| 847 | |||
| 848 | if ( ! (yy_did_buffer_switch_on_eof) ) | ||
| 849 | YY_NEW_FILE; | ||
| 850 | @@ -2080,11 +2092,11 @@ static int yy_get_next_buffer (void) | ||
| 851 | if ( ! YY_CURRENT_BUFFER ){ | ||
| 852 | yyensure_buffer_stack (); | ||
| 853 | YY_CURRENT_BUFFER_LVALUE = | ||
| 854 | - yy_create_buffer(yyin,YY_BUF_SIZE ); | ||
| 855 | + yy_create_buffer( yyin, YY_BUF_SIZE ); | ||
| 856 | } | ||
| 857 | |||
| 858 | - yy_init_buffer(YY_CURRENT_BUFFER,input_file ); | ||
| 859 | - yy_load_buffer_state( ); | ||
| 860 | + yy_init_buffer( YY_CURRENT_BUFFER, input_file ); | ||
| 861 | + yy_load_buffer_state( ); | ||
| 862 | } | ||
| 863 | |||
| 864 | /** Switch to a different input buffer. | ||
| 865 | @@ -2112,7 +2124,7 @@ static int yy_get_next_buffer (void) | ||
| 866 | } | ||
| 867 | |||
| 868 | YY_CURRENT_BUFFER_LVALUE = new_buffer; | ||
| 869 | - yy_load_buffer_state( ); | ||
| 870 | + yy_load_buffer_state( ); | ||
| 871 | |||
| 872 | /* We don't actually know whether we did this switch during | ||
| 873 | * EOF (yywrap()) processing, but the only time this flag | ||
| 874 | @@ -2140,7 +2152,7 @@ static void yy_load_buffer_state (void) | ||
| 875 | { | ||
| 876 | YY_BUFFER_STATE b; | ||
| 877 | |||
| 878 | - b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) ); | ||
| 879 | + b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) ); | ||
| 880 | if ( ! b ) | ||
| 881 | YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); | ||
| 882 | |||
| 883 | @@ -2149,13 +2161,13 @@ static void yy_load_buffer_state (void) | ||
| 884 | /* yy_ch_buf has to be 2 characters longer than the size given because | ||
| 885 | * we need to put in 2 end-of-buffer characters. | ||
| 886 | */ | ||
| 887 | - b->yy_ch_buf = (char *) yyalloc(b->yy_buf_size + 2 ); | ||
| 888 | + b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) ); | ||
| 889 | if ( ! b->yy_ch_buf ) | ||
| 890 | YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); | ||
| 891 | |||
| 892 | b->yy_is_our_buffer = 1; | ||
| 893 | |||
| 894 | - yy_init_buffer(b,file ); | ||
| 895 | + yy_init_buffer( b, file ); | ||
| 896 | |||
| 897 | return b; | ||
| 898 | } | ||
| 899 | @@ -2174,9 +2186,9 @@ static void yy_load_buffer_state (void) | ||
| 900 | YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; | ||
| 901 | |||
| 902 | if ( b->yy_is_our_buffer ) | ||
| 903 | - yyfree((void *) b->yy_ch_buf ); | ||
| 904 | + yyfree( (void *) b->yy_ch_buf ); | ||
| 905 | |||
| 906 | - yyfree((void *) b ); | ||
| 907 | + yyfree( (void *) b ); | ||
| 908 | } | ||
| 909 | |||
| 910 | /* Initializes or reinitializes a buffer. | ||
| 911 | @@ -2188,7 +2200,7 @@ static void yy_load_buffer_state (void) | ||
| 912 | { | ||
| 913 | int oerrno = errno; | ||
| 914 | |||
| 915 | - yy_flush_buffer(b ); | ||
| 916 | + yy_flush_buffer( b ); | ||
| 917 | |||
| 918 | b->yy_input_file = file; | ||
| 919 | b->yy_fill_buffer = 1; | ||
| 920 | @@ -2231,7 +2243,7 @@ static void yy_load_buffer_state (void) | ||
| 921 | b->yy_buffer_status = YY_BUFFER_NEW; | ||
| 922 | |||
| 923 | if ( b == YY_CURRENT_BUFFER ) | ||
| 924 | - yy_load_buffer_state( ); | ||
| 925 | + yy_load_buffer_state( ); | ||
| 926 | } | ||
| 927 | |||
| 928 | /** Pushes the new state onto the stack. The new state becomes | ||
| 929 | @@ -2262,7 +2274,7 @@ void yypush_buffer_state (YY_BUFFER_STATE new_buffer ) | ||
| 930 | YY_CURRENT_BUFFER_LVALUE = new_buffer; | ||
| 931 | |||
| 932 | /* copied from yy_switch_to_buffer. */ | ||
| 933 | - yy_load_buffer_state( ); | ||
| 934 | + yy_load_buffer_state( ); | ||
| 935 | (yy_did_buffer_switch_on_eof) = 1; | ||
| 936 | } | ||
| 937 | |||
| 938 | @@ -2281,7 +2293,7 @@ void yypop_buffer_state (void) | ||
| 939 | --(yy_buffer_stack_top); | ||
| 940 | |||
| 941 | if (YY_CURRENT_BUFFER) { | ||
| 942 | - yy_load_buffer_state( ); | ||
| 943 | + yy_load_buffer_state( ); | ||
| 944 | (yy_did_buffer_switch_on_eof) = 1; | ||
| 945 | } | ||
| 946 | } | ||
| 947 | @@ -2299,15 +2311,15 @@ static void yyensure_buffer_stack (void) | ||
| 948 | * scanner will even need a stack. We use 2 instead of 1 to avoid an | ||
| 949 | * immediate realloc on the next call. | ||
| 950 | */ | ||
| 951 | - num_to_alloc = 1; | ||
| 952 | + num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */ | ||
| 953 | (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc | ||
| 954 | (num_to_alloc * sizeof(struct yy_buffer_state*) | ||
| 955 | ); | ||
| 956 | if ( ! (yy_buffer_stack) ) | ||
| 957 | YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); | ||
| 958 | - | ||
| 959 | + | ||
| 960 | memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*)); | ||
| 961 | - | ||
| 962 | + | ||
| 963 | (yy_buffer_stack_max) = num_to_alloc; | ||
| 964 | (yy_buffer_stack_top) = 0; | ||
| 965 | return; | ||
| 966 | @@ -2316,7 +2328,7 @@ static void yyensure_buffer_stack (void) | ||
| 967 | if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){ | ||
| 968 | |||
| 969 | /* Increase the buffer to prepare for a possible push. */ | ||
| 970 | - int grow_size = 8 /* arbitrary grow size */; | ||
| 971 | + yy_size_t grow_size = 8 /* arbitrary grow size */; | ||
| 972 | |||
| 973 | num_to_alloc = (yy_buffer_stack_max) + grow_size; | ||
| 974 | (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc | ||
| 975 | @@ -2336,7 +2348,7 @@ static void yyensure_buffer_stack (void) | ||
| 976 | * @param base the character buffer | ||
| 977 | * @param size the size in bytes of the character buffer | ||
| 978 | * | ||
| 979 | - * @return the newly allocated buffer state object. | ||
| 980 | + * @return the newly allocated buffer state object. | ||
| 981 | */ | ||
| 982 | YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size ) | ||
| 983 | { | ||
| 984 | @@ -2346,23 +2358,23 @@ YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size ) | ||
| 985 | base[size-2] != YY_END_OF_BUFFER_CHAR || | ||
| 986 | base[size-1] != YY_END_OF_BUFFER_CHAR ) | ||
| 987 | /* They forgot to leave room for the EOB's. */ | ||
| 988 | - return 0; | ||
| 989 | + return NULL; | ||
| 990 | |||
| 991 | - b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) ); | ||
| 992 | + b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) ); | ||
| 993 | if ( ! b ) | ||
| 994 | YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); | ||
| 995 | |||
| 996 | - b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ | ||
| 997 | + b->yy_buf_size = (int) (size - 2); /* "- 2" to take care of EOB's */ | ||
| 998 | b->yy_buf_pos = b->yy_ch_buf = base; | ||
| 999 | b->yy_is_our_buffer = 0; | ||
| 1000 | - b->yy_input_file = 0; | ||
| 1001 | + b->yy_input_file = NULL; | ||
| 1002 | b->yy_n_chars = b->yy_buf_size; | ||
| 1003 | b->yy_is_interactive = 0; | ||
| 1004 | b->yy_at_bol = 1; | ||
| 1005 | b->yy_fill_buffer = 0; | ||
| 1006 | b->yy_buffer_status = YY_BUFFER_NEW; | ||
| 1007 | |||
| 1008 | - yy_switch_to_buffer(b ); | ||
| 1009 | + yy_switch_to_buffer( b ); | ||
| 1010 | |||
| 1011 | return b; | ||
| 1012 | } | ||
| 1013 | @@ -2375,10 +2387,10 @@ YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size ) | ||
| 1014 | * @note If you want to scan bytes that may contain NUL values, then use | ||
| 1015 | * yy_scan_bytes() instead. | ||
| 1016 | */ | ||
| 1017 | -YY_BUFFER_STATE yy_scan_string (yyconst char * yystr ) | ||
| 1018 | +YY_BUFFER_STATE yy_scan_string (const char * yystr ) | ||
| 1019 | { | ||
| 1020 | |||
| 1021 | - return yy_scan_bytes(yystr,strlen(yystr) ); | ||
| 1022 | + return yy_scan_bytes( yystr, (int) strlen(yystr) ); | ||
| 1023 | } | ||
| 1024 | |||
| 1025 | /** Setup the input buffer state to scan the given bytes. The next call to yylex() will | ||
| 1026 | @@ -2388,7 +2400,7 @@ YY_BUFFER_STATE yy_scan_string (yyconst char * yystr ) | ||
| 1027 | * | ||
| 1028 | * @return the newly allocated buffer state object. | ||
| 1029 | */ | ||
| 1030 | -YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len ) | ||
| 1031 | +YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, int _yybytes_len ) | ||
| 1032 | { | ||
| 1033 | YY_BUFFER_STATE b; | ||
| 1034 | char *buf; | ||
| 1035 | @@ -2396,8 +2408,8 @@ YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len | ||
| 1036 | int i; | ||
| 1037 | |||
| 1038 | /* Get memory for full buffer, including space for trailing EOB's. */ | ||
| 1039 | - n = _yybytes_len + 2; | ||
| 1040 | - buf = (char *) yyalloc(n ); | ||
| 1041 | + n = (yy_size_t) (_yybytes_len + 2); | ||
| 1042 | + buf = (char *) yyalloc( n ); | ||
| 1043 | if ( ! buf ) | ||
| 1044 | YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); | ||
| 1045 | |||
| 1046 | @@ -2406,7 +2418,7 @@ YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len | ||
| 1047 | |||
| 1048 | buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; | ||
| 1049 | |||
| 1050 | - b = yy_scan_buffer(buf,n ); | ||
| 1051 | + b = yy_scan_buffer( buf, n ); | ||
| 1052 | if ( ! b ) | ||
| 1053 | YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); | ||
| 1054 | |||
| 1055 | @@ -2422,9 +2434,9 @@ YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len | ||
| 1056 | #define YY_EXIT_FAILURE 2 | ||
| 1057 | #endif | ||
| 1058 | |||
| 1059 | -static void yy_fatal_error (yyconst char* msg ) | ||
| 1060 | +static void yynoreturn yy_fatal_error (const char* msg ) | ||
| 1061 | { | ||
| 1062 | - (void) fprintf( stderr, "%s\n", msg ); | ||
| 1063 | + fprintf( stderr, "%s\n", msg ); | ||
| 1064 | exit( YY_EXIT_FAILURE ); | ||
| 1065 | } | ||
| 1066 | |||
| 1067 | @@ -2452,7 +2464,7 @@ static void yy_fatal_error (yyconst char* msg ) | ||
| 1068 | */ | ||
| 1069 | int yyget_lineno (void) | ||
| 1070 | { | ||
| 1071 | - | ||
| 1072 | + | ||
| 1073 | return yylineno; | ||
| 1074 | } | ||
| 1075 | |||
| 1076 | @@ -2475,7 +2487,7 @@ FILE *yyget_out (void) | ||
| 1077 | /** Get the length of the current token. | ||
| 1078 | * | ||
| 1079 | */ | ||
| 1080 | -yy_size_t yyget_leng (void) | ||
| 1081 | +int yyget_leng (void) | ||
| 1082 | { | ||
| 1083 | return yyleng; | ||
| 1084 | } | ||
| 1085 | @@ -2490,29 +2502,29 @@ char *yyget_text (void) | ||
| 1086 | } | ||
| 1087 | |||
| 1088 | /** Set the current line number. | ||
| 1089 | - * @param line_number | ||
| 1090 | + * @param _line_number line number | ||
| 1091 | * | ||
| 1092 | */ | ||
| 1093 | -void yyset_lineno (int line_number ) | ||
| 1094 | +void yyset_lineno (int _line_number ) | ||
| 1095 | { | ||
| 1096 | |||
| 1097 | - yylineno = line_number; | ||
| 1098 | + yylineno = _line_number; | ||
| 1099 | } | ||
| 1100 | |||
| 1101 | /** Set the input stream. This does not discard the current | ||
| 1102 | * input buffer. | ||
| 1103 | - * @param in_str A readable stream. | ||
| 1104 | + * @param _in_str A readable stream. | ||
| 1105 | * | ||
| 1106 | * @see yy_switch_to_buffer | ||
| 1107 | */ | ||
| 1108 | -void yyset_in (FILE * in_str ) | ||
| 1109 | +void yyset_in (FILE * _in_str ) | ||
| 1110 | { | ||
| 1111 | - yyin = in_str ; | ||
| 1112 | + yyin = _in_str ; | ||
| 1113 | } | ||
| 1114 | |||
| 1115 | -void yyset_out (FILE * out_str ) | ||
| 1116 | +void yyset_out (FILE * _out_str ) | ||
| 1117 | { | ||
| 1118 | - yyout = out_str ; | ||
| 1119 | + yyout = _out_str ; | ||
| 1120 | } | ||
| 1121 | |||
| 1122 | int yyget_debug (void) | ||
| 1123 | @@ -2520,9 +2532,9 @@ int yyget_debug (void) | ||
| 1124 | return yy_flex_debug; | ||
| 1125 | } | ||
| 1126 | |||
| 1127 | -void yyset_debug (int bdebug ) | ||
| 1128 | +void yyset_debug (int _bdebug ) | ||
| 1129 | { | ||
| 1130 | - yy_flex_debug = bdebug ; | ||
| 1131 | + yy_flex_debug = _bdebug ; | ||
| 1132 | } | ||
| 1133 | |||
| 1134 | static int yy_init_globals (void) | ||
| 1135 | @@ -2531,10 +2543,10 @@ static int yy_init_globals (void) | ||
| 1136 | * This function is called from yylex_destroy(), so don't allocate here. | ||
| 1137 | */ | ||
| 1138 | |||
| 1139 | - (yy_buffer_stack) = 0; | ||
| 1140 | + (yy_buffer_stack) = NULL; | ||
| 1141 | (yy_buffer_stack_top) = 0; | ||
| 1142 | (yy_buffer_stack_max) = 0; | ||
| 1143 | - (yy_c_buf_p) = (char *) 0; | ||
| 1144 | + (yy_c_buf_p) = NULL; | ||
| 1145 | (yy_init) = 0; | ||
| 1146 | (yy_start) = 0; | ||
| 1147 | |||
| 1148 | @@ -2543,8 +2555,8 @@ static int yy_init_globals (void) | ||
| 1149 | yyin = stdin; | ||
| 1150 | yyout = stdout; | ||
| 1151 | #else | ||
| 1152 | - yyin = (FILE *) 0; | ||
| 1153 | - yyout = (FILE *) 0; | ||
| 1154 | + yyin = NULL; | ||
| 1155 | + yyout = NULL; | ||
| 1156 | #endif | ||
| 1157 | |||
| 1158 | /* For future reference: Set errno on error, since we are called by | ||
| 1159 | @@ -2559,7 +2571,7 @@ int yylex_destroy (void) | ||
| 1160 | |||
| 1161 | /* Pop the buffer stack, destroying each element. */ | ||
| 1162 | while(YY_CURRENT_BUFFER){ | ||
| 1163 | - yy_delete_buffer(YY_CURRENT_BUFFER ); | ||
| 1164 | + yy_delete_buffer( YY_CURRENT_BUFFER ); | ||
| 1165 | YY_CURRENT_BUFFER_LVALUE = NULL; | ||
| 1166 | yypop_buffer_state(); | ||
| 1167 | } | ||
| 1168 | @@ -2580,18 +2592,19 @@ int yylex_destroy (void) | ||
| 1169 | */ | ||
| 1170 | |||
| 1171 | #ifndef yytext_ptr | ||
| 1172 | -static void yy_flex_strncpy (char* s1, yyconst char * s2, int n ) | ||
| 1173 | +static void yy_flex_strncpy (char* s1, const char * s2, int n ) | ||
| 1174 | { | ||
| 1175 | - register int i; | ||
| 1176 | + | ||
| 1177 | + int i; | ||
| 1178 | for ( i = 0; i < n; ++i ) | ||
| 1179 | s1[i] = s2[i]; | ||
| 1180 | } | ||
| 1181 | #endif | ||
| 1182 | |||
| 1183 | #ifdef YY_NEED_STRLEN | ||
| 1184 | -static int yy_flex_strlen (yyconst char * s ) | ||
| 1185 | +static int yy_flex_strlen (const char * s ) | ||
| 1186 | { | ||
| 1187 | - register int n; | ||
| 1188 | + int n; | ||
| 1189 | for ( n = 0; s[n]; ++n ) | ||
| 1190 | ; | ||
| 1191 | |||
| 1192 | @@ -2601,11 +2614,12 @@ static int yy_flex_strlen (yyconst char * s ) | ||
| 1193 | |||
| 1194 | void *yyalloc (yy_size_t size ) | ||
| 1195 | { | ||
| 1196 | - return (void *) malloc( size ); | ||
| 1197 | + return malloc(size); | ||
| 1198 | } | ||
| 1199 | |||
| 1200 | void *yyrealloc (void * ptr, yy_size_t size ) | ||
| 1201 | { | ||
| 1202 | + | ||
| 1203 | /* The cast to (char *) in the following accommodates both | ||
| 1204 | * implementations that use char* generic pointers, and those | ||
| 1205 | * that use void* generic pointers. It works with the latter | ||
| 1206 | @@ -2613,26 +2627,25 @@ void *yyrealloc (void * ptr, yy_size_t size ) | ||
| 1207 | * any pointer type to void*, and deal with argument conversions | ||
| 1208 | * as though doing an assignment. | ||
| 1209 | */ | ||
| 1210 | - return (void *) realloc( (char *) ptr, size ); | ||
| 1211 | + return realloc(ptr, size); | ||
| 1212 | } | ||
| 1213 | |||
| 1214 | void yyfree (void * ptr ) | ||
| 1215 | { | ||
| 1216 | - free( (char *) ptr ); /* see yyrealloc() for (char *) cast */ | ||
| 1217 | + free( (char *) ptr ); /* see yyrealloc() for (char *) cast */ | ||
| 1218 | } | ||
| 1219 | |||
| 1220 | #define YYTABLES_NAME "yytables" | ||
| 1221 | |||
| 1222 | -#line 235 "xmlif/xmlif.l" | ||
| 1223 | - | ||
| 1224 | +#line 236 "xmlif/xmlif.l" | ||
| 1225 | |||
| 1226 | #include <string.h> | ||
| 1227 | |||
| 1228 | #include "config.h" | ||
| 1229 | |||
| 1230 | -int yywrap() {exit(0);}; | ||
| 1231 | +int yywrap() {exit(0);} | ||
| 1232 | |||
| 1233 | -main(int argc, char *argv[]) | ||
| 1234 | +int main(int argc, char *argv[]) | ||
| 1235 | { | ||
| 1236 | int i; | ||
| 1237 | |||
| 1238 | @@ -2658,7 +2671,7 @@ main(int argc, char *argv[]) | ||
| 1239 | exit(1); | ||
| 1240 | } | ||
| 1241 | |||
| 1242 | - yylex(); | ||
| 1243 | + return yylex(); | ||
| 1244 | } | ||
| 1245 | |||
| 1246 | /* | ||
| 1247 | diff --git a/xmlif/xmlif.l b/xmlif/xmlif.l | ||
| 1248 | index 294fbc7..560508e 100644 | ||
| 1249 | --- a/xmlif/xmlif.l | ||
| 1250 | +++ b/xmlif/xmlif.l | ||
| 1251 | @@ -203,7 +203,7 @@ WS [ \t\n]* | ||
| 1252 | |||
| 1253 | %x attrib val | ||
| 1254 | |||
| 1255 | -%option batch never-interactive fast 8bit | ||
| 1256 | +%option batch never-interactive fast 8bit yywrap | ||
| 1257 | |||
| 1258 | %% | ||
| 1259 | <INITIAL>\<\?xmlif{WS}if{WS}not{WS} {BEGIN(attrib); ifsense = FALSE; push_level();} | ||
diff --git a/meta/recipes-devtools/xmlto/xmlto-0.0.28/0001-fix-Wimplicit-int-for-ifsense.patch b/meta/recipes-devtools/xmlto/xmlto-0.0.28/0001-fix-Wimplicit-int-for-ifsense.patch new file mode 100644 index 0000000000..d5c25ba08a --- /dev/null +++ b/meta/recipes-devtools/xmlto/xmlto-0.0.28/0001-fix-Wimplicit-int-for-ifsense.patch | |||
| @@ -0,0 +1,33 @@ | |||
| 1 | From 1375e2df75530cd198bd16ac3de38e2b0d126276 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Thomas Kuehne <thomas@kuehne.cn> | ||
| 3 | Date: Sat, 11 Dec 2021 21:10:41 +0100 | ||
| 4 | Subject: [PATCH] fix -Wimplicit-int for ifsense | ||
| 5 | MIME-Version: 1.0 | ||
| 6 | Content-Type: text/plain; charset=UTF-8 | ||
| 7 | Content-Transfer-Encoding: 8bit | ||
| 8 | |||
| 9 | fixes: | ||
| 10 | xmlif/xmlif.l:46:8: warning: type defaults to ‘int’ in declaration of ‘ifsense’ [-Wimplicit-int] | ||
| 11 | 46 | static ifsense; /* sense of last `if' or unless seen */ | ||
| 12 | | ^~~~~~~ | ||
| 13 | |||
| 14 | Signed-off-by: Thomas Kuehne <thomas@kuehne.cn> | ||
| 15 | Signed-off-by: Martin Jansa <martin.jansa@gmail.com> | ||
| 16 | Upstream-Status: Backport [v0.0.29 https://pagure.io/xmlto/c/1375e2df75530cd198bd16ac3de38e2b0d126276?branch=master | ||
| 17 | --- | ||
| 18 | xmlif/xmlif.l | 2 +- | ||
| 19 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
| 20 | |||
| 21 | diff --git a/xmlif/xmlif.l b/xmlif/xmlif.l | ||
| 22 | index ac42136..6e5970e 100644 | ||
| 23 | --- a/xmlif/xmlif.l | ||
| 24 | +++ b/xmlif/xmlif.l | ||
| 25 | @@ -43,7 +43,7 @@ | ||
| 26 | |||
| 27 | static char **selections; /* selection tokens */ | ||
| 28 | static int nselections; /* number of selections */ | ||
| 29 | -static ifsense; /* sense of last `if' or unless seen */ | ||
| 30 | +static int ifsense; /* sense of last `if' or unless seen */ | ||
| 31 | static char *attribute; /* last attribute scanned */ | ||
| 32 | |||
| 33 | struct stack_t { | ||
diff --git a/meta/recipes-devtools/xmlto/xmlto_0.0.28.bb b/meta/recipes-devtools/xmlto/xmlto_0.0.28.bb index 5cb9a4c57b..ce6680c507 100644 --- a/meta/recipes-devtools/xmlto/xmlto_0.0.28.bb +++ b/meta/recipes-devtools/xmlto/xmlto_0.0.28.bb | |||
| @@ -8,6 +8,9 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552" | |||
| 8 | 8 | ||
| 9 | SRC_URI = "https://releases.pagure.org/xmlto/xmlto-${PV}.tar.gz \ | 9 | SRC_URI = "https://releases.pagure.org/xmlto/xmlto-${PV}.tar.gz \ |
| 10 | file://configure.in-drop-the-test-of-xmllint-and-xsltproc.patch \ | 10 | file://configure.in-drop-the-test-of-xmllint-and-xsltproc.patch \ |
| 11 | file://0001-Fix-return-type-of-main-function.patch \ | ||
| 12 | file://0001-fix-Wimplicit-int-for-ifsense.patch \ | ||
| 13 | file://0001-Regenerate-the-xmlif.c-and-update-xmlif.l-to-comply-.patch \ | ||
| 11 | " | 14 | " |
| 12 | SRC_URI[md5sum] = "a1fefad9d83499a15576768f60f847c6" | 15 | SRC_URI[md5sum] = "a1fefad9d83499a15576768f60f847c6" |
| 13 | SRC_URI[sha256sum] = "2f986b7c9a0e9ac6728147668e776d405465284e13c74d4146c9cbc51fd8aad3" | 16 | SRC_URI[sha256sum] = "2f986b7c9a0e9ac6728147668e776d405465284e13c74d4146c9cbc51fd8aad3" |
| @@ -36,6 +39,13 @@ BBCLASSEXTEND = "native" | |||
| 36 | 39 | ||
| 37 | EXTRA_OECONF:append = " BASH=/bin/bash GCP=/bin/cp XMLLINT=xmllint XSLTPROC=xsltproc" | 40 | EXTRA_OECONF:append = " BASH=/bin/bash GCP=/bin/cp XMLLINT=xmllint XSLTPROC=xsltproc" |
| 38 | 41 | ||
| 42 | do_configure:prepend() { | ||
| 43 | # make sure xmlif.c is newer than xmlif.l after do_patch (order of | ||
| 44 | # .patch files in SRC_URI isn't enough) to prevent regenerating it | ||
| 45 | # with flex-native which isn't in DEPENDS | ||
| 46 | touch ${S}/xmlif/xmlif.c | ||
| 47 | } | ||
| 48 | |||
| 39 | do_install:append:class-native() { | 49 | do_install:append:class-native() { |
| 40 | create_wrapper ${D}${bindir}/xmlto XML_CATALOG_FILES=${sysconfdir}/xml/catalog | 50 | create_wrapper ${D}${bindir}/xmlto XML_CATALOG_FILES=${sysconfdir}/xml/catalog |
| 41 | } | 51 | } |
