From: Daiki Ueno Date: Sat, 7 Jun 2014 01:35:14 +0000 (+0900) Subject: xgettext: Fix misrecognition of character literals in C and Vala X-Git-Tag: v0.19.1~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d5f16c16df9131b7591ae9a3f0ecd0acb88109d3;p=thirdparty%2Fgettext.git xgettext: Fix misrecognition of character literals in C and Vala Problem reported by Paul Eggert at . * x-c.c (phase5_get): Make sure to skip contents of character constant. * x-vala.c (phase3_get): Likewise. --- diff --git a/gettext-tools/src/ChangeLog b/gettext-tools/src/ChangeLog index b766d30a7..f492e0076 100644 --- a/gettext-tools/src/ChangeLog +++ b/gettext-tools/src/ChangeLog @@ -1,3 +1,11 @@ +2014-06-07 Daiki Ueno + + xgettext: Fix misrecognition of character literals in C and Vala + Problem reported by Paul Eggert at + . + * x-c.c (phase5_get): Make sure to skip contents of character constant. + * x-vala.c (phase3_get): Likewise. + 2014-06-03 Daiki Ueno desktop: Use logical filename as msgid location diff --git a/gettext-tools/src/x-c.c b/gettext-tools/src/x-c.c index 2ae2f3c9e..203eb796f 100644 --- a/gettext-tools/src/x-c.c +++ b/gettext-tools/src/x-c.c @@ -1288,6 +1288,8 @@ phase5_get (token_ty *tp) { case '\\': last_was_backslash = true; + /* FALLTHROUGH */ + default: continue; case '\n': error_with_progname = false; @@ -1299,7 +1301,7 @@ phase5_get (token_ty *tp) case EOF: case '\'': break; } - break; + break; } tp->type = token_type_character_constant; return; diff --git a/gettext-tools/src/x-vala.c b/gettext-tools/src/x-vala.c index 1d88f47a7..288f9b7f5 100644 --- a/gettext-tools/src/x-vala.c +++ b/gettext-tools/src/x-vala.c @@ -622,6 +622,8 @@ phase3_get (token_ty *tp) { case '\\': last_was_backslash = true; + /* FALLTHROUGH */ + default: continue; case '\n': error_with_progname = false;