diff options
author | das <das@FreeBSD.org> | 2003-03-19 20:23:29 +0000 |
---|---|---|
committer | das <das@FreeBSD.org> | 2003-03-19 20:23:29 +0000 |
commit | 375d3f8cdbff37bbc427464bd2d61a5b14135acd (patch) | |
tree | c887fc22683dd3a2d7e07d6fa0c55f75f1175c7e /contrib/gdtoa/strtod.c | |
parent | db3a0f1435efcb4461005cb8d8509bff01f9b018 (diff) | |
download | FreeBSD-src-375d3f8cdbff37bbc427464bd2d61a5b14135acd.zip FreeBSD-src-375d3f8cdbff37bbc427464bd2d61a5b14135acd.tar.gz |
Import gdtoa sources dated 20030318, which contain several locale fixes.
Reviewed by: mike (mentor)
Diffstat (limited to 'contrib/gdtoa/strtod.c')
-rw-r--r-- | contrib/gdtoa/strtod.c | 25 |
1 files changed, 4 insertions, 21 deletions
diff --git a/contrib/gdtoa/strtod.c b/contrib/gdtoa/strtod.c index 3c0e0c4..0a559d5 100644 --- a/contrib/gdtoa/strtod.c +++ b/contrib/gdtoa/strtod.c @@ -85,9 +85,6 @@ strtod #ifdef Honor_FLT_ROUNDS int rounding; #endif -#ifdef USE_LOCALE - CONST char *s2; -#endif sign = nz0 = nz = 0; dval(rv) = 0.; @@ -150,25 +147,11 @@ strtod z = 10*z + c - '0'; nd0 = nd; #ifdef USE_LOCALE - s1 = localeconv()->decimal_point; - if (c == *s1) { - c = '.'; - if (*++s1) { - s2 = s; - for(;;) { - if (*++s2 != *s1) { - c = 0; - break; - } - if (!*++s1) { - s = s2; - break; - } - } - } - } + if (c == *localeconv()->decimal_point) +#else + if (c == '.') #endif - if (c == '.') { + { c = *++s; if (!nd) { for(; c == '0'; c = *++s) |