[Freeciv-Dev] Re: [PATCH] I18n of int_to_text() (PR#517)
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Jeff Mallatt <jjm@xxxxxxxxxxxx> writes:
> > A priori, a locale doesn't _have_ to use grouping at
> >all, and I'm willing to bet a substantial amount of money that there
> >are locales out there that don't.
>
> Sure. But, pending a definitive interpretation of 'lc->grouping', a strict
> interpretation of the vague wording "0 means that the previous element is
> used" implies that an 'lc->grouping' of { '\0' } is *illegal* (there is no
> "previous element").
From the glibc manual:
In the standard `C' locale, both `grouping' and `mon_grouping'
have a value of `""'. This value specifies no grouping at all.
However, this particular section has lied to me before...
> Great. (Unfortunately, the patch I received didn't apply cleanly. It was
> only the last two hunks that didn't work, so I applied them manually.)
I think I removed a debug printf() call after making the diff.
Doesn't seem to work properly. Pity, really.
> Attached is a patch which applies cleanly, removes another #ifdef and
> reduces the code in init_nls() even further.
...and here is another patch, which fixes a tiny bug when grouping is
"" (peek past the end of the cached copy,) cleans up a bit more and
makes the cached copies const when configured with --disable-nls
(couldn't resist it.)
i18n-int_to_text-666.diff
Description: patch against current cvs
--
Big Gaute (not to be confused with LG)
.. So, if we convert SUPPLY-SIDE SOYBEAN FUTURES into
HIGH-YIELD T-BILL INDICATORS, the PRE-INFLATIONARY risks
will DWINDLE to a rate of 2 SHOPPING SPREES per EGGPLANT!!
|
|