Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: PATCH: math and locale
- X-seq: zsh-workers 8701
- From: Clint Adams <schizo@xxxxxxxxxx>
- To: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxxxxxxxxx>
- Subject: Re: PATCH: math and locale
- Date: Sun, 21 Nov 1999 13:14:32 -0500
- Cc: zsh-workers@xxxxxxxxxxxxxx
- In-reply-to: <991120205331.ZM15647@xxxxxxxxxxxxxxxxxxxxxxx>; from schaefer@xxxxxxxxxxxxxxxxxxxxxxx on Sat, Nov 20, 1999 at 08:53:31PM +0000
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
- References: <19991120151807.A22546@xxxxxxxx> <991120205331.ZM15647@xxxxxxxxxxxxxxxxxxxxxxx>
> I'm mildly concerned that setting and restoring the locale is an excessive
> overhead, especially if it's a no-op (prev_local is already "POSIX" or "C").
> Can anyone reassure me?
I see that the setlocale code is a bit meatier than I would have expected.
On the other hand, a few string comparisons followed by setlocale is
potentially even worse for those using other than C/POSIX.
GNU libc seems to have an "extended locale model" allowing strtod to
take a locale argument; however, this is neither portable nor standardized.
I'm also beginning to wonder if prev_locale won't get clobbered somehow.
> I also wonder whether "C" would not be a better choice than "POSIX" here.
On sheer byte count or by some other criterion?
Messages sorted by:
Reverse Date,
Date,
Thread,
Author