strtord.c (c88250a57d53dba5de2e77508383019ff63e88b6) | strtord.c (3c87aa1d3dc1d8dad3efad322852a8e1e76dee55) |
---|---|
1/**************************************************************** 2 3The author of this software is David M. Gay. 4 5Copyright (C) 1998, 2000 by Lucent Technologies 6All Rights Reserved 7 8Permission to use, copy, modify, and distribute this software and --- 56 unchanged lines hidden (view full) --- 65 L[1] = d_QNAN1; 66 } 67 if (k & STRTOG_Neg) 68 L[_0] |= 0x80000000L; 69 } 70 71 int 72#ifdef KR_headers | 1/**************************************************************** 2 3The author of this software is David M. Gay. 4 5Copyright (C) 1998, 2000 by Lucent Technologies 6All Rights Reserved 7 8Permission to use, copy, modify, and distribute this software and --- 56 unchanged lines hidden (view full) --- 65 L[1] = d_QNAN1; 66 } 67 if (k & STRTOG_Neg) 68 L[_0] |= 0x80000000L; 69 } 70 71 int 72#ifdef KR_headers |
73strtord(s, sp, rounding, d) CONST char *s; char **sp; int rounding; double *d; | 73strtord_l(s, sp, rounding, d, locale) CONST char *s; char **sp; int rounding; 74double *d; locale_t locale; |
74#else | 75#else |
75strtord(CONST char *s, char **sp, int rounding, double *d) | 76strtord_l(CONST char *s, char **sp, int rounding, double *d, locale_t locale) |
76#endif 77{ 78 static FPI fpi0 = { 53, 1-1023-53+1, 2046-1023-53+1, 1, SI }; 79 FPI *fpi, fpi1; 80 ULong bits[2]; 81 Long exp; 82 int k; 83 84 fpi = &fpi0; 85 if (rounding != FPI_Round_near) { 86 fpi1 = fpi0; 87 fpi1.rounding = rounding; 88 fpi = &fpi1; 89 } | 77#endif 78{ 79 static FPI fpi0 = { 53, 1-1023-53+1, 2046-1023-53+1, 1, SI }; 80 FPI *fpi, fpi1; 81 ULong bits[2]; 82 Long exp; 83 int k; 84 85 fpi = &fpi0; 86 if (rounding != FPI_Round_near) { 87 fpi1 = fpi0; 88 fpi1.rounding = rounding; 89 fpi = &fpi1; 90 } |
90 k = strtodg(s, sp, fpi, &exp, bits); | 91 k = strtodg_l(s, sp, fpi, &exp, bits, locale); |
91 ULtod((ULong*)d, bits, exp, k); 92 return k; 93 } | 92 ULtod((ULong*)d, bits, exp, k); 93 return k; 94 } |
95 |
|