]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Fix handling of here documents.
authorBruno Haible <bruno@clisp.org>
Mon, 15 May 2006 11:55:57 +0000 (11:55 +0000)
committerBruno Haible <bruno@clisp.org>
Tue, 23 Jun 2009 10:13:18 +0000 (12:13 +0200)
gettext-tools/src/ChangeLog
gettext-tools/src/x-php.c
gettext-tools/tests/ChangeLog
gettext-tools/tests/Makefile.am

index f6b2ce8393777f59450dfca70d0e495699e8a803..3126e2a4b41517aa46bf04c606182fa10d0e9fa9 100644 (file)
@@ -1,3 +1,8 @@
+2006-05-14  Bruno Haible  <bruno@clisp.org>
+
+       * x-php.c (x_php_lex): Fix handling of here documents.
+       Reported by GaĆ«tan Frenoy <gaetan@frenoy.net>.
+
 2006-05-12  Bruno Haible  <bruno@clisp.org>
 
        * write-csharp.c [MINGW]: Include <io.h>.
index 77c2b67a8d22abd11ec2944031167cc04ebaa283..29094a2e1433dfa047735149561f9f64b2d0eb9b 100644 (file)
@@ -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;
                          }
                      }
 
index cdb8c57a25f83d30e83fd2b577e34167af97e23d..61ddc45999b9fe42d450cfc4289f19ef1935e2db 100644 (file)
@@ -1,3 +1,8 @@
+2006-05-14  Bruno Haible  <bruno@clisp.org>
+
+       * xgettext-php-2: New file.
+       * Makefile.am (TESTS): Add it.
+
 2006-04-02  Bruno Haible  <bruno@clisp.org>
 
        * tstgettext.c: Include propername.h.
index 55b47a34f89d4694ca5e64836568047456b7f834..568b727258b0a83d3b5fc910c055222ce2a50f69 100644 (file)
@@ -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 \