Looking around a bit, I found that glibc provides a set of functions
to specify in which language we want the number to be parsed.
So instead of using atof() we can use strtof_l() if available.
No objection to check for the availability of this function, and only
if not, then revert to the setlocale()-based workaround ?
Was there any specific reason to use atoxx() rather than strtoxx(),
appart for them to be more concise ? I note that there are indeed a
couple of calls to strtoul(), so I guess it is not a portability
issue. Consistently using strto*_l(), #defined to their standard
strto*() counterparts when not available, would provide an easy way to
handle this.
What do you think ?
--
Yann Dirson <[EMAIL PROTECTED]> |
Debian-related: <[EMAIL PROTECTED]> | Support Debian GNU/Linux:
| Freedom, Power, Stability, Gratis
http://ydirson.free.fr/ | Check <http://www.debian.org/>