[PATCH 2/3] Revert "wrc: Use an EOF rule instead of lex_destroy for compatibility with prediluvian flex versions."

Michael Stefaniuc mstefani at redhat.de
Tue Dec 29 11:07:22 CST 2009


This reverts commit 1405c00ecbcf5509c9475759b8230c019070b663.
Wine requires now a new enough flex version.
---
 tools/wrc/parser.h |    1 +
 tools/wrc/parser.l |    1 -
 tools/wrc/wrc.c    |    1 +
 3 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/tools/wrc/parser.h b/tools/wrc/parser.h
index b9e2045..e9fc8e6 100644
--- a/tools/wrc/parser.h
+++ b/tools/wrc/parser.h
@@ -34,5 +34,6 @@ extern char *parser_text;
 extern int yy_flex_debug;
 
 int parser_lex(void);
+int parser_lex_destroy(void);
 
 #endif
diff --git a/tools/wrc/parser.l b/tools/wrc/parser.l
index 2cb7937..e048665 100644
--- a/tools/wrc/parser.l
+++ b/tools/wrc/parser.l
@@ -588,7 +588,6 @@ L\"			{
                                              isprint((unsigned char)*yytext) ? *yytext : '.', *yytext, YY_START);
 			}
 
-<<EOF>>			current_codepage = -1; yyterminate();
 %%
 
 /* These dup functions copy the enclosed '\0' from
diff --git a/tools/wrc/wrc.c b/tools/wrc/wrc.c
index 7dd91fb..3c7b176 100644
--- a/tools/wrc/wrc.c
+++ b/tools/wrc/wrc.c
@@ -304,6 +304,7 @@ static int load_file( const char *input_name, const char *output_name )
 
     ret = parser_parse();
     fclose(parser_in);
+    parser_lex_destroy();
     if (temp_name)
     {
         unlink( temp_name );
-- 
1.6.6



More information about the wine-patches mailing list