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

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

Bug#269059: xgettext misparses Perl source (-s $filename is treated as s


From: Santiago Vila
Subject: Bug#269059: xgettext misparses Perl source (-s $filename is treated as s$filename$$;) (fwd)
Date: Wed, 1 Sep 2004 11:09:57 +0200 (CEST)

Hello.

I received this report from the Debian bug system:

---------- Forwarded message ----------
From: Ryan Anderson <address@hidden>
To: Debian Bug Tracking System <address@hidden>
Date: Mon, 30 Aug 2004 12:35:54 -0400
Subject: Bug#269059: xgettext misparses Perl source (-s $filename is treated as
    s$filename$$;)

Package: gettext
Version: 0.14.1-2
Severity: normal

        if (!defined($size = -s $filename)) {

xgettext is mis-parsing the -s function as <minus> <substitute>. The
character following the "s" (i.e. "$") is interpreted as the delimiter for
the substitute, so it looks for two more "$" signs.  It finds them inside
quoted strings, so from that point on, all strings are inside-out.

Changing this line to
   $size = -s $filename; #$$;
   if (!defined($size)) {

works fine, because xgettext finds three $ signs on the same line

To restate this slightly, xgettext is seeing:
        -s $filename 
and thinking it is really part of:
        - s$filename$$;

As above, there is a work around, but this is confusing.

-- System Information:
Debian Release: testing/unstable
  APT prefers testing
  APT policy: (900, 'testing'), (300, 'unstable')
Architecture: i386 (i686)
Kernel: Linux 2.6.6-1-686
Locale: LANG=C, LC_CTYPE=C

Versions of packages gettext depends on:
ii  gettext-base                0.14.1-2     GNU Internationalization utilities
ii  libc6                       2.3.2.ds1-13 GNU C Library: Shared libraries an

-- no debconf information




reply via email to

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