flex/flex-2.6.0-yyless.patch

32 lines
1.1 KiB
Diff

Index: b/src/flex.skl
===================================================================
--- a/src/flex.skl
+++ b/src/flex.skl
@@ -494,7 +494,7 @@ m4_ifdef( [[M4_YY_NOT_IN_HEADER]],
*/
#define YY_LESS_LINENO(n) \
do { \
- int yyl;\
+ yy_size_t yyl;\
for ( yyl = n; yyl < yyleng; ++yyl )\
if ( yytext[yyl] == '\n' )\
--yylineno;\
@@ -520,7 +520,7 @@ m4_ifdef( [[M4_YY_NOT_IN_HEADER]],
do \
{ \
/* Undo effects of setting up yytext. */ \
- int yyless_macro_arg = (n); \
+ yy_size_t yyless_macro_arg = (n); \
YY_LESS_LINENO(yyless_macro_arg);\
*yy_cp = YY_G(yy_hold_char); \
YY_RESTORE_YY_MORE_OFFSET \
@@ -2576,7 +2576,7 @@ void yyFlexLexer::LexerError( yyconst ch
do \
{ \
/* Undo effects of setting up yytext. */ \
- int yyless_macro_arg = (n); \
+ yy_size_t yyless_macro_arg = (n); \
YY_LESS_LINENO(yyless_macro_arg);\
yytext[yyleng] = YY_G(yy_hold_char); \
YY_G(yy_c_buf_p) = yytext + yyless_macro_arg; \