strtorQ.c (fb048cca0c021e5f7edb58147f3c7888d9be801f) | strtorQ.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 --- 89 unchanged lines hidden (view full) --- 98 L[3] = ld_QNAN3; 99 } 100 if (k & STRTOG_Neg) 101 L[_0] |= 0x80000000L; 102 } 103 104 int 105#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 --- 89 unchanged lines hidden (view full) --- 98 L[3] = ld_QNAN3; 99 } 100 if (k & STRTOG_Neg) 101 L[_0] |= 0x80000000L; 102 } 103 104 int 105#ifdef KR_headers |
106strtorQ(s, sp, rounding, L) CONST char *s; char **sp; int rounding; void *L; | 106strtorQ_l(s, sp, rounding, L, locale) CONST char *s; char **sp; int rounding; 107void *L; locale_t locale; |
107#else | 108#else |
108strtorQ(CONST char *s, char **sp, int rounding, void *L) | 109strtorQ_l(CONST char *s, char **sp, int rounding, void *L, locale_t locale) |
109#endif 110{ 111 static FPI fpi0 = { 113, 1-16383-113+1, 32766-16383-113+1, 1, SI }; 112 FPI *fpi, fpi1; 113 ULong bits[4]; 114 Long exp; 115 int k; 116 117 fpi = &fpi0; 118 if (rounding != FPI_Round_near) { 119 fpi1 = fpi0; 120 fpi1.rounding = rounding; 121 fpi = &fpi1; 122 } | 110#endif 111{ 112 static FPI fpi0 = { 113, 1-16383-113+1, 32766-16383-113+1, 1, SI }; 113 FPI *fpi, fpi1; 114 ULong bits[4]; 115 Long exp; 116 int k; 117 118 fpi = &fpi0; 119 if (rounding != FPI_Round_near) { 120 fpi1 = fpi0; 121 fpi1.rounding = rounding; 122 fpi = &fpi1; 123 } |
123 k = strtodg(s, sp, fpi, &exp, bits); | 124 k = strtodg_l(s, sp, fpi, &exp, bits, locale); |
124 ULtoQ((ULong*)L, bits, exp, k); 125 return k; 126 } | 125 ULtoQ((ULong*)L, bits, exp, k); 126 return k; 127 } |