bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: xgettext 0.15 diagnostic prints wrong file name, line number


From: Bruno Haible
Subject: Re: xgettext 0.15 diagnostic prints wrong file name, line number
Date: Tue, 8 Aug 2006 15:01:34 +0200
User-agent: KMail/1.9.1

Paul Eggert wrote:
> I ran into this minor problem when bootstrapping GNU tar with gettext
> 0.15.  This is on Debian stable, where I've built gettext myself.
> Here are the symptoms:
> 
>    $ cat t.c
>    char const x[] = N_("\v");
>    $ xgettext --keyword=N_ t.c
>    ../../../gettext-0.15/gettext-tools/src/xgettext.c:2038: internationalized 
> messages should not contain the `\v' escape sequence
> 
> The first part of that diagnostic should say "t.c:1" rather than refer
> to the gettext source.

You're right. I'm applying the appended patch. Thanks.


2006-08-07  Bruno Haible  <address@hidden>

        * xgettext.c (remember_a_message): Use the position passed as argument
        instead of a dummypos.
        Reported by Paul Eggert <address@hidden>.

diff -r -c3 --exclude='*.po*' --exclude='*.info*' --exclude='*_*.html' 
--exclude='*.*.html' --exclude='*.[13]' --exclude='*.1.in' 
--exclude=Makefile.in --exclude=aclocal.m4 --exclude=configure 
--exclude=version.texi --exclude=stamp-vti --exclude='po-*-gen*.[ch]' 
--exclude='*.o' --exclude='*.lo' --exclude='*.gmo' --exclude=ABOUT-NLS 
--exclude='javadoc[12]' --exclude=CVS gettext-cvs/gettext-tools/src/xgettext.c 
gettext-6/gettext-tools/src/xgettext.c
*** gettext-cvs/gettext-tools/src/xgettext.c    Sun Jul 30 14:23:59 2006
--- gettext-6/gettext-tools/src/xgettext.c      Tue Aug  8 00:32:31 2006
***************
*** 2035,2042 ****
      }
    else
      {
-       static lex_pos_ty dummypos = { __FILE__, __LINE__ };
- 
        /* Construct the msgstr from the prefix and suffix, otherwise use the
         empty string.  */
        if (msgstr_prefix)
--- 2035,2040 ----
***************
*** 2046,2052 ****
  
        /* Allocate a new message and append the message to the list.  */
        mp = message_alloc (msgctxt, msgid, NULL, msgstr, strlen (msgstr) + 1,
!                         &dummypos);
        /* Do not free msgctxt and msgid.  */
        message_list_append (mlp, mp);
      }
--- 2044,2050 ----
  
        /* Allocate a new message and append the message to the list.  */
        mp = message_alloc (msgctxt, msgid, NULL, msgstr, strlen (msgstr) + 1,
!                         pos);
        /* Do not free msgctxt and msgid.  */
        message_list_append (mlp, mp);
      }




reply via email to

[Prev in Thread] Current Thread [Next in Thread]