strtod.c (112158) | strtod.c (112415) |
---|---|
1/**************************************************************** 2 3The author of this software is David M. Gay. 4 5Copyright (C) 1998-2001 by Lucent Technologies 6All Rights Reserved 7 8Permission to use, copy, modify, and distribute this software and --- 71 unchanged lines hidden (view full) --- 80 ULong y, z; 81 Bigint *bb, *bb1, *bd, *bd0, *bs, *delta; 82#ifdef SET_INEXACT 83 int inexact, oldinexact; 84#endif 85#ifdef Honor_FLT_ROUNDS 86 int rounding; 87#endif | 1/**************************************************************** 2 3The author of this software is David M. Gay. 4 5Copyright (C) 1998-2001 by Lucent Technologies 6All Rights Reserved 7 8Permission to use, copy, modify, and distribute this software and --- 71 unchanged lines hidden (view full) --- 80 ULong y, z; 81 Bigint *bb, *bb1, *bd, *bd0, *bs, *delta; 82#ifdef SET_INEXACT 83 int inexact, oldinexact; 84#endif 85#ifdef Honor_FLT_ROUNDS 86 int rounding; 87#endif |
88#ifdef USE_LOCALE 89 CONST char *s2; 90#endif | |
91 92 sign = nz0 = nz = 0; 93 dval(rv) = 0.; 94 for(s = s00;;s++) switch(*s) { 95 case '-': 96 sign = 1; 97 /* no break */ 98 case '+': --- 46 unchanged lines hidden (view full) --- 145 y = z = 0; 146 for(nd = nf = 0; (c = *s) >= '0' && c <= '9'; nd++, s++) 147 if (nd < 9) 148 y = 10*y + c - '0'; 149 else if (nd < 16) 150 z = 10*z + c - '0'; 151 nd0 = nd; 152#ifdef USE_LOCALE | 88 89 sign = nz0 = nz = 0; 90 dval(rv) = 0.; 91 for(s = s00;;s++) switch(*s) { 92 case '-': 93 sign = 1; 94 /* no break */ 95 case '+': --- 46 unchanged lines hidden (view full) --- 142 y = z = 0; 143 for(nd = nf = 0; (c = *s) >= '0' && c <= '9'; nd++, s++) 144 if (nd < 9) 145 y = 10*y + c - '0'; 146 else if (nd < 16) 147 z = 10*z + c - '0'; 148 nd0 = nd; 149#ifdef USE_LOCALE |
153 s1 = localeconv()->decimal_point; 154 if (c == *s1) { 155 c = '.'; 156 if (*++s1) { 157 s2 = s; 158 for(;;) { 159 if (*++s2 != *s1) { 160 c = 0; 161 break; 162 } 163 if (!*++s1) { 164 s = s2; 165 break; 166 } 167 } 168 } 169 } | 150 if (c == *localeconv()->decimal_point) 151#else 152 if (c == '.') |
170#endif | 153#endif |
171 if (c == '.') { | 154 { |
172 c = *++s; 173 if (!nd) { 174 for(; c == '0'; c = *++s) 175 nz++; 176 if (c > '0' && c <= '9') { 177 s0 = s; 178 nf += nz; 179 nz = 0; --- 806 unchanged lines hidden --- | 155 c = *++s; 156 if (!nd) { 157 for(; c == '0'; c = *++s) 158 nz++; 159 if (c > '0' && c <= '9') { 160 s0 = s; 161 nf += nz; 162 nz = 0; --- 806 unchanged lines hidden --- |