summaryrefslogtreecommitdiffstats
path: root/contrib/gdtoa/strtodg.c
diff options
context:
space:
mode:
authordas <das@FreeBSD.org>2003-03-19 20:23:29 +0000
committerdas <das@FreeBSD.org>2003-03-19 20:23:29 +0000
commit375d3f8cdbff37bbc427464bd2d61a5b14135acd (patch)
treec887fc22683dd3a2d7e07d6fa0c55f75f1175c7e /contrib/gdtoa/strtodg.c
parentdb3a0f1435efcb4461005cb8d8509bff01f9b018 (diff)
downloadFreeBSD-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/strtodg.c')
-rw-r--r--contrib/gdtoa/strtodg.c25
1 files changed, 4 insertions, 21 deletions
diff --git a/contrib/gdtoa/strtodg.c b/contrib/gdtoa/strtodg.c
index ec2cbfd..5b8409b 100644
--- a/contrib/gdtoa/strtodg.c
+++ b/contrib/gdtoa/strtodg.c
@@ -59,9 +59,6 @@ increment(Bigint *b)
{
ULong *x, *xe;
Bigint *b1;
-#ifdef USE_LOCALE
- CONST char *s2;
-#endif
#ifdef Pack_16
ULong carry = 1, y;
#endif
@@ -399,25 +396,11 @@ strtodg
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)
OpenPOWER on IntegriCloud