diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2000-08-31 04:26:23 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2000-08-31 04:26:23 +0000 |
commit | ebd4816b80e45b053b1e4c5e7ff68fe4dcfcd7c8 (patch) | |
tree | 47ee05eab89c0f14582cc0220068a55586f1cba2 /util.c | |
parent | 971f4bf107c4114680b92221b21d1da9ec393811 (diff) | |
download | perl-ebd4816b80e45b053b1e4c5e7ff68fe4dcfcd7c8.tar.gz |
sscanf() may be the only way to read long doubles from strings.
p4raw-id: //depot/perl@6937
Diffstat (limited to 'util.c')
-rw-r--r-- | util.c | 13 |
1 files changed, 7 insertions, 6 deletions
@@ -3875,23 +3875,24 @@ Perl_my_fflush_all(pTHX) NV Perl_my_atof(pTHX_ const char* s) { + NV x = 0.0; #ifdef USE_LOCALE_NUMERIC if ((PL_hints & HINT_LOCALE) && PL_numeric_local) { - NV x, y; + NV y; - x = Perl_atof(s); + Perl_atof2(s, x); SET_NUMERIC_STANDARD(); - y = Perl_atof(s); + Perl_atof2(s, y); SET_NUMERIC_LOCAL(); if ((y < 0.0 && y < x) || (y > 0.0 && y > x)) return y; - return x; } else - return Perl_atof(s); + Perl_atof2(s, x); #else - return Perl_atof(s); + Perl_atof2(s, x); #endif + return x; } void |