[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] xgettext: make c-format guessing slightly more intelligent.
From: |
Bruno Haible |
Subject: |
Re: [PATCH] xgettext: make c-format guessing slightly more intelligent. |
Date: |
Wed, 11 Jul 2001 18:25:44 +0200 (CEST) |
Gaute B Strokkenes writes:
> Anyway, I have another patch, and this one fixes a _real_ bug.
>
> --- xgettext.c Tue Jul 10 23:06:47 2001
> +++ xgettext.c Tue Jul 10 23:05:26 2001
> @@ -1380,7 +1380,8 @@
> size_t dummy;
>
> (void) parse_one_spec (s, 0, &spec, &dummy);
> - if (strchr ("iduoxXeEfgGcspnm%", spec.info.spec) == NULL)
> + if (strchr ("iduoxXeEfgGcspnm%", spec.info.spec) == NULL
> + || !spec.info.spec) /* "This is 50%." */
> return impossible;
> }
>
> You need this because of a misfeature of strchr(). If the second
> argument is 0, then it returns the address of the string's terminating
> NUL. This causes stuff like "One half is 50%." to be marked as
> c-format.
Right. This patch will be added in gettext-0.11. Thanks a lot.
Bruno