]> granicus.if.org Git - flex/commitdiff
complete john millaway's reentrant patch
authorWill Estes <wlestes@users.sourceforge.net>
Mon, 21 May 2001 19:50:45 +0000 (19:50 +0000)
committerWill Estes <wlestes@users.sourceforge.net>
Mon, 21 May 2001 19:50:45 +0000 (19:50 +0000)
gen.c

diff --git a/gen.c b/gen.c
index 22632ee4f3433b90d4d39d0cd84a82d5e17ed43b..ef51baa703feda5f9e220b2727732963c47c6050 100644 (file)
--- a/gen.c
+++ b/gen.c
@@ -1427,13 +1427,13 @@ void make_tables()
                indent_puts( "{" );
                indent_puts( "int yyl;" );
                do_indent();
-               out_str( "for ( yyl = %s; yyl < yyleng; ++yyl )\n",
+               out_str( "for ( yyl = %s; yyl < YY_G(yyleng); ++yyl )\n",
                        yymore_used ? (yytext_is_array ? "yy_prev_more_offset" :
                                                         "yy_more_len") : "0");
                indent_up();
-               indent_puts( "if ( yytext[yyl] == '\\n' )" );
+               indent_puts( "if ( YY_G(yytext)[yyl] == '\\n' )" );
                indent_up();
-               indent_puts( "++yylineno;" );
+               indent_puts( "++YY_G(yylineno);" );
                indent_down();
                indent_down();
                indent_puts( "}" );