diff options
author | Russ Cox <rsc@swtch.com> | 2009-07-29 11:29:36 -0400 |
---|---|---|
committer | Russ Cox <rsc@swtch.com> | 2009-07-29 11:29:36 -0400 |
commit | d17b040302063f2b71e19aadd2184ace26636e2c (patch) | |
tree | 8d353e32bcb37d835cd4128a1ffcb9a0646395ee /src/lib9 | |
parent | 8e5ae416a70837f5d1ae07142797bb708284f4d5 (diff) | |
download | plan9port-d17b040302063f2b71e19aadd2184ace26636e2c.tar.gz plan9port-d17b040302063f2b71e19aadd2184ace26636e2c.tar.bz2 plan9port-d17b040302063f2b71e19aadd2184ace26636e2c.zip |
libfmt: use fmtstrtod, not system strtod
http://codereview.appspot.com/96185
Diffstat (limited to 'src/lib9')
-rw-r--r-- | src/lib9/fmt/fltfmt.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lib9/fmt/fltfmt.c b/src/lib9/fmt/fltfmt.c index 624f46a6..bfeb7e50 100644 --- a/src/lib9/fmt/fltfmt.c +++ b/src/lib9/fmt/fltfmt.c @@ -243,7 +243,7 @@ xdtoa(double f, char *s, int *exp, int *neg, int *ns) * adjust conversion until strtod(s) == f exactly. */ for(i=0; i<10; i++) { - g = strtod(s, nil); + g = fmtstrtod(s, nil); if(f > g) { if(xadd1(s, NSIGNIF)) { /* gained a digit */ @@ -274,7 +274,7 @@ xdtoa(double f, char *s, int *exp, int *neg, int *ns) c = s[i]; if(c != '9') { s[i] = '9'; - g = strtod(s, nil); + g = fmtstrtod(s, nil); if(g != f) { s[i] = c; break; @@ -292,7 +292,7 @@ xdtoa(double f, char *s, int *exp, int *neg, int *ns) ee--; xfmtexp(tmp+NSIGNIF, ee, 0); } - g = strtod(tmp, nil); + g = fmtstrtod(tmp, nil); if(g == f) { strcpy(s, tmp); e = ee; @@ -306,7 +306,7 @@ xdtoa(double f, char *s, int *exp, int *neg, int *ns) c = s[i]; if(c != '0') { s[i] = '0'; - g = strtod(s, nil); + g = fmtstrtod(s, nil); if(g != f) { s[i] = c; break; |