From: Bruno Haible Date: Mon, 15 May 2006 11:55:57 +0000 (+0000) Subject: Fix handling of here documents. X-Git-Tag: v0.15~146 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=751b64473b3a34452348e737c36f229d25903194;p=thirdparty%2Fgettext.git Fix handling of here documents. --- diff --git a/gettext-tools/src/ChangeLog b/gettext-tools/src/ChangeLog index f6b2ce839..3126e2a4b 100644 --- a/gettext-tools/src/ChangeLog +++ b/gettext-tools/src/ChangeLog @@ -1,3 +1,8 @@ +2006-05-14 Bruno Haible + + * x-php.c (x_php_lex): Fix handling of here documents. + Reported by Gaëtan Frenoy . + 2006-05-12 Bruno Haible * write-csharp.c [MINGW]: Include . diff --git a/gettext-tools/src/x-php.c b/gettext-tools/src/x-php.c index 77c2b67a8..29094a2e1 100644 --- a/gettext-tools/src/x-php.c +++ b/gettext-tools/src/x-php.c @@ -1138,13 +1138,17 @@ x_php_lex (token_ty *tp) phase1_ungetc (c); break; } + bufidx++; + } + if (bufidx == bufpos) + { + c = phase1_getc (); + if (c != ';') + phase1_ungetc (c); + c = phase1_getc (); + if (c == '\n' || c == '\r') + break; } - c = phase1_getc (); - if (c != ';') - phase1_ungetc (c); - c = phase1_getc (); - if (c == '\n' || c == '\r') - break; } } diff --git a/gettext-tools/tests/ChangeLog b/gettext-tools/tests/ChangeLog index cdb8c57a2..61ddc4599 100644 --- a/gettext-tools/tests/ChangeLog +++ b/gettext-tools/tests/ChangeLog @@ -1,3 +1,8 @@ +2006-05-14 Bruno Haible + + * xgettext-php-2: New file. + * Makefile.am (TESTS): Add it. + 2006-04-02 Bruno Haible * tstgettext.c: Include propername.h. diff --git a/gettext-tools/tests/Makefile.am b/gettext-tools/tests/Makefile.am index 55b47a34f..568b72725 100644 --- a/gettext-tools/tests/Makefile.am +++ b/gettext-tools/tests/Makefile.am @@ -79,7 +79,7 @@ TESTS = gettext-1 gettext-2 gettext-3 gettext-4 gettext-5 gettext-6 gettext-7 \ xgettext-objc-1 xgettext-objc-2 \ xgettext-perl-1 xgettext-perl-2 xgettext-perl-3 xgettext-perl-4 \ xgettext-perl-5 \ - xgettext-php-1 \ + xgettext-php-1 xgettext-php-2 \ xgettext-po-1 \ xgettext-properties-1 \ xgettext-python-1 xgettext-python-2 xgettext-python-3 \