From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 860 invoked from network); 21 Nov 1999 18:14:44 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 21 Nov 1999 18:14:44 -0000 Received: (qmail 24647 invoked by alias); 21 Nov 1999 18:14:36 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 8701 Received: (qmail 24639 invoked from network); 21 Nov 1999 18:14:35 -0000 Date: Sun, 21 Nov 1999 13:14:32 -0500 From: Clint Adams To: Bart Schaefer Cc: zsh-workers@sunsite.auc.dk Subject: Re: PATCH: math and locale Message-ID: <19991121131432.C31314@dman.com> References: <19991120151807.A22546@dman.com> <991120205331.ZM15647@candle.brasslantern.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii User-Agent: Mutt/1.0i In-Reply-To: <991120205331.ZM15647@candle.brasslantern.com>; from schaefer@candle.brasslantern.com on Sat, Nov 20, 1999 at 08:53:31PM +0000 > 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?