From: Daiki Ueno Date: Tue, 25 Jun 2013 03:55:57 +0000 (+0900) Subject: Revert the last change for \x handling in Tcl. X-Git-Tag: v0.18.3~17 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0e129bcc174a04e68adf4509e0079b85be84efe9;p=thirdparty%2Fgettext.git Revert the last change for \x handling in Tcl. --- diff --git a/gettext-tools/src/ChangeLog b/gettext-tools/src/ChangeLog index 4b0b4e49c..6fe4548bd 100644 --- a/gettext-tools/src/ChangeLog +++ b/gettext-tools/src/ChangeLog @@ -1,7 +1,7 @@ 2013-06-25 Daiki Ueno - Fix handling of \x and \u escape sequences in Tcl. - * x-tcl.c (do_getc_escaped): Fix handling of \x and \u. + Fix handling of \u escape sequences in Tcl. + * x-tcl.c (do_getc_escaped): Fix handling of \u. Reported by Guido Berhoerster in . diff --git a/gettext-tools/src/x-tcl.c b/gettext-tools/src/x-tcl.c index 2b57e3f1c..37dd19ec1 100644 --- a/gettext-tools/src/x-tcl.c +++ b/gettext-tools/src/x-tcl.c @@ -496,10 +496,7 @@ do_getc_escaped () { c = phase1_getc (); if (c == EOF || !c_isxdigit ((unsigned char) c)) - { - phase1_ungetc (c); - break; - } + break; if (c >= '0' && c <= '9') n = (n << 4) + (c - '0'); @@ -508,6 +505,7 @@ do_getc_escaped () else if (c >= 'a' && c <= 'f') n = (n << 4) + (c - 'a' + 10); } + phase1_ungetc (c); return (i > 0 ? (unsigned char) n : 'x'); } case 'u': diff --git a/gettext-tools/tests/ChangeLog b/gettext-tools/tests/ChangeLog index f036e07b6..12e4c7813 100644 --- a/gettext-tools/tests/ChangeLog +++ b/gettext-tools/tests/ChangeLog @@ -1,6 +1,6 @@ 2013-06-25 Daiki Ueno - Fix handling of \x and \u escape sequences in Tcl. + Fix handling of \u escape sequences in Tcl. * Makefile.am (TESTS): Add xgettext-tcl-4. * xgettext-tcl-4: New test for escape sequences.