From: Bruno Haible Date: Thu, 13 Jan 2005 12:13:26 +0000 (+0000) Subject: Fix endless loop when Tcl file contains a tab. X-Git-Tag: v0.14.2~151 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=595f67de67ccd9ad6a56a3de4da599b03f6f4a12;p=thirdparty%2Fgettext.git Fix endless loop when Tcl file contains a tab. --- diff --git a/gettext-tools/src/ChangeLog b/gettext-tools/src/ChangeLog index 4cf94b9e7..e846dc400 100644 --- a/gettext-tools/src/ChangeLog +++ b/gettext-tools/src/ChangeLog @@ -1,3 +1,8 @@ +2005-01-06 Bruno Haible + + * x-tcl.c (read_word): Ignore non-space whitespace at the beginning. + Reported by William J Poser . + 2005-01-06 Bruno Haible * write-csharp.c (msgdomain_write_csharp): Don't call fclose after diff --git a/gettext-tools/src/x-tcl.c b/gettext-tools/src/x-tcl.c index 75871b406..b895a63be 100644 --- a/gettext-tools/src/x-tcl.c +++ b/gettext-tools/src/x-tcl.c @@ -1,5 +1,5 @@ /* xgettext Tcl backend. - Copyright (C) 2002-2003 Free Software Foundation, Inc. + Copyright (C) 2002-2003, 2005 Free Software Foundation, Inc. This file was written by Bruno Haible , 2002. @@ -719,7 +719,8 @@ read_word (struct word *wp, int looking_for, flag_context_ty context) do c = phase2_getc (); - while (c == ' ' || c == BS_NL); + while (c == ' ' || c == BS_NL + || c == '\t' || c == '\v' || c == '\f' || c == '\r'); if (c == EOF) {