Module: wine Branch: master Commit: fc8c8a52517725f264071e60679b23a7ac6cd080 URL: http://source.winehq.org/git/wine.git/?a=commit;h=fc8c8a52517725f264071e6067...
Author: Alexandre Julliard julliard@winehq.org Date: Thu Jul 16 11:15:15 2009 +0200
wrc: Report an error when encountering non-ASCII characters.
---
tools/wrc/parser.l | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/tools/wrc/parser.l b/tools/wrc/parser.l index d92e973..cafa35a 100644 --- a/tools/wrc/parser.l +++ b/tools/wrc/parser.l @@ -573,7 +573,7 @@ L" { } {ws}+ want_id = wanted_id; /* Eat whitespace */
-<INITIAL>. return yytext[0]; +<INITIAL>[ -~] return yytext[0];
<*>.|\n { /* Catch all rule to find any unmatched text */ @@ -582,8 +582,8 @@ L" { line_number++; char_number = 1; } - parser_warning("Unmatched text '%c' (0x%02x) YY_START=%d\n", - isprint(*yytext & 0xff) ? *yytext : '.', *yytext, YY_START); + parser_error("Unmatched text '%c' (0x%02x) YY_START=%d", + isprint((unsigned char)*yytext) ? *yytext : '.', *yytext, YY_START); }
<<EOF>> current_codepage = -1; yyterminate();