Re: [gtk-list] Re: locale affects (infects? ;) strtod()
- From: Tom Tromey <tromey creche cygnus com>
- To: Owen Taylor <owt1 cornell edu>
- Cc: Gtk+ Mailing List <gtk-list redhat com>, GNOME mailing-list <gnome nuclecu unam mx>
- Subject: Re: [gtk-list] Re: locale affects (infects? ;) strtod()
- Date: 20 Dec 1997 11:33:39 -0700
>> #include <locale.h>
>> char *old = setlocale (LC_NUMERIC, "C");
>> ... strtod (...) /* will use C rules */
>> setlocale (LC_NUMERIC, old);
Owen> The only problem with this is that it isn't thread safe. (I
Owen> think locales are global, not thread-specific). But I don't know
Owen> if anything can be doen about that...
Good point. Another choice would be to have a C-locale-specific
strtod() replacement. There's one in Tcl that we could lift. If
somebody is working on this, I'd be happy to email them the file.
Tom
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]