diff options
author | wlestes <wlestes> | 2001-06-24 22:33:13 +0000 |
---|---|---|
committer | wlestes <wlestes> | 2001-06-24 22:33:13 +0000 |
commit | fa61517ea6f7aac3151fede27061e88acd94b5a6 (patch) | |
tree | 42804d14bfc42c8edb2576b3f530c166457aaa65 /gen.c | |
parent | 74accdc46b123b92c61a91644717ee03e39483bb (diff) | |
download | flex-fa61517ea6f7aac3151fede27061e88acd94b5a6.tar.gz |
change some int types to size_t as per FreeBSD 28364 from avn@any.ru
Diffstat (limited to 'gen.c')
-rw-r--r-- | gen.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -1074,11 +1074,11 @@ void make_tables() if ( yymore_used && ! yytext_is_array ) { indent_puts( "YY_G(yytext_ptr) -= YY_G(yy_more_len); \\" ); - indent_puts( "YY_G(yyleng) = (int) (yy_cp - YY_G(yytext_ptr)); \\" ); + indent_puts( "YY_G(yyleng) = (size_t) (yy_cp - YY_G(yytext_ptr)); \\" ); } else - indent_puts( "YY_G(yyleng) = (int) (yy_cp - yy_bp); \\" ); + indent_puts( "YY_G(yyleng) = (size_t) (yy_cp - yy_bp); \\" ); /* Now also deal with copying yytext_ptr to yytext if needed. */ skelout(); @@ -1355,7 +1355,8 @@ void make_tables() outn( "\tif ( YY_G(yy_current_buffer)->yy_is_interactive ) \\" ); outn( "\t\t{ \\" ); - outn( "\t\tint c = '*', n; \\" ); + outn( "\t\tint c = '*'; \\"); + outn( "\t\tsize_t n; \\" ); outn( "\t\tfor ( n = 0; n < max_size && \\" ); outn( "\t\t\t (c = getc( YY_G(yyin) )) != EOF && c != '\\n'; ++n ) \\" ); outn( "\t\t\tbuf[n] = (char) c; \\" ); |