1 diff -Naur gdtoa.1/dmisc.c gdtoa.2/dmisc.c
2 --- gdtoa.1/dmisc.c 2016-02-19 17:09:46.000000000 +0000
3 +++ gdtoa.2/dmisc.c 2018-01-25 20:50:09.000000000 +0000
9 +gdtoa__freedtoa(s) char *s;
12 +gdtoa__freedtoa(char *s)
15 #ifdef MULTIPLE_THREADS
16 diff -Naur gdtoa.1/dtoa.c gdtoa.2/dtoa.c
17 --- gdtoa.1/dtoa.c 2016-04-29 22:46:32.000000000 +0000
18 +++ gdtoa.2/dtoa.c 2018-01-25 20:50:09.000000000 +0000
26 (d0, mode, ndigits, decpt, sign, rve)
27 double d0; int mode, ndigits, *decpt, *sign; char **rve;
30 #ifndef MULTIPLE_THREADS
32 - freedtoa(dtoa_result);
33 + gdtoa__freedtoa(dtoa_result);
37 diff -Naur gdtoa.1/g_Qfmt.c gdtoa.2/g_Qfmt.c
38 --- gdtoa.1/g_Qfmt.c 2016-02-18 23:25:54.000000000 +0000
39 +++ gdtoa.2/g_Qfmt.c 2018-01-25 20:50:09.000000000 +0000
44 -g_Qfmt(buf, V, ndig, bufsize) char *buf; char *V; int ndig; size_t bufsize;
45 +gdtoa__g_Qfmt(buf, V, ndig, bufsize) char *buf; char *V; int ndig; size_t bufsize;
47 -g_Qfmt(char *buf, void *V, int ndig, size_t bufsize)
48 +gdtoa__g_Qfmt(char *buf, void *V, int ndig, size_t bufsize)
51 static FPI fpi0 = { 113, 1-16383-113+1, 32766 - 16383 - 113 + 1, 1, 0, Int_max };
56 - s = gdtoa(fpi, ex, bits, &i, mode, ndig, &decpt, &se);
57 + s = gdtoa__gdtoa(fpi, ex, bits, &i, mode, ndig, &decpt, &se);
58 return g__fmt(buf, s, se, decpt, sign, bufsize);
60 diff -Naur gdtoa.1/g_Qfmt_p.c gdtoa.2/g_Qfmt_p.c
61 --- gdtoa.1/g_Qfmt_p.c 2016-02-19 00:17:33.000000000 +0000
62 +++ gdtoa.2/g_Qfmt_p.c 2018-01-25 20:50:09.000000000 +0000
67 -g_Qfmt_p(buf, V, ndig, bufsize, nik) char *buf; char *V; int ndig; size_t bufsize; int nik;
68 +gdtoa__g_Qfmt_p(buf, V, ndig, bufsize, nik) char *buf; char *V; int ndig; size_t bufsize; int nik;
70 -g_Qfmt_p(char *buf, void *V, int ndig, size_t bufsize, int nik)
71 +gdtoa__g_Qfmt_p(char *buf, void *V, int ndig, size_t bufsize, int nik)
74 static FPI fpi0 = { 113, 1-16383-113+1, 32766 - 16383 - 113 + 1, 1, 0, Int_max };
79 - s = gdtoa(fpi, ex, bits, &i, mode, ndig, &decpt, &se);
80 + s = gdtoa__gdtoa(fpi, ex, bits, &i, mode, ndig, &decpt, &se);
81 return g__fmt(buf, s, se, decpt, sign, bufsize);
83 diff -Naur gdtoa.1/g__fmt.c gdtoa.2/g__fmt.c
84 --- gdtoa.1/g__fmt.c 2012-12-24 01:41:26.000000000 +0000
85 +++ gdtoa.2/g__fmt.c 2018-01-25 20:50:09.000000000 +0000
91 + gdtoa__freedtoa(s0);
95 diff -Naur gdtoa.1/g_ddfmt.c gdtoa.2/g_ddfmt.c
96 --- gdtoa.1/g_ddfmt.c 2016-02-19 18:25:24.000000000 +0000
97 +++ gdtoa.2/g_ddfmt.c 2018-01-25 20:50:09.000000000 +0000
102 -g_ddfmt(buf, dd0, ndig, bufsize) char *buf; double *dd0; int ndig; size_t bufsize;
103 +gdtoa__g_ddfmt(buf, dd0, ndig, bufsize) char *buf; double *dd0; int ndig; size_t bufsize;
105 -g_ddfmt(char *buf, double *dd0, int ndig, size_t bufsize)
106 +gdtoa__g_ddfmt(char *buf, double *dd0, int ndig, size_t bufsize)
111 fpi.sudden_underflow = 0;
112 fpi.int_max = Int_max;
114 - s = gdtoa(&fpi, ex, bits, &i, mode, ndig, &decpt, &se);
115 + s = gdtoa__gdtoa(&fpi, ex, bits, &i, mode, ndig, &decpt, &se);
116 b = g__fmt(buf, s, se, decpt, z->sign, bufsize);
119 diff -Naur gdtoa.1/g_ddfmt_p.c gdtoa.2/g_ddfmt_p.c
120 --- gdtoa.1/g_ddfmt_p.c 2016-02-19 18:25:36.000000000 +0000
121 +++ gdtoa.2/g_ddfmt_p.c 2018-01-25 20:50:09.000000000 +0000
126 -g_ddfmt_p(buf, dd0, ndig, bufsize, nik) char *buf; double *dd0; int ndig; size_t bufsize; int nik;
127 +gdtoa__g_ddfmt_p(buf, dd0, ndig, bufsize, nik) char *buf; double *dd0; int ndig; size_t bufsize; int nik;
129 -g_ddfmt_p(char *buf, double *dd0, int ndig, size_t bufsize, int nik)
130 +gdtoa__g_ddfmt_p(char *buf, double *dd0, int ndig, size_t bufsize, int nik)
135 fpi.sudden_underflow = 0;
136 fpi.int_max = Int_max;
138 - s = gdtoa(&fpi, ex, bits, &i, mode, ndig, &decpt, &se);
139 + s = gdtoa__gdtoa(&fpi, ex, bits, &i, mode, ndig, &decpt, &se);
140 b = g__fmt(buf, s, se, decpt, z->sign, bufsize);
143 diff -Naur gdtoa.1/g_dfmt.c gdtoa.2/g_dfmt.c
144 --- gdtoa.1/g_dfmt.c 2016-02-19 00:24:17.000000000 +0000
145 +++ gdtoa.2/g_dfmt.c 2018-01-25 20:50:09.000000000 +0000
150 -g_dfmt(buf, d, ndig, bufsize) char *buf; double *d; int ndig; size_t bufsize;
151 +gdtoa__g_dfmt(buf, d, ndig, bufsize) char *buf; double *d; int ndig; size_t bufsize;
153 -g_dfmt(char *buf, double *d, int ndig, size_t bufsize)
154 +gdtoa__g_dfmt(char *buf, double *d, int ndig, size_t bufsize)
157 static FPI fpi0 = { 53, 1-1023-53+1, 2046-1023-53+1, 1, 0, Int_max };
161 i = STRTOG_Normal | STRTOG_Neg;
162 - s = gdtoa(fpi, ex, bits, &i, mode, ndig, &decpt, &se);
163 + s = gdtoa__gdtoa(fpi, ex, bits, &i, mode, ndig, &decpt, &se);
164 return g__fmt(buf, s, se, decpt, sign, bufsize);
166 diff -Naur gdtoa.1/g_dfmt_p.c gdtoa.2/g_dfmt_p.c
167 --- gdtoa.1/g_dfmt_p.c 2016-02-19 00:25:27.000000000 +0000
168 +++ gdtoa.2/g_dfmt_p.c 2018-01-25 20:50:09.000000000 +0000
173 -g_dfmt_p(buf, d, ndig, bufsize, nik) char *buf; double *d; int ndig; size_t bufsize; int nik;
174 +gdtoa__g_dfmt_p(buf, d, ndig, bufsize, nik) char *buf; double *d; int ndig; size_t bufsize; int nik;
176 -g_dfmt_p(char *buf, double *d, int ndig, size_t bufsize, int nik)
177 +gdtoa__g_dfmt_p(char *buf, double *d, int ndig, size_t bufsize, int nik)
180 static FPI fpi0 = { 53, 1-1023-53+1, 2046-1023-53+1, 1, 0, Int_max };
184 i = STRTOG_Normal | STRTOG_Neg;
185 - s = gdtoa(fpi, ex, bits, &i, mode, ndig, &decpt, &se);
186 + s = gdtoa__gdtoa(fpi, ex, bits, &i, mode, ndig, &decpt, &se);
187 return g__fmt(buf, s, se, decpt, sign, bufsize);
189 diff -Naur gdtoa.1/g_ffmt.c gdtoa.2/g_ffmt.c
190 --- gdtoa.1/g_ffmt.c 2016-02-19 00:26:51.000000000 +0000
191 +++ gdtoa.2/g_ffmt.c 2018-01-25 20:50:09.000000000 +0000
196 -g_ffmt(buf, f, ndig, bufsize) char *buf; float *f; int ndig; size_t bufsize;
197 +gdtoa__g_ffmt(buf, f, ndig, bufsize) char *buf; float *f; int ndig; size_t bufsize;
199 -g_ffmt(char *buf, float *f, int ndig, size_t bufsize)
200 +gdtoa__g_ffmt(char *buf, float *f, int ndig, size_t bufsize)
203 static FPI fpi0 = { 24, 1-127-24+1, 254-127-24+1, 1, 0, 6 };
208 - s = gdtoa(fpi, ex, bits, &i, mode, ndig, &decpt, &se);
209 + s = gdtoa__gdtoa(fpi, ex, bits, &i, mode, ndig, &decpt, &se);
210 return g__fmt(buf, s, se, decpt, sign, bufsize);
212 diff -Naur gdtoa.1/g_ffmt_p.c gdtoa.2/g_ffmt_p.c
213 --- gdtoa.1/g_ffmt_p.c 2016-02-19 00:28:16.000000000 +0000
214 +++ gdtoa.2/g_ffmt_p.c 2018-01-25 20:50:09.000000000 +0000
219 -g_ffmt_p(buf, f, ndig, bufsize, nik) char *buf; float *f; int ndig; size_t bufsize; int nik;
220 +gdtoa__g_ffmt_p(buf, f, ndig, bufsize, nik) char *buf; float *f; int ndig; size_t bufsize; int nik;
222 -g_ffmt_p(char *buf, float *f, int ndig, size_t bufsize, int nik)
223 +gdtoa__g_ffmt_p(char *buf, float *f, int ndig, size_t bufsize, int nik)
226 static FPI fpi0 = { 24, 1-127-24+1, 254-127-24+1, 1, 0, 6 };
231 - s = gdtoa(fpi, ex, bits, &i, mode, ndig, &decpt, &se);
232 + s = gdtoa__gdtoa(fpi, ex, bits, &i, mode, ndig, &decpt, &se);
233 return g__fmt(buf, s, se, decpt, sign, bufsize);
235 diff -Naur gdtoa.1/g_xLfmt.c gdtoa.2/g_xLfmt.c
236 --- gdtoa.1/g_xLfmt.c 2016-02-19 00:29:17.000000000 +0000
237 +++ gdtoa.2/g_xLfmt.c 2018-01-25 20:50:09.000000000 +0000
242 -g_xLfmt(buf, V, ndig, bufsize) char *buf; char *V; int ndig; size_t bufsize;
243 +gdtoa__g_xLfmt(buf, V, ndig, bufsize) char *buf; char *V; int ndig; size_t bufsize;
245 -g_xLfmt(char *buf, void *V, int ndig, size_t bufsize)
246 +gdtoa__g_xLfmt(char *buf, void *V, int ndig, size_t bufsize)
249 static FPI fpi0 = { 64, 1-16383-64+1, 32766 - 16383 - 64 + 1, 1, 0, Int_max };
254 - s = gdtoa(fpi, ex, bits, &i, mode, ndig, &decpt, &se);
255 + s = gdtoa__gdtoa(fpi, ex, bits, &i, mode, ndig, &decpt, &se);
256 return g__fmt(buf, s, se, decpt, sign, bufsize);
258 diff -Naur gdtoa.1/g_xLfmt_p.c gdtoa.2/g_xLfmt_p.c
259 --- gdtoa.1/g_xLfmt_p.c 2016-02-19 00:30:18.000000000 +0000
260 +++ gdtoa.2/g_xLfmt_p.c 2018-01-25 20:50:09.000000000 +0000
265 -g_xLfmt_p(buf, V, ndig, bufsize, nik) char *buf; char *V; int ndig; size_t bufsize; int nik;
266 +gdtoa__g_xLfmt_p(buf, V, ndig, bufsize, nik) char *buf; char *V; int ndig; size_t bufsize; int nik;
268 -g_xLfmt_p(char *buf, void *V, int ndig, size_t bufsize, int nik)
269 +gdtoa__g_xLfmt_p(char *buf, void *V, int ndig, size_t bufsize, int nik)
272 static FPI fpi0 = { 64, 1-16383-64+1, 32766 - 16383 - 64 + 1, 1, 0, Int_max };
277 - s = gdtoa(fpi, ex, bits, &i, mode, ndig, &decpt, &se);
278 + s = gdtoa__gdtoa(fpi, ex, bits, &i, mode, ndig, &decpt, &se);
279 return g__fmt(buf, s, se, decpt, sign, bufsize);
281 diff -Naur gdtoa.1/g_xfmt.c gdtoa.2/g_xfmt.c
282 --- gdtoa.1/g_xfmt.c 2016-02-19 00:31:49.000000000 +0000
283 +++ gdtoa.2/g_xfmt.c 2018-01-25 20:50:09.000000000 +0000
288 -g_xfmt(buf, V, ndig, bufsize) char *buf; char *V; int ndig; size_t bufsize;
289 +gdtoa__g_xfmt(buf, V, ndig, bufsize) char *buf; char *V; int ndig; size_t bufsize;
291 -g_xfmt(char *buf, void *V, int ndig, size_t bufsize)
292 +gdtoa__g_xfmt(char *buf, void *V, int ndig, size_t bufsize)
295 static FPI fpi0 = { 64, 1-16383-64+1, 32766 - 16383 - 64 + 1, 1, 0, Int_max };
300 - s = gdtoa(fpi, ex, bits, &i, mode, ndig, &decpt, &se);
301 + s = gdtoa__gdtoa(fpi, ex, bits, &i, mode, ndig, &decpt, &se);
302 return g__fmt(buf, s, se, decpt, sign, bufsize);
304 diff -Naur gdtoa.1/g_xfmt_p.c gdtoa.2/g_xfmt_p.c
305 --- gdtoa.1/g_xfmt_p.c 2016-02-19 00:32:49.000000000 +0000
306 +++ gdtoa.2/g_xfmt_p.c 2018-01-25 20:50:09.000000000 +0000
311 -g_xfmt_p(buf, V, ndig, bufsize, nik) char *buf; char *V; int ndig; size_t bufsize; int nik;
312 +gdtoa__g_xfmt_p(buf, V, ndig, bufsize, nik) char *buf; char *V; int ndig; size_t bufsize; int nik;
314 -g_xfmt_p(char *buf, void *V, int ndig, size_t bufsize, int nik)
315 +gdtoa__g_xfmt_p(char *buf, void *V, int ndig, size_t bufsize, int nik)
318 static FPI fpi0 = { 64, 1-16383-64+1, 32766 - 16383 - 64 + 1, 1, 0, Int_max };
323 - s = gdtoa(fpi, ex, bits, &i, mode, ndig, &decpt, &se);
324 + s = gdtoa__gdtoa(fpi, ex, bits, &i, mode, ndig, &decpt, &se);
325 return g__fmt(buf, s, se, decpt, sign, bufsize);
327 diff -Naur gdtoa.1/gdtoa.c gdtoa.2/gdtoa.c
328 --- gdtoa.1/gdtoa.c 2016-03-25 14:26:52.000000000 +0000
329 +++ gdtoa.2/gdtoa.c 2018-01-25 20:50:09.000000000 +0000
337 (fpi, be, bits, kindp, mode, ndigits, decpt, rve)
338 CONST FPI *fpi; int be; ULong *bits;
341 #ifndef MULTIPLE_THREADS
343 - freedtoa(dtoa_result);
344 + gdtoa__freedtoa(dtoa_result);
348 diff -Naur gdtoa.1/gdtoa.h gdtoa.2/gdtoa.h
349 --- gdtoa.1/gdtoa.h 2016-02-19 00:37:08.000000000 +0000
350 +++ gdtoa.2/gdtoa.h 2018-01-25 20:53:55.000000000 +0000
351 @@ -104,55 +104,55 @@
355 -extern char* dtoa ANSI((double d, int mode, int ndigits, int *decpt,
356 +extern char* gdtoa__dtoa ANSI((double d, int mode, int ndigits, int *decpt,
357 int *sign, char **rve));
358 -extern char* gdtoa ANSI((CONST FPI *fpi, int be, ULong *bits, int *kindp,
359 +extern char* gdtoa__gdtoa ANSI((CONST FPI *fpi, int be, ULong *bits, int *kindp,
360 int mode, int ndigits, int *decpt, char **rve));
361 -extern void freedtoa ANSI((char*));
362 -extern float strtof ANSI((CONST char *, char **));
363 -extern double strtod ANSI((CONST char *, char **));
364 -extern int strtodg ANSI((CONST char*, char**, CONST FPI*, Long*, ULong*));
365 +extern void gdtoa__freedtoa ANSI((char*));
366 +extern float gdtoa__strtof ANSI((CONST char *, char **));
367 +extern double gdtoa__strtod ANSI((CONST char *, char **));
368 +extern int gdtoa__strtodg ANSI((CONST char*, char**, CONST FPI*, Long*, ULong*));
370 -extern char* g_ddfmt ANSI((char*, double*, int, size_t));
371 -extern char* g_ddfmt_p ANSI((char*, double*, int, size_t, int));
372 -extern char* g_dfmt ANSI((char*, double*, int, size_t));
373 -extern char* g_dfmt_p ANSI((char*, double*, int, size_t, int));
374 -extern char* g_ffmt ANSI((char*, float*, int, size_t));
375 -extern char* g_ffmt_p ANSI((char*, float*, int, size_t, int));
376 -extern char* g_Qfmt ANSI((char*, void*, int, size_t));
377 -extern char* g_Qfmt_p ANSI((char*, void*, int, size_t, int));
378 -extern char* g_xfmt ANSI((char*, void*, int, size_t));
379 -extern char* g_xfmt_p ANSI((char*, void*, int, size_t, int));
380 -extern char* g_xLfmt ANSI((char*, void*, int, size_t));
381 -extern char* g_xLfmt_p ANSI((char*, void*, int, size_t, int));
382 +extern char* gdtoa__g_ddfmt ANSI((char*, double*, int, size_t));
383 +extern char* gdtoa__g_ddfmt_p ANSI((char*, double*, int, size_t, int));
384 +extern char* gdtoa__g_dfmt ANSI((char*, double*, int, size_t));
385 +extern char* gdtoa__g_dfmt_p ANSI((char*, double*, int, size_t, int));
386 +extern char* gdtoa__g_ffmt ANSI((char*, float*, int, size_t));
387 +extern char* gdtoa__g_ffmt_p ANSI((char*, float*, int, size_t, int));
388 +extern char* gdtoa__g_Qfmt ANSI((char*, void*, int, size_t));
389 +extern char* gdtoa__g_Qfmt_p ANSI((char*, void*, int, size_t, int));
390 +extern char* gdtoa__g_xfmt ANSI((char*, void*, int, size_t));
391 +extern char* gdtoa__g_xfmt_p ANSI((char*, void*, int, size_t, int));
392 +extern char* gdtoa__g_xLfmt ANSI((char*, void*, int, size_t));
393 +extern char* gdtoa__g_xLfmt_p ANSI((char*, void*, int, size_t, int));
395 -extern int strtoId ANSI((CONST char*, char**, double*, double*));
396 -extern int strtoIdd ANSI((CONST char*, char**, double*, double*));
397 -extern int strtoIf ANSI((CONST char*, char**, float*, float*));
398 -extern int strtoIQ ANSI((CONST char*, char**, void*, void*));
399 -extern int strtoIx ANSI((CONST char*, char**, void*, void*));
400 -extern int strtoIxL ANSI((CONST char*, char**, void*, void*));
401 -extern int strtord ANSI((CONST char*, char**, int, double*));
402 -extern int strtordd ANSI((CONST char*, char**, int, double*));
403 -extern int strtorf ANSI((CONST char*, char**, int, float*));
404 -extern int strtorQ ANSI((CONST char*, char**, int, void*));
405 -extern int strtorx ANSI((CONST char*, char**, int, void*));
406 -extern int strtorxL ANSI((CONST char*, char**, int, void*));
407 +extern int gdtoa__strtoId ANSI((CONST char*, char**, double*, double*));
408 +extern int gdtoa__strtoIdd ANSI((CONST char*, char**, double*, double*));
409 +extern int gdtoa__strtoIf ANSI((CONST char*, char**, float*, float*));
410 +extern int gdtoa__strtoIQ ANSI((CONST char*, char**, void*, void*));
411 +extern int gdtoa__strtoIx ANSI((CONST char*, char**, void*, void*));
412 +extern int gdtoa__strtoIxL ANSI((CONST char*, char**, void*, void*));
413 +extern int gdtoa__strtord ANSI((CONST char*, char**, int, double*));
414 +extern int gdtoa__strtordd ANSI((CONST char*, char**, int, double*));
415 +extern int gdtoa__strtorf ANSI((CONST char*, char**, int, float*));
416 +extern int gdtoa__strtorQ ANSI((CONST char*, char**, int, void*));
417 +extern int gdtoa__strtorx ANSI((CONST char*, char**, int, void*));
418 +extern int gdtoa__strtorxL ANSI((CONST char*, char**, int, void*));
420 -extern int strtodI ANSI((CONST char*, char**, double*));
421 -extern int strtopd ANSI((CONST char*, char**, double*));
422 -extern int strtopdd ANSI((CONST char*, char**, double*));
423 -extern int strtopf ANSI((CONST char*, char**, float*));
424 -extern int strtopQ ANSI((CONST char*, char**, void*));
425 -extern int strtopx ANSI((CONST char*, char**, void*));
426 -extern int strtopxL ANSI((CONST char*, char**, void*));
427 +extern int gdtoa__strtodI ANSI((CONST char*, char**, double*));
428 +extern int gdtoa__strtopd ANSI((CONST char*, char**, double*));
429 +extern int gdtoa__strtopdd ANSI((CONST char*, char**, double*));
430 +extern int gdtoa__strtopf ANSI((CONST char*, char**, float*));
431 +extern int gdtoa__strtopQ ANSI((CONST char*, char**, void*));
432 +extern int gdtoa__strtopx ANSI((CONST char*, char**, void*));
433 +extern int gdtoa__strtopxL ANSI((CONST char*, char**, void*));
435 -#define strtopd(s,se,x) strtord(s,se,1,x)
436 -#define strtopdd(s,se,x) strtordd(s,se,1,x)
437 -#define strtopf(s,se,x) strtorf(s,se,1,x)
438 -#define strtopQ(s,se,x) strtorQ(s,se,1,x)
439 -#define strtopx(s,se,x) strtorx(s,se,1,x)
440 -#define strtopxL(s,se,x) strtorxL(s,se,1,x)
441 +#define gdtoa__strtopd(s,se,x) gdtoa__strtord(s,se,1,x)
442 +#define gdtoa__strtopdd(s,se,x) gdtoa__strtordd(s,se,1,x)
443 +#define gdtoa__strtopf(s,se,x) gdtoa__strtorf(s,se,1,x)
444 +#define gdtoa__strtopQ(s,se,x) gdtoa__strtorQ(s,se,1,x)
445 +#define gdtoa__strtopx(s,se,x) gdtoa__strtorx(s,se,1,x)
446 +#define gdtoa__strtopxL(s,se,x) gdtoa__strtorxL(s,se,1,x)
450 diff -Naur gdtoa.1/gdtoaimp.h gdtoa.2/gdtoaimp.h
451 --- gdtoa.1/gdtoaimp.h 2018-01-25 20:47:16.000000000 +0000
452 +++ gdtoa.2/gdtoaimp.h 2018-01-25 20:50:09.000000000 +0000
454 #define g__fmt g__fmt_D2A
455 #define gethex gethex_D2A
456 #define hexdig hexdig_D2A
457 +#define hexdig_init hexdig_init_D2A
458 #define hexnan hexnan_D2A
459 #define hi0bits(x) hi0bits_D2A((ULong)(x))
462 #define set_ones set_ones_D2A
463 #define strcp strcp_D2A
464 #define strtoIg strtoIg_D2A
465 +#define strtod strtod_D2A
467 #define tens tens_D2A
468 #define tinytens tinytens_D2A
470 int *decpt, int *sign, char **rve));
471 extern char *g__fmt ANSI((char*, char*, char*, int, ULong, size_t));
472 extern int gethex ANSI((CONST char**, CONST FPI*, Long*, Bigint**, int MTd));
473 - extern void hexdig_init_D2A(Void);
474 + /* extern void hexdig_init ANSI((Void)); */
475 extern int hexnan ANSI((CONST char**, CONST FPI*, ULong*));
476 extern int hi0bits_D2A ANSI((ULong));
477 extern Bigint *i2b ANSI((int MTd));
478 diff -Naur gdtoa.1/gethex.c gdtoa.2/gethex.c
479 --- gdtoa.1/gethex.c 2016-05-06 18:27:52.000000000 +0000
480 +++ gdtoa.2/gethex.c 2018-01-25 20:50:09.000000000 +0000
485 - /**** if (!hexdig['0']) hexdig_init_D2A(); ****/
486 + /**** if (!hexdig['0']) hexdig_init(); ****/
489 s0 = *(CONST unsigned char **)sp + 2;
490 diff -Naur gdtoa.1/hd_init.c gdtoa.2/hd_init.c
491 --- gdtoa.1/hd_init.c 2012-12-20 21:20:25.000000000 +0000
492 +++ gdtoa.2/hd_init.c 2018-01-25 20:50:09.000000000 +0000
497 -hexdig_init_D2A(Void) /* Use of hexdig_init omitted 20121220 to avoid a */
498 +hexdig_init(Void) /* Use of hexdig_init omitted 20121220 to avoid a */
499 /* race condition when multiple threads are used. */
501 #define USC (unsigned char *)
502 diff -Naur gdtoa.1/hexnan.c gdtoa.2/hexnan.c
503 --- gdtoa.1/hexnan.c 2016-02-19 00:43:10.000000000 +0000
504 +++ gdtoa.2/hexnan.c 2018-01-25 20:50:09.000000000 +0000
507 int havedig, hd0, i, nbits;
509 - /**** if (!hexdig['0']) hexdig_init_D2A(); ****/
510 + /**** if (!hexdig['0']) hexdig_init(); ****/
512 x = x0 + (nbits >> kshift);
514 diff -Naur gdtoa.1/strtoIQ.c gdtoa.2/strtoIQ.c
515 --- gdtoa.1/strtoIQ.c 2016-02-19 18:09:22.000000000 +0000
516 +++ gdtoa.2/strtoIQ.c 2018-01-25 20:50:09.000000000 +0000
521 -strtoIQ(s, sp, a, b) CONST char *s; char **sp; void *a; void *b;
522 +gdtoa__strtoIQ(s, sp, a, b) CONST char *s; char **sp; void *a; void *b;
524 -strtoIQ(CONST char *s, char **sp, void *a, void *b)
525 +gdtoa__strtoIQ(CONST char *s, char **sp, void *a, void *b)
528 static FPI fpi = { 113, 1-16383-113+1, 32766-16383-113+1, 1, SI, 0 /*unused*/ };
529 diff -Naur gdtoa.1/strtoId.c gdtoa.2/strtoId.c
530 --- gdtoa.1/strtoId.c 2016-02-19 18:10:01.000000000 +0000
531 +++ gdtoa.2/strtoId.c 2018-01-25 20:50:09.000000000 +0000
536 -strtoId(s, sp, f0, f1) CONST char *s; char **sp; double *f0, *f1;
537 +gdtoa__strtoId(s, sp, f0, f1) CONST char *s; char **sp; double *f0, *f1;
539 -strtoId(CONST char *s, char **sp, double *f0, double *f1)
540 +gdtoa__strtoId(CONST char *s, char **sp, double *f0, double *f1)
543 static FPI fpi = { 53, 1-1023-53+1, 2046-1023-53+1, 1, SI, 0 /*unused*/ };
544 diff -Naur gdtoa.1/strtoIdd.c gdtoa.2/strtoIdd.c
545 --- gdtoa.1/strtoIdd.c 2016-02-19 18:10:39.000000000 +0000
546 +++ gdtoa.2/strtoIdd.c 2018-01-25 20:50:09.000000000 +0000
551 -strtoIdd(s, sp, f0, f1) CONST char *s; char **sp; double *f0, *f1;
552 +gdtoa__strtoIdd(s, sp, f0, f1) CONST char *s; char **sp; double *f0, *f1;
554 -strtoIdd(CONST char *s, char **sp, double *f0, double *f1)
555 +gdtoa__strtoIdd(CONST char *s, char **sp, double *f0, double *f1)
558 #ifdef Sudden_Underflow
559 diff -Naur gdtoa.1/strtoIf.c gdtoa.2/strtoIf.c
560 --- gdtoa.1/strtoIf.c 2016-02-19 18:11:21.000000000 +0000
561 +++ gdtoa.2/strtoIf.c 2018-01-25 20:50:09.000000000 +0000
566 -strtoIf(s, sp, f0, f1) CONST char *s; char **sp; float *f0, *f1;
567 +gdtoa__strtoIf(s, sp, f0, f1) CONST char *s; char **sp; float *f0, *f1;
569 -strtoIf(CONST char *s, char **sp, float *f0, float *f1)
570 +gdtoa__strtoIf(CONST char *s, char **sp, float *f0, float *f1)
573 static FPI fpi = { 24, 1-127-24+1, 254-127-24+1, 1, SI, 0 /*unused*/ };
574 diff -Naur gdtoa.1/strtoIg.c gdtoa.2/strtoIg.c
575 --- gdtoa.1/strtoIg.c 2016-05-06 18:41:21.000000000 +0000
576 +++ gdtoa.2/strtoIg.c 2018-01-25 20:50:09.000000000 +0000
581 - rv = strtodg(s00, se, fpi, exp, b->x);
582 + rv = gdtoa__strtodg(s00, se, fpi, exp, b->x);
583 if (!(rv & STRTOG_Inexact)) {
586 diff -Naur gdtoa.1/strtoIx.c gdtoa.2/strtoIx.c
587 --- gdtoa.1/strtoIx.c 2016-02-19 18:11:58.000000000 +0000
588 +++ gdtoa.2/strtoIx.c 2018-01-25 20:50:09.000000000 +0000
593 -strtoIx(s, sp, a, b) CONST char *s; char **sp; void *a; void *b;
594 +gdtoa__strtoIx(s, sp, a, b) CONST char *s; char **sp; void *a; void *b;
596 -strtoIx(CONST char *s, char **sp, void *a, void *b)
597 +gdtoa__strtoIx(CONST char *s, char **sp, void *a, void *b)
600 static FPI fpi = { 64, 1-16383-64+1, 32766 - 16383 - 64 + 1, 1, SI, 0 /*unused*/ };
601 diff -Naur gdtoa.1/strtoIxL.c gdtoa.2/strtoIxL.c
602 --- gdtoa.1/strtoIxL.c 2016-02-19 18:12:44.000000000 +0000
603 +++ gdtoa.2/strtoIxL.c 2018-01-25 20:50:09.000000000 +0000
608 -strtoIxL(s, sp, a, b) CONST char *s; char **sp; void *a; void *b;
609 +gdtoa__strtoIxL(s, sp, a, b) CONST char *s; char **sp; void *a; void *b;
611 -strtoIxL(CONST char *s, char **sp, void *a, void *b)
612 +gdtoa__strtoIxL(CONST char *s, char **sp, void *a, void *b)
615 static FPI fpi = { 64, 1-16383-64+1, 32766 - 16383 - 64 + 1, 1, SI, 0 /*unused*/ };
616 diff -Naur gdtoa.1/strtod.c gdtoa.2/strtod.c
617 --- gdtoa.1/strtod.c 2016-05-06 14:24:41.000000000 +0000
618 +++ gdtoa.2/strtod.c 2018-01-25 20:50:09.000000000 +0000
626 (s00, se) CONST char *s00; char **se;
628 diff -Naur gdtoa.1/strtodI.c gdtoa.2/strtodI.c
629 --- gdtoa.1/strtodI.c 2016-02-19 04:37:08.000000000 +0000
630 +++ gdtoa.2/strtodI.c 2018-01-25 20:50:09.000000000 +0000
635 -strtodI(s, sp, dd) CONST char *s; char **sp; double *dd;
636 +gdtoa__strtodI(s, sp, dd) CONST char *s; char **sp; double *dd;
638 -strtodI(CONST char *s, char **sp, double *dd)
639 +gdtoa__strtodI(CONST char *s, char **sp, double *dd)
642 static FPI fpi = { 53, 1-1023-53+1, 2046-1023-53+1, 1, SI, 0 /*unused*/ };
647 - k = strtodg(s, sp, &fpi, &exp, bits);
648 + k = gdtoa__strtodg(s, sp, &fpi, &exp, bits);
650 sign = k & STRTOG_Neg ? 0x80000000L : 0;
651 switch(k & STRTOG_Retmask) {
652 diff -Naur gdtoa.1/strtodg.c gdtoa.2/strtodg.c
653 --- gdtoa.1/strtodg.c 2016-05-06 18:30:21.000000000 +0000
654 +++ gdtoa.2/strtodg.c 2018-01-25 20:50:09.000000000 +0000
662 (s00, se, fpi, exp, bits)
663 CONST char *s00; char **se; CONST FPI *fpi; Long *exp; ULong *bits;
664 diff -Naur gdtoa.1/strtof.c gdtoa.2/strtof.c
665 --- gdtoa.1/strtof.c 2018-01-25 20:47:16.000000000 +0000
666 +++ gdtoa.2/strtof.c 2018-01-25 20:50:09.000000000 +0000
671 -strtof(s, sp) CONST char *s; char **sp;
672 +gdtoa__strtof(s, sp) CONST char *s; char **sp;
674 -strtof(CONST char *s, char **sp)
675 +gdtoa__strtof(CONST char *s, char **sp)
678 static FPI fpi0 = { 24, 1-127-24+1, 254-127-24+1, 1, SI, 0 /*unused*/ };
683 - k = strtodg(s, sp, fpi, &exp, bits);
684 + k = gdtoa__strtodg(s, sp, fpi, &exp, bits);
685 switch(k & STRTOG_Retmask) {
686 default: /* unused */
687 case STRTOG_NoNumber:
688 diff -Naur gdtoa.1/strtopQ.c gdtoa.2/strtopQ.c
689 --- gdtoa.1/strtopQ.c 2016-02-19 04:26:30.000000000 +0000
690 +++ gdtoa.2/strtopQ.c 2018-01-25 20:50:09.000000000 +0000
695 -strtopQ(s, sp, V) CONST char *s; char **sp; void *V;
696 +gdtoa__strtopQ(s, sp, V) CONST char *s; char **sp; void *V;
698 -strtopQ(CONST char *s, char **sp, void *V)
699 +gdtoa__strtopQ(CONST char *s, char **sp, void *V)
702 static FPI fpi0 = { 113, 1-16383-113+1, 32766 - 16383 - 113 + 1, 1, SI, 0 /*unused*/ };
707 - k = strtodg(s, sp, fpi, &exp, bits);
708 + k = gdtoa__strtodg(s, sp, fpi, &exp, bits);
709 switch(k & STRTOG_Retmask) {
710 case STRTOG_NoNumber:
712 diff -Naur gdtoa.1/strtopd.c gdtoa.2/strtopd.c
713 --- gdtoa.1/strtopd.c 2016-02-19 04:40:01.000000000 +0000
714 +++ gdtoa.2/strtopd.c 2018-01-25 20:50:09.000000000 +0000
719 -strtopd(s, sp, d) char *s; char **sp; double *d;
720 +gdtoa__strtopd(s, sp, d) char *s; char **sp; double *d;
722 -strtopd(CONST char *s, char **sp, double *d)
723 +gdtoa__strtopd(CONST char *s, char **sp, double *d)
726 static FPI fpi0 = { 53, 1-1023-53+1, 2046-1023-53+1, 1, SI, 0 /*unused*/ };
731 - k = strtodg(s, sp, fpi, &exp, bits);
732 + k = gdtoa__strtodg(s, sp, fpi, &exp, bits);
733 ULtod((ULong*)d, bits, exp, k);
736 diff -Naur gdtoa.1/strtopdd.c gdtoa.2/strtopdd.c
737 --- gdtoa.1/strtopdd.c 2018-01-25 20:47:16.000000000 +0000
738 +++ gdtoa.2/strtopdd.c 2018-01-25 20:50:09.000000000 +0000
743 -strtopdd(s, sp, dd) CONST char *s; char **sp; double *dd;
744 +gdtoa__strtopdd(s, sp, dd) CONST char *s; char **sp; double *dd;
746 -strtopdd(CONST char *s, char **sp, double *dd)
747 +gdtoa__strtopdd(CONST char *s, char **sp, double *dd)
750 #ifdef Sudden_Underflow
755 - rv = strtodg(s, sp, fpi, &exp, bits);
756 + rv = gdtoa__strtodg(s, sp, fpi, &exp, bits);
758 switch(rv & STRTOG_Retmask) {
759 case STRTOG_NoNumber:
760 diff -Naur gdtoa.1/strtopf.c gdtoa.2/strtopf.c
761 --- gdtoa.1/strtopf.c 2016-02-19 04:41:58.000000000 +0000
762 +++ gdtoa.2/strtopf.c 2018-01-25 20:50:09.000000000 +0000
767 -strtopf(s, sp, f) CONST char *s; char **sp; float *f;
768 +gdtoa__strtopf(s, sp, f) CONST char *s; char **sp; float *f;
770 -strtopf(CONST char *s, char **sp, float *f)
771 +gdtoa__strtopf(CONST char *s, char **sp, float *f)
774 static FPI fpi0 = { 24, 1-127-24+1, 254-127-24+1, 1, SI, 0 /*unused*/ };
779 - k = strtodg(s, sp, fpi, &exp, bits);
780 + k = gdtoa__strtodg(s, sp, fpi, &exp, bits);
782 switch(k & STRTOG_Retmask) {
783 case STRTOG_NoNumber:
784 diff -Naur gdtoa.1/strtopx.c gdtoa.2/strtopx.c
785 --- gdtoa.1/strtopx.c 2016-02-19 04:43:54.000000000 +0000
786 +++ gdtoa.2/strtopx.c 2018-01-25 20:50:09.000000000 +0000
791 -strtopx(s, sp, V) CONST char *s; char **sp; void *V;
792 +gdtoa__strtopx(s, sp, V) CONST char *s; char **sp; void *V;
794 -strtopx(CONST char *s, char **sp, void *V)
795 +gdtoa__strtopx(CONST char *s, char **sp, void *V)
798 static FPI fpi0 = { 64, 1-16383-64+1, 32766 - 16383 - 64 + 1, 1, SI, 0 /*unused*/ };
803 - k = strtodg(s, sp, fpi, &exp, bits);
804 + k = gdtoa__strtodg(s, sp, fpi, &exp, bits);
805 switch(k & STRTOG_Retmask) {
806 case STRTOG_NoNumber:
808 diff -Naur gdtoa.1/strtopxL.c gdtoa.2/strtopxL.c
809 --- gdtoa.1/strtopxL.c 2016-02-19 04:48:39.000000000 +0000
810 +++ gdtoa.2/strtopxL.c 2018-01-25 20:50:09.000000000 +0000
815 -strtopxL(s, sp, V) CONST char *s; char **sp; void *V;
816 +gdtoa__strtopxL(s, sp, V) CONST char *s; char **sp; void *V;
818 -strtopxL(CONST char *s, char **sp, void *V)
819 +gdtoa__strtopxL(CONST char *s, char **sp, void *V)
822 static FPI fpi0 = { 64, 1-16383-64+1, 32766 - 16383 - 64 + 1, 1, SI, 0 /*unused*/ };
827 - k = strtodg(s, sp, fpi, &exp, bits);
828 + k = gdtoa__strtodg(s, sp, fpi, &exp, bits);
829 switch(k & STRTOG_Retmask) {
830 case STRTOG_NoNumber:
832 diff -Naur gdtoa.1/strtorQ.c gdtoa.2/strtorQ.c
833 --- gdtoa.1/strtorQ.c 2016-02-19 04:48:39.000000000 +0000
834 +++ gdtoa.2/strtorQ.c 2018-01-25 20:50:09.000000000 +0000
839 -strtorQ(s, sp, rounding, L) CONST char *s; char **sp; int rounding; void *L;
840 +gdtoa__strtorQ(s, sp, rounding, L) CONST char *s; char **sp; int rounding; void *L;
842 -strtorQ(CONST char *s, char **sp, int rounding, void *L)
843 +gdtoa__strtorQ(CONST char *s, char **sp, int rounding, void *L)
846 static FPI fpi0 = { 113, 1-16383-113+1, 32766-16383-113+1, 1, SI, 0 /*unused*/ };
848 fpi1.rounding = rounding;
851 - k = strtodg(s, sp, fpi, &exp, bits);
852 + k = gdtoa__strtodg(s, sp, fpi, &exp, bits);
853 ULtoQ((ULong*)L, bits, exp, k);
856 diff -Naur gdtoa.1/strtord.c gdtoa.2/strtord.c
857 --- gdtoa.1/strtord.c 2016-02-19 04:48:39.000000000 +0000
858 +++ gdtoa.2/strtord.c 2018-01-25 20:50:09.000000000 +0000
863 -strtord(s, sp, rounding, d) CONST char *s; char **sp; int rounding; double *d;
864 +gdtoa__strtord(s, sp, rounding, d) CONST char *s; char **sp; int rounding; double *d;
866 -strtord(CONST char *s, char **sp, int rounding, double *d)
867 +gdtoa__strtord(CONST char *s, char **sp, int rounding, double *d)
870 static FPI fpi0 = { 53, 1-1023-53+1, 2046-1023-53+1, 1, SI, 0 /*unused*/ };
872 fpi1.rounding = rounding;
875 - k = strtodg(s, sp, fpi, &exp, bits);
876 + k = gdtoa__strtodg(s, sp, fpi, &exp, bits);
877 ULtod((ULong*)d, bits, exp, k);
880 diff -Naur gdtoa.1/strtordd.c gdtoa.2/strtordd.c
881 --- gdtoa.1/strtordd.c 2016-02-19 04:48:39.000000000 +0000
882 +++ gdtoa.2/strtordd.c 2018-01-25 20:50:09.000000000 +0000
887 -strtordd(s, sp, rounding, dd) CONST char *s; char **sp; int rounding; double *dd;
888 +gdtoa__strtordd(s, sp, rounding, dd) CONST char *s; char **sp; int rounding; double *dd;
890 -strtordd(CONST char *s, char **sp, int rounding, double *dd)
891 +gdtoa__strtordd(CONST char *s, char **sp, int rounding, double *dd)
894 #ifdef Sudden_Underflow
896 fpi1.rounding = rounding;
899 - k = strtodg(s, sp, fpi, &exp, bits);
900 + k = gdtoa__strtodg(s, sp, fpi, &exp, bits);
901 ULtodd((ULong*)dd, bits, exp, k);
904 diff -Naur gdtoa.1/strtorf.c gdtoa.2/strtorf.c
905 --- gdtoa.1/strtorf.c 2016-02-19 04:48:39.000000000 +0000
906 +++ gdtoa.2/strtorf.c 2018-01-25 20:50:09.000000000 +0000
911 -strtorf(s, sp, rounding, f) CONST char *s; char **sp; int rounding; float *f;
912 +gdtoa__strtorf(s, sp, rounding, f) CONST char *s; char **sp; int rounding; float *f;
914 -strtorf(CONST char *s, char **sp, int rounding, float *f)
915 +gdtoa__strtorf(CONST char *s, char **sp, int rounding, float *f)
918 static FPI fpi0 = { 24, 1-127-24+1, 254-127-24+1, 1, SI, 0 /*unused*/ };
920 fpi1.rounding = rounding;
923 - k = strtodg(s, sp, fpi, &exp, bits);
924 + k = gdtoa__strtodg(s, sp, fpi, &exp, bits);
925 ULtof((ULong*)f, bits, exp, k);
928 diff -Naur gdtoa.1/strtorx.c gdtoa.2/strtorx.c
929 --- gdtoa.1/strtorx.c 2016-02-19 04:48:39.000000000 +0000
930 +++ gdtoa.2/strtorx.c 2018-01-25 20:50:09.000000000 +0000
935 -strtorx(s, sp, rounding, L) CONST char *s; char **sp; int rounding; void *L;
936 +gdtoa__strtorx(s, sp, rounding, L) CONST char *s; char **sp; int rounding; void *L;
938 -strtorx(CONST char *s, char **sp, int rounding, void *L)
939 +gdtoa__strtorx(CONST char *s, char **sp, int rounding, void *L)
942 static FPI fpi0 = { 64, 1-16383-64+1, 32766 - 16383 - 64 + 1, 1, SI, 0 /*unused*/ };
944 fpi1.rounding = rounding;
947 - k = strtodg(s, sp, fpi, &exp, bits);
948 + k = gdtoa__strtodg(s, sp, fpi, &exp, bits);
949 ULtox((UShort*)L, bits, exp, k);
952 diff -Naur gdtoa.1/strtorxL.c gdtoa.2/strtorxL.c
953 --- gdtoa.1/strtorxL.c 2016-02-19 04:48:39.000000000 +0000
954 +++ gdtoa.2/strtorxL.c 2018-01-25 20:50:09.000000000 +0000
959 -strtorxL(s, sp, rounding, L) CONST char *s; char **sp; int rounding; void *L;
960 +gdtoa__strtorxL(s, sp, rounding, L) CONST char *s; char **sp; int rounding; void *L;
962 -strtorxL(CONST char *s, char **sp, int rounding, void *L)
963 +gdtoa__strtorxL(CONST char *s, char **sp, int rounding, void *L)
966 static FPI fpi0 = { 64, 1-16383-64+1, 32766 - 16383 - 64 + 1, 1, SI, 0 /*unused*/ };
968 fpi1.rounding = rounding;
971 - k = strtodg(s, sp, fpi, &exp, bits);
972 + k = gdtoa__strtodg(s, sp, fpi, &exp, bits);
973 ULtoxL((ULong*)L, bits, exp, k);