[MLton-commit] r7538
Matthew Fluet
fluet at mlton.org
Sat Jun 4 07:34:45 PDT 2011
Upgrade gdtoa.tgz
----------------------------------------------------------------------
U mlton/trunk/runtime/Makefile
U mlton/trunk/runtime/gdtoa-patch
U mlton/trunk/runtime/gdtoa-patch.internal
U mlton/trunk/runtime/gdtoa-patch.mlton
U mlton/trunk/runtime/gdtoa.tgz
----------------------------------------------------------------------
Modified: mlton/trunk/runtime/Makefile
===================================================================
--- mlton/trunk/runtime/Makefile 2011-06-04 14:34:05 UTC (rev 7537)
+++ mlton/trunk/runtime/Makefile 2011-06-04 14:34:36 UTC (rev 7538)
@@ -265,26 +265,38 @@
all: $(ALL)
-gdtoa/arithchk.c: gdtoa.tgz gdtoa-patch gdtoa-patch.internal gdtoa-patch.mlton
+gdtoa/README: gdtoa.tgz gdtoa-patch gdtoa-patch.internal gdtoa-patch.mlton
gzip -dc gdtoa.tgz | tar xf -
patch -s -p0 <gdtoa-patch
patch -s -p0 <gdtoa-patch.internal
patch -s -p0 <gdtoa-patch.mlton
-$(GDTOACFILES): gdtoa/arithchk.c
+$(GDTOACFILES): gdtoa/README
@touch $@
+gdtoa/arithchk.c: gdtoa/README
+ @touch $@
+
gdtoa/arithchk.out: gdtoa/arithchk.c
cd gdtoa && $(CC) $(OPTCFLAGS) $(OPTWARNCFLAGS) -w -O1 -o arithchk.out arithchk.c
gdtoa/arith.h: gdtoa/arithchk.out
cd gdtoa && ./arithchk.out >arith.h
-gdtoa/%-pic.o: gdtoa/%.c gdtoa/arith.h
+gdtoa/qnan.c: gdtoa/README
+ @touch $@
+
+gdtoa/qnan.out: gdtoa/arith.h gdtoa/qnan.c
+ cd gdtoa && $(CC) $(OPTCFLAGS) $(OPTWARNCFLAGS) -w -O1 -o qnan.out qnan.c
+
+gdtoa/gd_qnan.h: gdtoa/qnan.out
+ cd gdtoa && ./qnan.out >gd_qnan.h
+
+gdtoa/%-pic.o: gdtoa/%.c gdtoa/arith.h gdtoa/gd_qnan.h
$(CC) $(PICCFLAGS) $(PICWARNCFLAGS) -w -DINFNAN_CHECK -c -o $@ $<
-gdtoa/%-gdb.o: gdtoa/%.c gdtoa/arith.h
+gdtoa/%-gdb.o: gdtoa/%.c gdtoa/arith.h gdtoa/gd_qnan.h
$(CC) $(DEBUGCFLAGS) $(DEBUGWARNCFLAGS) -w -DINFNAN_CHECK -c -o $@ $<
-gdtoa/%.o: gdtoa/%.c gdtoa/arith.h
+gdtoa/%.o: gdtoa/%.c gdtoa/arith.h gdtoa/gd_qnan.h
$(CC) $(OPTCFLAGS) $(OPTWARNCFLAGS) -w -DINFNAN_CHECK -c -o $@ $<
libgdtoa.a: $(GDTOA_OBJS)
Modified: mlton/trunk/runtime/gdtoa-patch
===================================================================
--- mlton/trunk/runtime/gdtoa-patch 2011-06-04 14:34:05 UTC (rev 7537)
+++ mlton/trunk/runtime/gdtoa-patch 2011-06-04 14:34:36 UTC (rev 7538)
@@ -1,918 +1,1119 @@
-diff -u gdtoa.orig/arithchk.c gdtoa/arithchk.c
---- gdtoa.orig/arithchk.c 1998-06-19 20:46:11 +0000
-+++ gdtoa/arithchk.c 2008-10-04 02:01:43 +0000
-@@ -136,7 +136,7 @@
- return b == 0.;
- }
-
--main()
-+int main()
- {
- Akind *a = 0;
- int Ldef = 0;
-diff -u gdtoa.orig/dmisc.c gdtoa/dmisc.c
---- gdtoa.orig/dmisc.c 1998-11-02 19:34:31 +0000
-+++ gdtoa/dmisc.c 2008-10-04 02:01:43 +0000
-@@ -89,9 +89,9 @@
-
- void
- #ifdef KR_headers
--freedtoa(s) char *s;
-+gdtoa__freedtoa(s) char *s;
- #else
--freedtoa(char *s)
-+gdtoa__freedtoa(char *s)
- #endif
- {
- Bigint *b = (Bigint *)((int *)s - 1);
-diff -u gdtoa.orig/dtoa.c gdtoa/dtoa.c
---- gdtoa.orig/dtoa.c 2000-11-02 15:09:01 +0000
-+++ gdtoa/dtoa.c 2008-10-04 02:01:43 +0000
-@@ -80,7 +80,7 @@
- #endif
-
- char *
--dtoa
-+gdtoa__dtoa
- #ifdef KR_headers
- (d, mode, ndigits, decpt, sign, rve)
- double d; int mode, ndigits, *decpt, *sign; char **rve;
-@@ -142,7 +142,7 @@
-
- #ifndef MULTIPLE_THREADS
- if (dtoa_result) {
-- freedtoa(dtoa_result);
-+ gdtoa__freedtoa(dtoa_result);
- dtoa_result = 0;
- }
- #endif
-diff -u gdtoa.orig/g_Qfmt.c gdtoa/g_Qfmt.c
---- gdtoa.orig/g_Qfmt.c 2000-11-01 15:21:10 +0000
-+++ gdtoa/g_Qfmt.c 2008-10-04 02:01:43 +0000
-@@ -57,9 +57,9 @@
-
- char*
- #ifdef KR_headers
--g_Qfmt(buf, V, ndig, bufsize) char *buf; char *V; int ndig; unsigned bufsize;
-+gdtoa__g_Qfmt(buf, V, ndig, bufsize) char *buf; char *V; int ndig; unsigned bufsize;
- #else
--g_Qfmt(char *buf, void *V, int ndig, unsigned bufsize)
-+gdtoa__g_Qfmt(char *buf, void *V, int ndig, unsigned bufsize)
- #endif
- {
- static FPI fpi = { 113, 1-16383-113+1, 32766 - 16383 - 113 + 1, 1, 0 };
-@@ -115,6 +115,6 @@
- return 0;
- mode = 0;
- }
-- s = gdtoa(&fpi, ex, bits, &i, mode, ndig, &decpt, &se);
-+ s = gdtoa__gdtoa(&fpi, ex, bits, &i, mode, ndig, &decpt, &se);
- return g__fmt(buf, s, se, decpt, sign);
- }
-diff -u gdtoa.orig/g__fmt.c gdtoa/g__fmt.c
---- gdtoa.orig/g__fmt.c 2003-03-21 20:59:43 +0000
-+++ gdtoa/g__fmt.c 2008-10-04 02:01:43 +0000
-@@ -96,6 +96,6 @@
- *b++ = '0';
- *b = 0;
- }
-- freedtoa(s0);
-+ gdtoa__freedtoa(s0);
- return b;
+diff -P -C 2 -r gdtoa/dmisc.c gdtoa-new/dmisc.c
+*** gdtoa/dmisc.c 2004-04-11 23:39:50.000000000 -0400
+--- gdtoa-new/dmisc.c 2011-05-27 17:09:13.940030010 -0400
+***************
+*** 84,90 ****
+ void
+ #ifdef KR_headers
+! freedtoa(s) char *s;
+ #else
+! freedtoa(char *s)
+ #endif
+ {
+--- 84,90 ----
+ void
+ #ifdef KR_headers
+! gdtoa__freedtoa(s) char *s;
+ #else
+! gdtoa__freedtoa(char *s)
+ #endif
+ {
+diff -P -C 2 -r gdtoa/dtoa.c gdtoa-new/dtoa.c
+*** gdtoa/dtoa.c 2010-09-15 10:59:11.000000000 -0400
+--- gdtoa-new/dtoa.c 2011-05-27 17:09:13.940030010 -0400
+***************
+*** 74,78 ****
+
+ char *
+! dtoa
+ #ifdef KR_headers
+ (d0, mode, ndigits, decpt, sign, rve)
+--- 74,78 ----
+
+ char *
+! gdtoa__dtoa
+ #ifdef KR_headers
+ (d0, mode, ndigits, decpt, sign, rve)
+***************
+*** 147,151 ****
+ #ifndef MULTIPLE_THREADS
+ if (dtoa_result) {
+! freedtoa(dtoa_result);
+ dtoa_result = 0;
+ }
+--- 147,151 ----
+ #ifndef MULTIPLE_THREADS
+ if (dtoa_result) {
+! gdtoa__freedtoa(dtoa_result);
+ dtoa_result = 0;
+ }
+diff -P -C 2 -r gdtoa/g_ddfmt.c gdtoa-new/g_ddfmt.c
+*** gdtoa/g_ddfmt.c 2009-04-11 23:11:05.000000000 -0400
+--- gdtoa-new/g_ddfmt.c 2011-05-27 17:09:13.940030010 -0400
+***************
+*** 34,40 ****
+ char *
+ #ifdef KR_headers
+! g_ddfmt(buf, dd0, ndig, bufsize) char *buf; double *dd0; int ndig; size_t bufsize;
+ #else
+! g_ddfmt(char *buf, double *dd0, int ndig, size_t bufsize)
+ #endif
+ {
+--- 34,40 ----
+ char *
+ #ifdef KR_headers
+! gdtoa__g_ddfmt(buf, dd0, ndig, bufsize) char *buf; double *dd0; int ndig; size_t bufsize;
+ #else
+! gdtoa__g_ddfmt(char *buf, double *dd0, int ndig, size_t bufsize)
+ #endif
+ {
+***************
+*** 164,168 ****
+ fpi.sudden_underflow = 0;
+ i = STRTOG_Normal;
+! s = gdtoa(&fpi, ex, bits, &i, mode, ndig, &decpt, &se);
+ b = g__fmt(buf, s, se, decpt, z->sign, bufsize);
+ Bfree(z);
+--- 164,168 ----
+ fpi.sudden_underflow = 0;
+ i = STRTOG_Normal;
+! s = gdtoa__gdtoa(&fpi, ex, bits, &i, mode, ndig, &decpt, &se);
+ b = g__fmt(buf, s, se, decpt, z->sign, bufsize);
+ Bfree(z);
+diff -P -C 2 -r gdtoa/g_dfmt.c gdtoa-new/g_dfmt.c
+*** gdtoa/g_dfmt.c 2010-07-08 23:38:41.000000000 -0400
+--- gdtoa-new/g_dfmt.c 2011-05-27 17:09:13.940030010 -0400
+***************
+*** 34,40 ****
+ char*
+ #ifdef KR_headers
+! g_dfmt(buf, d, ndig, bufsize) char *buf; double *d; int ndig; size_t bufsize;
+ #else
+! g_dfmt(char *buf, double *d, int ndig, size_t bufsize)
+ #endif
+ {
+--- 34,40 ----
+ char*
+ #ifdef KR_headers
+! gdtoa__g_dfmt(buf, d, ndig, bufsize) char *buf; double *d; int ndig; size_t bufsize;
+ #else
+! gdtoa__g_dfmt(char *buf, double *d, int ndig, size_t bufsize)
+ #endif
+ {
+***************
+*** 91,95 ****
+ if (sign)
+ i = STRTOG_Normal | STRTOG_Neg;
+! s = gdtoa(fpi, ex, bits, &i, mode, ndig, &decpt, &se);
+ return g__fmt(buf, s, se, decpt, sign, bufsize);
}
-diff -u gdtoa.orig/g_ddfmt.c gdtoa/g_ddfmt.c
---- gdtoa.orig/g_ddfmt.c 1998-09-09 12:09:31 +0000
-+++ gdtoa/g_ddfmt.c 2008-10-04 02:01:43 +0000
-@@ -40,9 +40,9 @@
-
- char *
- #ifdef KR_headers
--g_ddfmt(buf, dd, ndig, bufsize) char *buf; double *dd; int ndig; unsigned bufsize;
-+gdtoa__g_ddfmt(buf, dd, ndig, bufsize) char *buf; double *dd; int ndig; unsigned bufsize;
- #else
--g_ddfmt(char *buf, double *dd, int ndig, unsigned bufsize)
-+gdtoa__g_ddfmt(char *buf, double *dd, int ndig, unsigned bufsize)
- #endif
- {
- FPI fpi;
-@@ -154,7 +154,7 @@
- fpi.rounding = FPI_Round_near;
- fpi.sudden_underflow = 0;
- i = STRTOG_Normal;
-- s = gdtoa(&fpi, ex, bits, &i, mode, ndig, &decpt, &se);
-+ s = gdtoa__gdtoa(&fpi, ex, bits, &i, mode, ndig, &decpt, &se);
- b = g__fmt(buf, s, se, decpt, z->sign);
- Bfree(z);
- return b;
-diff -u gdtoa.orig/g_dfmt.c gdtoa/g_dfmt.c
---- gdtoa.orig/g_dfmt.c 1998-09-09 14:18:15 +0000
-+++ gdtoa/g_dfmt.c 2008-10-04 02:01:43 +0000
-@@ -39,9 +39,9 @@
-
- char*
- #ifdef KR_headers
--g_dfmt(buf, d, ndig, bufsize) char *buf; double *d; int ndig; unsigned bufsize;
-+gdtoa__g_dfmt(buf, d, ndig, bufsize) char *buf; double *d; int ndig; unsigned bufsize;
- #else
--g_dfmt(char *buf, double *d, int ndig, unsigned bufsize)
-+gdtoa__g_dfmt(char *buf, double *d, int ndig, unsigned bufsize)
- #endif
- {
- static FPI fpi = { 53, 1-1023-53+1, 2046-1023-53+1, 1, 0 };
-@@ -90,6 +90,6 @@
- mode = 0;
- }
- i = STRTOG_Normal;
-- s = gdtoa(&fpi, ex, bits, &i, mode, ndig, &decpt, &se);
-+ s = gdtoa__gdtoa(&fpi, ex, bits, &i, mode, ndig, &decpt, &se);
- return g__fmt(buf, s, se, decpt, sign);
- }
-diff -u gdtoa.orig/g_ffmt.c gdtoa/g_ffmt.c
---- gdtoa.orig/g_ffmt.c 1998-09-12 20:39:39 +0000
-+++ gdtoa/g_ffmt.c 2008-10-04 02:01:43 +0000
-@@ -39,9 +39,9 @@
-
- char*
- #ifdef KR_headers
--g_ffmt(buf, f, ndig, bufsize) char *buf; float *f; int ndig; unsigned bufsize;
-+gdtoa__g_ffmt(buf, f, ndig, bufsize) char *buf; float *f; int ndig; unsigned bufsize;
- #else
--g_ffmt(char *buf, float *f, int ndig, unsigned bufsize)
-+gdtoa__g_ffmt(char *buf, float *f, int ndig, unsigned bufsize)
- #endif
- {
- static FPI fpi = { 24, 1-127-24+1, 254-127-24+1, 1, 0 };
-@@ -89,6 +89,6 @@
- mode = 0;
- }
- i = STRTOG_Normal;
-- s = gdtoa(&fpi, ex, bits, &i, mode, ndig, &decpt, &se);
-+ s = gdtoa__gdtoa(&fpi, ex, bits, &i, mode, ndig, &decpt, &se);
- return g__fmt(buf, s, se, decpt, sign);
- }
-diff -u gdtoa.orig/g_xLfmt.c gdtoa/g_xLfmt.c
---- gdtoa.orig/g_xLfmt.c 1998-09-09 16:35:43 +0000
-+++ gdtoa/g_xLfmt.c 2008-10-04 02:01:43 +0000
-@@ -55,9 +55,9 @@
-
- char*
- #ifdef KR_headers
--g_xLfmt(buf, V, ndig, bufsize) char *buf; char *V; int ndig; unsigned bufsize;
-+gdtoa__g_xLfmt(buf, V, ndig, bufsize) char *buf; char *V; int ndig; unsigned bufsize;
- #else
--g_xLfmt(char *buf, void *V, int ndig, unsigned bufsize)
-+gdtoa__g_xLfmt(char *buf, void *V, int ndig, unsigned bufsize)
- #endif
- {
- static FPI fpi = { 64, 1-16383-64+1, 32766 - 16383 - 64 + 1, 1, 0 };
-@@ -109,6 +109,6 @@
- return 0;
- mode = 0;
- }
-- s = gdtoa(&fpi, ex, bits, &i, mode, ndig, &decpt, &se);
-+ s = gdtoa__gdtoa(&fpi, ex, bits, &i, mode, ndig, &decpt, &se);
- return g__fmt(buf, s, se, decpt, sign);
- }
-diff -u gdtoa.orig/g_xfmt.c gdtoa/g_xfmt.c
---- gdtoa.orig/g_xfmt.c 1998-09-09 13:59:17 +0000
-+++ gdtoa/g_xfmt.c 2008-10-04 02:01:43 +0000
-@@ -59,9 +59,9 @@
-
- char*
- #ifdef KR_headers
--g_xfmt(buf, V, ndig, bufsize) char *buf; char *V; int ndig; unsigned bufsize;
-+gdtoa__g_xfmt(buf, V, ndig, bufsize) char *buf; char *V; int ndig; unsigned bufsize;
- #else
--g_xfmt(char *buf, void *V, int ndig, unsigned bufsize)
-+gdtoa__g_xfmt(char *buf, void *V, int ndig, unsigned bufsize)
- #endif
- {
- static FPI fpi = { 64, 1-16383-64+1, 32766 - 16383 - 64 + 1, 1, 0 };
-@@ -114,6 +114,6 @@
- return 0;
- mode = 0;
- }
-- s = gdtoa(&fpi, ex, bits, &i, mode, ndig, &decpt, &se);
-+ s = gdtoa__gdtoa(&fpi, ex, bits, &i, mode, ndig, &decpt, &se);
- return g__fmt(buf, s, se, decpt, sign);
- }
-Only in gdtoa: gdtoa
-diff -u gdtoa.orig/gdtoa.c gdtoa/gdtoa.c
---- gdtoa.orig/gdtoa.c 1999-09-21 04:22:19 +0000
-+++ gdtoa/gdtoa.c 2008-10-04 02:01:43 +0000
-@@ -115,7 +115,7 @@
- */
-
- char *
--gdtoa
-+gdtoa__gdtoa
- #ifdef KR_headers
- (fpi, be, bits, kindp, mode, ndigits, decpt, rve)
- FPI *fpi; int be; ULong *bits;
-@@ -168,7 +168,7 @@
-
- #ifndef MULTIPLE_THREADS
- if (dtoa_result) {
-- freedtoa(dtoa_result);
-+ gdtoa__freedtoa(dtoa_result);
- dtoa_result = 0;
- }
- #endif
-diff -u gdtoa.orig/gdtoa.h gdtoa/gdtoa.h
---- gdtoa.orig/gdtoa.h 2000-11-01 15:01:39 +0000
-+++ gdtoa/gdtoa.h 2008-10-04 02:01:43 +0000
-@@ -108,49 +108,49 @@
- extern "C" {
- #endif
-
--extern char* dtoa ANSI((double d, int mode, int ndigits, int *decpt,
-+extern char* gdtoa__dtoa ANSI((double d, int mode, int ndigits, int *decpt,
- int *sign, char **rve));
--extern char* gdtoa ANSI((FPI *fpi, int be, ULong *bits, int *kindp,
-+extern char* gdtoa__gdtoa ANSI((FPI *fpi, int be, ULong *bits, int *kindp,
- int mode, int ndigits, int *decpt, char **rve));
--extern void freedtoa ANSI((char*));
--extern float strtof ANSI((CONST char *, char **));
--extern double strtod ANSI((CONST char *, char **));
--extern int strtodg ANSI((CONST char*, char**, FPI*, Long*, ULong*));
-+extern void gdtoa__freedtoa ANSI((char*));
-+extern float gdtoa__strtof ANSI((CONST char *, char **));
-+extern double gdtoa__strtod ANSI((CONST char *, char **));
-+extern int gdtoa__strtodg ANSI((CONST char*, char**, FPI*, Long*, ULong*));
-
--extern char* g_ddfmt ANSI((char*, double*, int, unsigned));
--extern char* g_dfmt ANSI((char*, double*, int, unsigned));
--extern char* g_ffmt ANSI((char*, float*, int, unsigned));
--extern char* g_Qfmt ANSI((char*, void*, int, unsigned));
--extern char* g_xfmt ANSI((char*, void*, int, unsigned));
--extern char* g_xLfmt ANSI((char*, void*, int, unsigned));
-+extern char* gdtoa__g_ddfmt ANSI((char*, double*, int, unsigned));
-+extern char* gdtoa__g_dfmt ANSI((char*, double*, int, unsigned));
-+extern char* gdtoa__g_ffmt ANSI((char*, float*, int, unsigned));
-+extern char* gdtoa__g_Qfmt ANSI((char*, void*, int, unsigned));
-+extern char* gdtoa__g_xfmt ANSI((char*, void*, int, unsigned));
-+extern char* gdtoa__g_xLfmt ANSI((char*, void*, int, unsigned));
-
--extern int strtoId ANSI((CONST char*, char**, double*, double*));
--extern int strtoIdd ANSI((CONST char*, char**, double*, double*));
--extern int strtoIf ANSI((CONST char*, char**, float*, float*));
--extern int strtoIQ ANSI((CONST char*, char**, void*, void*));
--extern int strtoIx ANSI((CONST char*, char**, void*, void*));
--extern int strtoIxL ANSI((CONST char*, char**, void*, void*));
--extern int strtord ANSI((CONST char*, char**, int, double*));
--extern int strtordd ANSI((CONST char*, char**, int, double*));
--extern int strtorf ANSI((CONST char*, char**, int, float*));
--extern int strtorQ ANSI((CONST char*, char**, int, void*));
--extern int strtorx ANSI((CONST char*, char**, int, void*));
--extern int strtorxL ANSI((CONST char*, char**, int, void*));
-+extern int gdtoa__strtoId ANSI((CONST char*, char**, double*, double*));
-+extern int gdtoa__strtoIdd ANSI((CONST char*, char**, double*, double*));
-+extern int gdtoa__strtoIf ANSI((CONST char*, char**, float*, float*));
-+extern int gdtoa__strtoIQ ANSI((CONST char*, char**, void*, void*));
-+extern int gdtoa__strtoIx ANSI((CONST char*, char**, void*, void*));
-+extern int gdtoa__strtoIxL ANSI((CONST char*, char**, void*, void*));
-+extern int gdtoa__strtord ANSI((CONST char*, char**, int, double*));
-+extern int gdtoa__strtordd ANSI((CONST char*, char**, int, double*));
-+extern int gdtoa__strtorf ANSI((CONST char*, char**, int, float*));
-+extern int gdtoa__strtorQ ANSI((CONST char*, char**, int, void*));
-+extern int gdtoa__strtorx ANSI((CONST char*, char**, int, void*));
-+extern int gdtoa__strtorxL ANSI((CONST char*, char**, int, void*));
- #if 1
--extern int strtodI ANSI((CONST char*, char**, double*));
--extern int strtopd ANSI((CONST char*, char**, double*));
--extern int strtopdd ANSI((CONST char*, char**, double*));
--extern int strtopf ANSI((CONST char*, char**, float*));
--extern int strtopQ ANSI((CONST char*, char**, void*));
--extern int strtopx ANSI((CONST char*, char**, void*));
--extern int strtopxL ANSI((CONST char*, char**, void*));
-+extern int gdtoa__strtodI ANSI((CONST char*, char**, double*));
-+extern int gdtoa__strtopd ANSI((CONST char*, char**, double*));
-+extern int gdtoa__strtopdd ANSI((CONST char*, char**, double*));
-+extern int gdtoa__strtopf ANSI((CONST char*, char**, float*));
-+extern int gdtoa__strtopQ ANSI((CONST char*, char**, void*));
-+extern int gdtoa__strtopx ANSI((CONST char*, char**, void*));
-+extern int gdtoa__strtopxL ANSI((CONST char*, char**, void*));
- #else
--#define strtopd(s,se,x) strtord(s,se,1,x)
--#define strtopdd(s,se,x) strtordd(s,se,1,x)
--#define strtopf(s,se,x) strtorf(s,se,1,x)
--#define strtopQ(s,se,x) strtorQ(s,se,1,x)
--#define strtopx(s,se,x) strtorx(s,se,1,x)
--#define strtopxL(s,se,x) strtorxL(s,se,1,x)
-+#define gdtoa__strtopd(s,se,x) gdtoa__strtord(s,se,1,x)
-+#define gdtoa__strtopdd(s,se,x) gdtoa__strtordd(s,se,1,x)
-+#define gdtoa__strtopf(s,se,x) gdtoa__strtorf(s,se,1,x)
-+#define gdtoa__strtopQ(s,se,x) gdtoa__strtorQ(s,se,1,x)
-+#define gdtoa__strtopx(s,se,x) gdtoa__strtorx(s,se,1,x)
-+#define gdtoa__strtopxL(s,se,x) gdtoa__strtorxL(s,se,1,x)
- #endif
-
- #ifdef __cplusplus
-diff -u gdtoa.orig/gdtoaimp.h gdtoa/gdtoaimp.h
---- gdtoa.orig/gdtoaimp.h 2000-11-02 15:09:01 +0000
-+++ gdtoa/gdtoaimp.h 2008-10-04 02:24:16 +0000
-@@ -267,7 +267,7 @@
- Exactly one of IEEE_8087, IEEE_MC68k, VAX, or IBM should be defined.
- #endif
-
--typedef union { double d; ULong L[2]; } U;
-+typedef union { double d; ULong L[2]; } __attribute__((__may_alias__)) U;
-
- #ifdef YES_ALIAS
- #define dval(x) x
-@@ -502,6 +502,7 @@
- #define g__fmt g__fmt_D2A
- #define gethex gethex_D2A
- #define hexdig hexdig_D2A
-+#define hexdig_init hexdig_init_D2A
- #define hexnan hexnan_D2A
- #define hi0bits hi0bits_D2A
- #define i2b i2b_D2A
-@@ -551,7 +552,7 @@
- int *decpt, int *sign, char **rve));
- extern char *g__fmt ANSI((char*, char*, char*, int, ULong));
- extern int gethex ANSI((CONST char**, FPI*, Long*, Bigint**, int));
-- extern void hexdig_init_D2A(Void);
-+ extern void hexdig_init ANSI((Void));
- extern int hexnan ANSI((CONST char**, FPI*, ULong*));
- extern int hi0bits ANSI((ULong));
- extern Bigint *i2b ANSI((int));
-@@ -570,8 +571,8 @@
- extern Bigint *s2b ANSI((CONST char*, int, int, ULong));
- extern Bigint *set_ones ANSI((Bigint*, int));
- extern char *strcp ANSI((char*, const char*));
-- extern int strtoIg ANSI((CONST char*, char**, FPI*, Long*, Bigint**, int*));
-- extern double strtod ANSI((const char *s00, char **se));
-+ extern int gdtoa__strtoIg ANSI((CONST char*, char**, FPI*, Long*, Bigint**, int*));
-+ extern double gdtoa__strtod ANSI((const char *s00, char **se));
- extern Bigint *sum ANSI((Bigint*, Bigint*));
- extern int trailz ANSI((Bigint*));
- extern double ulp ANSI((double));
-diff -u gdtoa.orig/gethex.c gdtoa/gethex.c
---- gdtoa.orig/gethex.c 2003-03-26 20:33:08 +0000
-+++ gdtoa/gethex.c 2008-10-04 02:24:16 +0000
-@@ -57,7 +57,7 @@
- #endif
-
- if (!hexdig['0'])
-- hexdig_init_D2A();
-+ hexdig_init();
- havedig = 0;
- s0 = *(CONST unsigned char **)sp + 2;
- while(s0[havedig] == '0')
-diff -u gdtoa.orig/hd_init.c gdtoa/hd_init.c
---- gdtoa.orig/hd_init.c 2000-11-03 01:45:35 +0000
-+++ gdtoa/hd_init.c 2008-10-04 02:24:16 +0000
-@@ -52,7 +52,7 @@
- }
-
- void
--hexdig_init_D2A(Void)
-+hexdig_init(Void)
- {
- #define USC (unsigned char *)
- htinit(hexdig, USC "0123456789", 0x10);
-diff -u gdtoa.orig/hexnan.c gdtoa/hexnan.c
---- gdtoa.orig/hexnan.c 2000-11-03 01:44:38 +0000
-+++ gdtoa/hexnan.c 2008-10-04 02:24:16 +0000
-@@ -68,7 +68,7 @@
- int havedig, hd0, i, nbits;
-
- if (!hexdig['0'])
-- hexdig_init_D2A();
-+ hexdig_init();
- nbits = fpi->nbits;
- x = x0 + (nbits >> kshift);
- if (nbits & kmask)
-diff -u gdtoa.orig/strtoIQ.c gdtoa/strtoIQ.c
---- gdtoa.orig/strtoIQ.c 1998-06-22 18:49:25 +0000
-+++ gdtoa/strtoIQ.c 2008-10-04 02:01:43 +0000
-@@ -39,9 +39,9 @@
-
- int
- #ifdef KR_headers
--strtoIQ(s, sp, a, b) CONST char *s; char **sp; void *a; void *b;
-+gdtoa__strtoIQ(s, sp, a, b) CONST char *s; char **sp; void *a; void *b;
- #else
--strtoIQ(CONST char *s, char **sp, void *a, void *b)
-+gdtoa__strtoIQ(CONST char *s, char **sp, void *a, void *b)
- #endif
- {
- static FPI fpi = { 113, 1-16383-113+1, 32766-16383-113+1, 1, SI };
-@@ -52,7 +52,7 @@
-
- B[0] = Balloc(2);
- B[0]->wds = 4;
-- k = strtoIg(s, sp, &fpi, exp, B, rv);
-+ k = gdtoa__strtoIg(s, sp, &fpi, exp, B, rv);
- ULtoQ(L, B[0]->x, exp[0], rv[0]);
- Bfree(B[0]);
- if (B[1]) {
-diff -u gdtoa.orig/strtoId.c gdtoa/strtoId.c
---- gdtoa.orig/strtoId.c 1998-09-09 13:59:17 +0000
-+++ gdtoa/strtoId.c 2008-10-04 02:01:43 +0000
-@@ -39,9 +39,9 @@
-
- int
- #ifdef KR_headers
--strtoId(s, sp, f0, f1) CONST char *s; char **sp; double *f0, *f1;
-+gdtoa__strtoId(s, sp, f0, f1) CONST char *s; char **sp; double *f0, *f1;
- #else
--strtoId(CONST char *s, char **sp, double *f0, double *f1)
-+gdtoa__strtoId(CONST char *s, char **sp, double *f0, double *f1)
- #endif
- {
- static FPI fpi = { 53, 1-1023-53+1, 2046-1023-53+1, 1, SI };
-@@ -51,7 +51,7 @@
-
- B[0] = Balloc(1);
- B[0]->wds = 2;
-- k = strtoIg(s, sp, &fpi, exp, B, rv);
-+ k = gdtoa__strtoIg(s, sp, &fpi, exp, B, rv);
- ULtod((ULong*)f0, B[0]->x, exp[0], rv[0]);
- Bfree(B[0]);
- if (B[1]) {
-diff -u gdtoa.orig/strtoIdd.c gdtoa/strtoIdd.c
---- gdtoa.orig/strtoIdd.c 1998-09-09 13:59:17 +0000
-+++ gdtoa/strtoIdd.c 2008-10-04 02:01:43 +0000
-@@ -39,9 +39,9 @@
-
- int
- #ifdef KR_headers
--strtoIdd(s, sp, f0, f1) CONST char *s; char **sp; double *f0, *f1;
-+gdtoa__strtoIdd(s, sp, f0, f1) CONST char *s; char **sp; double *f0, *f1;
- #else
--strtoIdd(CONST char *s, char **sp, double *f0, double *f1)
-+gdtoa__strtoIdd(CONST char *s, char **sp, double *f0, double *f1)
- #endif
- {
- #ifdef Sudden_Underflow
-@@ -55,7 +55,7 @@
-
- B[0] = Balloc(2);
- B[0]->wds = 4;
-- k = strtoIg(s, sp, &fpi, exp, B, rv);
-+ k = gdtoa__strtoIg(s, sp, &fpi, exp, B, rv);
- ULtodd((ULong*)f0, B[0]->x, exp[0], rv[0]);
- Bfree(B[0]);
- if (B[1]) {
-diff -u gdtoa.orig/strtoIf.c gdtoa/strtoIf.c
---- gdtoa.orig/strtoIf.c 1998-09-09 13:59:17 +0000
-+++ gdtoa/strtoIf.c 2008-10-04 02:01:43 +0000
-@@ -39,9 +39,9 @@
-
- int
- #ifdef KR_headers
--strtoIf(s, sp, f0, f1) CONST char *s; char **sp; float *f0, *f1;
-+gdtoa__strtoIf(s, sp, f0, f1) CONST char *s; char **sp; float *f0, *f1;
- #else
--strtoIf(CONST char *s, char **sp, float *f0, float *f1)
-+gdtoa__strtoIf(CONST char *s, char **sp, float *f0, float *f1)
- #endif
- {
- static FPI fpi = { 24, 1-127-24+1, 254-127-24+1, 1, SI };
-@@ -51,7 +51,7 @@
-
- B[0] = Balloc(0);
- B[0]->wds = 1;
-- k = strtoIg(s, sp, &fpi, exp, B, rv);
-+ k = gdtoa__strtoIg(s, sp, &fpi, exp, B, rv);
- ULtof((ULong*)f0, B[0]->x, exp[0], rv[0]);
- Bfree(B[0]);
- if (B[1]) {
-diff -u gdtoa.orig/strtoIg.c gdtoa/strtoIg.c
---- gdtoa.orig/strtoIg.c 1998-06-26 14:04:19 +0000
-+++ gdtoa/strtoIg.c 2008-10-04 02:01:43 +0000
-@@ -39,9 +39,9 @@
-
- int
- #ifdef KR_headers
--strtoIg(s00, se, fpi, exp, B, rvp) CONST char *s00; char **se; FPI *fpi; Long *exp; Bigint **B; int *rvp;
-+gdtoa__strtoIg(s00, se, fpi, exp, B, rvp) CONST char *s00; char **se; FPI *fpi; Long *exp; Bigint **B; int *rvp;
- #else
--strtoIg(CONST char *s00, char **se, FPI *fpi, Long *exp, Bigint **B, int *rvp)
-+gdtoa__strtoIg(CONST char *s00, char **se, FPI *fpi, Long *exp, Bigint **B, int *rvp)
- #endif
- {
- Bigint *b, *b1;
-@@ -50,7 +50,7 @@
- Long e1;
-
- b = *B;
-- rv = strtodg(s00, se, fpi, exp, b->x);
-+ rv = gdtoa__strtodg(s00, se, fpi, exp, b->x);
- if (!(rv & STRTOG_Inexact)) {
- B[1] = 0;
- return *rvp = rv;
-diff -u gdtoa.orig/strtoIx.c gdtoa/strtoIx.c
---- gdtoa.orig/strtoIx.c 1998-09-09 13:13:22 +0000
-+++ gdtoa/strtoIx.c 2008-10-04 02:01:43 +0000
-@@ -39,9 +39,9 @@
-
- int
- #ifdef KR_headers
--strtoIx(s, sp, a, b) CONST char *s; char **sp; void *a; void *b;
-+gdtoa__strtoIx(s, sp, a, b) CONST char *s; char **sp; void *a; void *b;
- #else
--strtoIx(CONST char *s, char **sp, void *a, void *b)
-+gdtoa__strtoIx(CONST char *s, char **sp, void *a, void *b)
- #endif
- {
- static FPI fpi = { 64, 1-16383-64+1, 32766 - 16383 - 64 + 1, 1, SI };
-@@ -52,7 +52,7 @@
-
- B[0] = Balloc(1);
- B[0]->wds = 2;
-- k = strtoIg(s, sp, &fpi, exp, B, rv);
-+ k = gdtoa__strtoIg(s, sp, &fpi, exp, B, rv);
- ULtox(L, B[0]->x, exp[0], rv[0]);
- Bfree(B[0]);
- if (B[1]) {
-diff -u gdtoa.orig/strtoIxL.c gdtoa/strtoIxL.c
---- gdtoa.orig/strtoIxL.c 1998-09-09 13:13:22 +0000
-+++ gdtoa/strtoIxL.c 2008-10-04 02:01:43 +0000
-@@ -39,9 +39,9 @@
-
- int
- #ifdef KR_headers
--strtoIxL(s, sp, a, b) CONST char *s; char **sp; void *a; void *b;
-+gdtoa__strtoIxL(s, sp, a, b) CONST char *s; char **sp; void *a; void *b;
- #else
--strtoIxL(CONST char *s, char **sp, void *a, void *b)
-+gdtoa__strtoIxL(CONST char *s, char **sp, void *a, void *b)
- #endif
- {
- static FPI fpi = { 64, 1-16383-64+1, 32766 - 16383 - 64 + 1, 1, SI };
-@@ -52,7 +52,7 @@
-
- B[0] = Balloc(1);
- B[0]->wds = 2;
-- k = strtoIg(s, sp, &fpi, exp, B, rv);
-+ k = gdtoa__strtoIg(s, sp, &fpi, exp, B, rv);
- ULtoxL(L, B[0]->x, exp[0], rv[0]);
- Bfree(B[0]);
- if (B[1]) {
-diff -u gdtoa.orig/strtod.c gdtoa/strtod.c
---- gdtoa.orig/strtod.c 2003-03-21 21:24:01 +0000
-+++ gdtoa/strtod.c 2008-10-04 02:01:43 +0000
-@@ -58,7 +58,7 @@
- #endif
-
- double
--strtod
-+gdtoa__strtod
- #ifdef KR_headers
- (s00, se) CONST char *s00; char **se;
- #else
-diff -u gdtoa.orig/strtodI.c gdtoa/strtodI.c
---- gdtoa.orig/strtodI.c 2000-11-02 04:33:13 +0000
-+++ gdtoa/strtodI.c 2008-10-04 02:01:43 +0000
-@@ -56,9 +56,9 @@
-
- int
- #ifdef KR_headers
--strtodI(s, sp, dd) CONST char *s; char **sp; double *dd;
-+gdtoa__strtodI(s, sp, dd) CONST char *s; char **sp; double *dd;
- #else
--strtodI(CONST char *s, char **sp, double *dd)
-+gdtoa__strtodI(CONST char *s, char **sp, double *dd)
- #endif
- {
- #ifdef Sudden_Underflow
-@@ -75,7 +75,7 @@
- } U;
- U *u;
-
-- k = strtodg(s, sp, &fpi, &exp, bits);
-+ k = gdtoa__strtodg(s, sp, &fpi, &exp, bits);
- u = (U*)dd;
- sign = k & STRTOG_Neg ? 0x80000000L : 0;
- switch(k & STRTOG_Retmask) {
-diff -u gdtoa.orig/strtodg.c gdtoa/strtodg.c
---- gdtoa.orig/strtodg.c 2003-03-21 20:59:43 +0000
-+++ gdtoa/strtodg.c 2008-10-04 02:01:43 +0000
-@@ -316,7 +316,7 @@
- }
-
- int
--strtodg
-+gdtoa__strtodg
- #ifdef KR_headers
- (s00, se, fpi, exp, bits)
- CONST char *s00; char **se; FPI *fpi; Long *exp; ULong *bits;
-diff -u gdtoa.orig/strtof.c gdtoa/strtof.c
---- gdtoa.orig/strtof.c 2000-11-02 04:31:40 +0000
-+++ gdtoa/strtof.c 2008-10-04 02:01:43 +0000
-@@ -37,11 +37,11 @@
-
- #include "gdtoaimp.h"
-
-- float
-+ float gdtoa__strtof
- #ifdef KR_headers
--strtof(s, sp) CONST char *s; char **sp;
-+ (s, sp) CONST char *s; char **sp;
- #else
--strtof(CONST char *s, char **sp)
-+ (CONST char *s, char **sp)
- #endif
- {
- #ifdef Sudden_Underflow
-@@ -54,7 +54,7 @@
- int k;
- union { ULong L[1]; float f; } u;
-
-- k = strtodg(s, sp, &fpi, &exp, bits);
-+ k = gdtoa__strtodg(s, sp, &fpi, &exp, bits);
- switch(k & STRTOG_Retmask) {
- case STRTOG_NoNumber:
- case STRTOG_Zero:
-diff -u gdtoa.orig/strtopQ.c gdtoa/strtopQ.c
---- gdtoa.orig/strtopQ.c 2000-11-02 04:31:40 +0000
-+++ gdtoa/strtopQ.c 2008-10-04 02:01:43 +0000
-@@ -57,9 +57,9 @@
-
- int
- #ifdef KR_headers
--strtopQ(s, sp, V) CONST char *s; char **sp; void *V;
-+gdtoa__strtopQ(s, sp, V) CONST char *s; char **sp; void *V;
- #else
--strtopQ(CONST char *s, char **sp, void *V)
-+gdtoa__strtopQ(CONST char *s, char **sp, void *V)
- #endif
- {
- #ifdef Sudden_Underflow
-@@ -72,7 +72,7 @@
- int k;
- ULong *L = (ULong*)V;
-
-- k = strtodg(s, sp, &fpi, &exp, bits);
-+ k = gdtoa__strtodg(s, sp, &fpi, &exp, bits);
- switch(k & STRTOG_Retmask) {
- case STRTOG_NoNumber:
- case STRTOG_Zero:
-diff -u gdtoa.orig/strtopd.c gdtoa/strtopd.c
---- gdtoa.orig/strtopd.c 1998-09-12 15:30:06 +0000
-+++ gdtoa/strtopd.c 2008-10-04 02:01:43 +0000
-@@ -39,9 +39,9 @@
-
- int
- #ifdef KR_headers
--strtopd(s, sp, d) char *s; char **sp; double *d;
-+gdtoa__strtopd(s, sp, d) char *s; char **sp; double *d;
- #else
--strtopd(CONST char *s, char **sp, double *d)
-+gdtoa__strtopd(CONST char *s, char **sp, double *d)
- #endif
- {
- static FPI fpi0 = { 53, 1-1023-53+1, 2046-1023-53+1, 1, SI };
-@@ -49,7 +49,7 @@
- Long exp;
- int k;
-
-- k = strtodg(s, sp, &fpi0, &exp, bits);
-+ k = gdtoa__strtodg(s, sp, &fpi0, &exp, bits);
- ULtod((ULong*)d, bits, exp, k);
- return k;
- }
-diff -u gdtoa.orig/strtopdd.c gdtoa/strtopdd.c
---- gdtoa.orig/strtopdd.c 2000-11-02 04:33:46 +0000
-+++ gdtoa/strtopdd.c 2008-10-04 02:01:43 +0000
-@@ -39,9 +39,9 @@
-
- int
- #ifdef KR_headers
--strtopdd(s, sp, dd) CONST char *s; char **sp; double *dd;
-+gdtoa__strtopdd(s, sp, dd) CONST char *s; char **sp; double *dd;
- #else
--strtopdd(CONST char *s, char **sp, double *dd)
-+gdtoa__strtopdd(CONST char *s, char **sp, double *dd)
- #endif
- {
- #ifdef Sudden_Underflow
-@@ -58,7 +58,7 @@
- } U;
- U *u;
-
-- rv = strtodg(s, sp, &fpi, &exp, bits);
-+ rv = gdtoa__strtodg(s, sp, &fpi, &exp, bits);
- u = (U*)dd;
- switch(rv & STRTOG_Retmask) {
- case STRTOG_NoNumber:
-diff -u gdtoa.orig/strtopf.c gdtoa/strtopf.c
---- gdtoa.orig/strtopf.c 2000-11-02 04:31:40 +0000
-+++ gdtoa/strtopf.c 2008-10-04 02:01:43 +0000
-@@ -39,9 +39,9 @@
-
- int
- #ifdef KR_headers
--strtopf(s, sp, f) CONST char *s; char **sp; float *f;
-+gdtoa__strtopf(s, sp, f) CONST char *s; char **sp; float *f;
- #else
--strtopf(CONST char *s, char **sp, float *f)
-+gdtoa__strtopf(CONST char *s, char **sp, float *f)
- #endif
- {
- #ifdef Sudden_Underflow
-@@ -53,7 +53,7 @@
- Long exp;
- int k;
-
-- k = strtodg(s, sp, &fpi, &exp, bits);
-+ k = gdtoa__strtodg(s, sp, &fpi, &exp, bits);
- L = (ULong*)f;
- switch(k & STRTOG_Retmask) {
- case STRTOG_NoNumber:
-diff -u gdtoa.orig/strtopx.c gdtoa/strtopx.c
---- gdtoa.orig/strtopx.c 2000-11-02 04:31:40 +0000
-+++ gdtoa/strtopx.c 2008-10-04 02:01:43 +0000
-@@ -59,9 +59,9 @@
-
- int
- #ifdef KR_headers
--strtopx(s, sp, V) CONST char *s; char **sp; void *V;
-+gdtoa__strtopx(s, sp, V) CONST char *s; char **sp; void *V;
- #else
--strtopx(CONST char *s, char **sp, void *V)
-+gdtoa__strtopx(CONST char *s, char **sp, void *V)
- #endif
- {
- #ifdef Sudden_Underflow
-@@ -74,7 +74,7 @@
- int k;
- UShort *L = (UShort*)V;
-
-- k = strtodg(s, sp, &fpi, &exp, bits);
-+ k = gdtoa__strtodg(s, sp, &fpi, &exp, bits);
- switch(k & STRTOG_Retmask) {
- case STRTOG_NoNumber:
- case STRTOG_Zero:
-diff -u gdtoa.orig/strtopxL.c gdtoa/strtopxL.c
---- gdtoa.orig/strtopxL.c 2000-11-02 04:31:40 +0000
-+++ gdtoa/strtopxL.c 2008-10-04 02:01:43 +0000
-@@ -55,9 +55,9 @@
-
- int
- #ifdef KR_headers
--strtopxL(s, sp, V) CONST char *s; char **sp; void *V;
-+gdtoa__strtopxL(s, sp, V) CONST char *s; char **sp; void *V;
- #else
--strtopxL(CONST char *s, char **sp, void *V)
-+gdtoa__strtopxL(CONST char *s, char **sp, void *V)
- #endif
- {
- #ifdef Sudden_Underflow
-@@ -70,7 +70,7 @@
- int k;
- ULong *L = (ULong*)V;
-
-- k = strtodg(s, sp, &fpi, &exp, bits);
-+ k = gdtoa__strtodg(s, sp, &fpi, &exp, bits);
- switch(k & STRTOG_Retmask) {
- case STRTOG_NoNumber:
- case STRTOG_Zero:
-diff -u gdtoa.orig/strtorQ.c gdtoa/strtorQ.c
---- gdtoa.orig/strtorQ.c 2000-11-02 04:31:40 +0000
-+++ gdtoa/strtorQ.c 2008-10-04 02:01:43 +0000
-@@ -98,9 +98,9 @@
-
- int
- #ifdef KR_headers
--strtorQ(s, sp, rounding, L) CONST char *s; char **sp; int rounding; void *L;
-+gdtoa__strtorQ(s, sp, rounding, L) CONST char *s; char **sp; int rounding; void *L;
- #else
--strtorQ(CONST char *s, char **sp, int rounding, void *L)
-+gdtoa__strtorQ(CONST char *s, char **sp, int rounding, void *L)
- #endif
- {
- static FPI fpi0 = { 113, 1-16383-113+1, 32766-16383-113+1, 1, SI };
-@@ -115,7 +115,7 @@
- fpi1.rounding = rounding;
- fpi = &fpi1;
- }
-- k = strtodg(s, sp, fpi, &exp, bits);
-+ k = gdtoa__strtodg(s, sp, fpi, &exp, bits);
- ULtoQ((ULong*)L, bits, exp, k);
- return k;
- }
-diff -u gdtoa.orig/strtord.c gdtoa/strtord.c
---- gdtoa.orig/strtord.c 2000-11-02 04:31:40 +0000
-+++ gdtoa/strtord.c 2008-10-04 02:01:43 +0000
-@@ -76,9 +76,9 @@
-
- int
- #ifdef KR_headers
--strtord(s, sp, rounding, d) CONST char *s; char **sp; int rounding; double *d;
-+gdtoa__strtord(s, sp, rounding, d) CONST char *s; char **sp; int rounding; double *d;
- #else
--strtord(CONST char *s, char **sp, int rounding, double *d)
-+gdtoa__strtord(CONST char *s, char **sp, int rounding, double *d)
- #endif
- {
- static FPI fpi0 = { 53, 1-1023-53+1, 2046-1023-53+1, 1, SI };
-@@ -93,7 +93,7 @@
- fpi1.rounding = rounding;
- fpi = &fpi1;
- }
-- k = strtodg(s, sp, fpi, &exp, bits);
-+ k = gdtoa__strtodg(s, sp, fpi, &exp, bits);
- ULtod((ULong*)d, bits, exp, k);
- return k;
- }
-diff -u gdtoa.orig/strtordd.c gdtoa/strtordd.c
---- gdtoa.orig/strtordd.c 2000-11-02 04:31:40 +0000
-+++ gdtoa/strtordd.c 2008-10-04 02:01:43 +0000
-@@ -178,9 +178,9 @@
-
- int
- #ifdef KR_headers
--strtordd(s, sp, rounding, dd) CONST char *s; char **sp; int rounding; double *dd;
-+gdtoa__strtordd(s, sp, rounding, dd) CONST char *s; char **sp; int rounding; double *dd;
- #else
--strtordd(CONST char *s, char **sp, int rounding, double *dd)
-+gdtoa__strtordd(CONST char *s, char **sp, int rounding, double *dd)
- #endif
- {
- #ifdef Sudden_Underflow
-@@ -199,7 +199,7 @@
- fpi1.rounding = rounding;
- fpi = &fpi1;
- }
-- k = strtodg(s, sp, fpi, &exp, bits);
-+ k = gdtoa__strtodg(s, sp, fpi, &exp, bits);
- ULtodd((ULong*)dd, bits, exp, k);
- return k;
- }
-diff -u gdtoa.orig/strtorf.c gdtoa/strtorf.c
---- gdtoa.orig/strtorf.c 2000-11-02 04:31:40 +0000
-+++ gdtoa/strtorf.c 2008-10-04 02:01:43 +0000
-@@ -72,9 +72,9 @@
-
- int
- #ifdef KR_headers
--strtorf(s, sp, rounding, f) CONST char *s; char **sp; int rounding; float *f;
-+gdtoa__strtorf(s, sp, rounding, f) CONST char *s; char **sp; int rounding; float *f;
- #else
--strtorf(CONST char *s, char **sp, int rounding, float *f)
-+gdtoa__strtorf(CONST char *s, char **sp, int rounding, float *f)
- #endif
- {
- static FPI fpi0 = { 24, 1-127-24+1, 254-127-24+1, 1, SI };
-@@ -89,7 +89,7 @@
- fpi1.rounding = rounding;
- fpi = &fpi1;
- }
-- k = strtodg(s, sp, fpi, &exp, bits);
-+ k = gdtoa__strtodg(s, sp, fpi, &exp, bits);
- ULtof((ULong*)f, bits, exp, k);
- return k;
- }
-diff -u gdtoa.orig/strtorx.c gdtoa/strtorx.c
---- gdtoa.orig/strtorx.c 2000-11-02 04:34:18 +0000
-+++ gdtoa/strtorx.c 2008-10-04 02:01:43 +0000
-@@ -95,9 +95,9 @@
-
- int
- #ifdef KR_headers
--strtorx(s, sp, rounding, L) CONST char *s; char **sp; int rounding; void *L;
-+gdtoa__strtorx(s, sp, rounding, L) CONST char *s; char **sp; int rounding; void *L;
- #else
--strtorx(CONST char *s, char **sp, int rounding, void *L)
-+gdtoa__strtorx(CONST char *s, char **sp, int rounding, void *L)
- #endif
- {
- static FPI fpi0 = { 64, 1-16383-64+1, 32766 - 16383 - 64 + 1, 1, SI };
-@@ -112,7 +112,7 @@
- fpi1.rounding = rounding;
- fpi = &fpi1;
- }
-- k = strtodg(s, sp, fpi, &exp, bits);
-+ k = gdtoa__strtodg(s, sp, fpi, &exp, bits);
- ULtox((UShort*)L, bits, exp, k);
- return k;
- }
-diff -u gdtoa.orig/strtorxL.c gdtoa/strtorxL.c
---- gdtoa.orig/strtorxL.c 2000-11-02 04:31:40 +0000
-+++ gdtoa/strtorxL.c 2008-10-04 02:01:43 +0000
-@@ -89,9 +89,9 @@
-
- int
- #ifdef KR_headers
--strtorxL(s, sp, rounding, L) CONST char *s; char **sp; int rounding; void *L;
-+gdtoa__strtorxL(s, sp, rounding, L) CONST char *s; char **sp; int rounding; void *L;
- #else
--strtorxL(CONST char *s, char **sp, int rounding, void *L)
-+gdtoa__strtorxL(CONST char *s, char **sp, int rounding, void *L)
- #endif
- {
- static FPI fpi0 = { 64, 1-16383-64+1, 32766 - 16383 - 64 + 1, 1, SI };
-@@ -106,7 +106,7 @@
- fpi1.rounding = rounding;
- fpi = &fpi1;
- }
-- k = strtodg(s, sp, fpi, &exp, bits);
-+ k = gdtoa__strtodg(s, sp, fpi, &exp, bits);
- ULtoxL((ULong*)L, bits, exp, k);
- return k;
- }
-Common subdirectories: gdtoa.orig/test and gdtoa/test
+--- 91,95 ----
+ if (sign)
+ i = STRTOG_Normal | STRTOG_Neg;
+! s = gdtoa__gdtoa(fpi, ex, bits, &i, mode, ndig, &decpt, &se);
+ return g__fmt(buf, s, se, decpt, sign, bufsize);
+ }
+diff -P -C 2 -r gdtoa/gdtoa.c gdtoa-new/gdtoa.c
+*** gdtoa/gdtoa.c 2011-03-04 23:26:27.000000000 -0500
+--- gdtoa-new/gdtoa.c 2011-05-27 17:09:13.941030075 -0400
+***************
+*** 110,114 ****
+
+ char *
+! gdtoa
+ #ifdef KR_headers
+ (fpi, be, bits, kindp, mode, ndigits, decpt, rve)
+--- 110,114 ----
+
+ char *
+! gdtoa__gdtoa
+ #ifdef KR_headers
+ (fpi, be, bits, kindp, mode, ndigits, decpt, rve)
+***************
+*** 165,169 ****
+ #ifndef MULTIPLE_THREADS
+ if (dtoa_result) {
+! freedtoa(dtoa_result);
+ dtoa_result = 0;
+ }
+--- 165,169 ----
+ #ifndef MULTIPLE_THREADS
+ if (dtoa_result) {
+! gdtoa__freedtoa(dtoa_result);
+ dtoa_result = 0;
+ }
+diff -P -C 2 -r gdtoa/gdtoa.h gdtoa-new/gdtoa.h
+*** gdtoa/gdtoa.h 2011-03-04 13:54:26.000000000 -0500
+--- gdtoa-new/gdtoa.h 2011-05-27 17:18:00.996031868 -0400
+***************
+*** 104,150 ****
+ #endif
+
+! extern char* dtoa ANSI((double d, int mode, int ndigits, int *decpt,
+ int *sign, char **rve));
+! extern char* gdtoa ANSI((FPI *fpi, int be, ULong *bits, int *kindp,
+ int mode, int ndigits, int *decpt, char **rve));
+! extern void freedtoa ANSI((char*));
+! extern float strtof ANSI((CONST char *, char **));
+! extern double strtod ANSI((CONST char *, char **));
+! extern int strtodg ANSI((CONST char*, char**, FPI*, Long*, ULong*));
+
+! extern char* g_ddfmt ANSI((char*, double*, int, size_t));
+! extern char* g_dfmt ANSI((char*, double*, int, size_t));
+! extern char* g_ffmt ANSI((char*, float*, int, size_t));
+! extern char* g_Qfmt ANSI((char*, void*, int, size_t));
+! extern char* g_xfmt ANSI((char*, void*, int, size_t));
+! extern char* g_xLfmt ANSI((char*, void*, int, size_t));
+
+! extern int strtoId ANSI((CONST char*, char**, double*, double*));
+! extern int strtoIdd ANSI((CONST char*, char**, double*, double*));
+! extern int strtoIf ANSI((CONST char*, char**, float*, float*));
+! extern int strtoIQ ANSI((CONST char*, char**, void*, void*));
+! extern int strtoIx ANSI((CONST char*, char**, void*, void*));
+! extern int strtoIxL ANSI((CONST char*, char**, void*, void*));
+! extern int strtord ANSI((CONST char*, char**, int, double*));
+! extern int strtordd ANSI((CONST char*, char**, int, double*));
+! extern int strtorf ANSI((CONST char*, char**, int, float*));
+! extern int strtorQ ANSI((CONST char*, char**, int, void*));
+! extern int strtorx ANSI((CONST char*, char**, int, void*));
+! extern int strtorxL ANSI((CONST char*, char**, int, void*));
+ #if 1
+! extern int strtodI ANSI((CONST char*, char**, double*));
+! extern int strtopd ANSI((CONST char*, char**, double*));
+! extern int strtopdd ANSI((CONST char*, char**, double*));
+! extern int strtopf ANSI((CONST char*, char**, float*));
+! extern int strtopQ ANSI((CONST char*, char**, void*));
+! extern int strtopx ANSI((CONST char*, char**, void*));
+! extern int strtopxL ANSI((CONST char*, char**, void*));
+ #else
+! #define strtopd(s,se,x) strtord(s,se,1,x)
+! #define strtopdd(s,se,x) strtordd(s,se,1,x)
+! #define strtopf(s,se,x) strtorf(s,se,1,x)
+! #define strtopQ(s,se,x) strtorQ(s,se,1,x)
+! #define strtopx(s,se,x) strtorx(s,se,1,x)
+! #define strtopxL(s,se,x) strtorxL(s,se,1,x)
+ #endif
+
+--- 104,150 ----
+ #endif
+
+! extern char* gdtoa__dtoa ANSI((double d, int mode, int ndigits, int *decpt,
+ int *sign, char **rve));
+! extern char* gdtoa__gdtoa ANSI((FPI *fpi, int be, ULong *bits, int *kindp,
+ int mode, int ndigits, int *decpt, char **rve));
+! extern void gdtoa__freedtoa ANSI((char*));
+! extern float gdtoa__strtof ANSI((CONST char *, char **));
+! extern double gdtoa__strtod ANSI((CONST char *, char **));
+! extern int gdtoa__strtodg ANSI((CONST char*, char**, FPI*, Long*, ULong*));
+
+! extern char* gdtoa__g_ddfmt ANSI((char*, double*, int, size_t));
+! extern char* gdtoa__g_dfmt ANSI((char*, double*, int, size_t));
+! extern char* gdtoa__g_ffmt ANSI((char*, float*, int, size_t));
+! extern char* gdtoa__g_Qfmt ANSI((char*, void*, int, size_t));
+! extern char* gdtoa__g_xfmt ANSI((char*, void*, int, size_t));
+! extern char* gdtoa__g_xLfmt ANSI((char*, void*, int, size_t));
+
+! extern int gdtoa__strtoId ANSI((CONST char*, char**, double*, double*));
+! extern int gdtoa__strtoIdd ANSI((CONST char*, char**, double*, double*));
+! extern int gdtoa__strtoIf ANSI((CONST char*, char**, float*, float*));
+! extern int gdtoa__strtoIQ ANSI((CONST char*, char**, void*, void*));
+! extern int gdtoa__strtoIx ANSI((CONST char*, char**, void*, void*));
+! extern int gdtoa__strtoIxL ANSI((CONST char*, char**, void*, void*));
+! extern int gdtoa__strtord ANSI((CONST char*, char**, int, double*));
+! extern int gdtoa__strtordd ANSI((CONST char*, char**, int, double*));
+! extern int gdtoa__strtorf ANSI((CONST char*, char**, int, float*));
+! extern int gdtoa__strtorQ ANSI((CONST char*, char**, int, void*));
+! extern int gdtoa__strtorx ANSI((CONST char*, char**, int, void*));
+! extern int gdtoa__strtorxL ANSI((CONST char*, char**, int, void*));
+ #if 1
+! extern int gdtoa__strtodI ANSI((CONST char*, char**, double*));
+! extern int gdtoa__strtopd ANSI((CONST char*, char**, double*));
+! extern int gdtoa__strtopdd ANSI((CONST char*, char**, double*));
+! extern int gdtoa__strtopf ANSI((CONST char*, char**, float*));
+! extern int gdtoa__strtopQ ANSI((CONST char*, char**, void*));
+! extern int gdtoa__strtopx ANSI((CONST char*, char**, void*));
+! extern int gdtoa__strtopxL ANSI((CONST char*, char**, void*));
+ #else
+! #define gdtoa__strtopd(s,se,x) gdtoa__strtord(s,se,1,x)
+! #define gdtoa__strtopdd(s,se,x) gdtoa__strtordd(s,se,1,x)
+! #define gdtoa__strtopf(s,se,x) gdtoa__strtorf(s,se,1,x)
+! #define gdtoa__strtopQ(s,se,x) gdtoa__strtorQ(s,se,1,x)
+! #define gdtoa__strtopx(s,se,x) gdtoa__strtorx(s,se,1,x)
+! #define gdtoa__strtopxL(s,se,x) gdtoa__strtorxL(s,se,1,x)
+ #endif
+
+diff -P -C 2 -r gdtoa/gdtoaimp.h gdtoa-new/gdtoaimp.h
+*** gdtoa/gdtoaimp.h 2011-03-21 17:02:29.000000000 -0400
+--- gdtoa-new/gdtoaimp.h 2011-05-27 17:18:00.996031868 -0400
+***************
+*** 275,279 ****
+ #endif
+
+! typedef union { double d; ULong L[2]; } U;
+
+ #ifdef IEEE_8087
+--- 275,279 ----
+ #endif
+
+! typedef union { double d; ULong L[2]; } __attribute__((__may_alias__)) U;
+
+ #ifdef IEEE_8087
+***************
+*** 504,507 ****
+--- 504,508 ----
+ #define gethex gethex_D2A
+ #define hexdig hexdig_D2A
++ #define hexdig_init hexdig_init_D2A
+ #define hexnan hexnan_D2A
+ #define hi0bits(x) hi0bits_D2A((ULong)(x))
+***************
+*** 523,526 ****
+--- 524,528 ----
+ #define strcp strcp_D2A
+ #define strtoIg strtoIg_D2A
++ #define strtod strtod_D2A
+ #define sum sum_D2A
+ #define tens tens_D2A
+***************
+*** 553,557 ****
+ extern char *g__fmt ANSI((char*, char*, char*, int, ULong, size_t));
+ extern int gethex ANSI((CONST char**, FPI*, Long*, Bigint**, int));
+! extern void hexdig_init_D2A(Void);
+ extern int hexnan ANSI((CONST char**, FPI*, ULong*));
+ extern int hi0bits_D2A ANSI((ULong));
+--- 555,559 ----
+ extern char *g__fmt ANSI((char*, char*, char*, int, ULong, size_t));
+ extern int gethex ANSI((CONST char**, FPI*, Long*, Bigint**, int));
+! extern void hexdig_init ANSI((Void));
+ extern int hexnan ANSI((CONST char**, FPI*, ULong*));
+ extern int hi0bits_D2A ANSI((ULong));
+diff -P -C 2 -r gdtoa/gethex.c gdtoa-new/gethex.c
+*** gdtoa/gethex.c 2009-03-16 00:37:50.000000000 -0400
+--- gdtoa-new/gethex.c 2011-05-27 17:09:13.941030075 -0400
+***************
+*** 68,72 ****
+
+ if (!hexdig['0'])
+! hexdig_init_D2A();
+ *bp = 0;
+ havedig = 0;
+--- 68,72 ----
+
+ if (!hexdig['0'])
+! hexdig_init();
+ *bp = 0;
+ havedig = 0;
+diff -P -C 2 -r gdtoa/g_ffmt.c gdtoa-new/g_ffmt.c
+*** gdtoa/g_ffmt.c 2008-09-09 00:44:56.000000000 -0400
+--- gdtoa-new/g_ffmt.c 2011-05-27 17:09:13.941030074 -0400
+***************
+*** 34,40 ****
+ char*
+ #ifdef KR_headers
+! g_ffmt(buf, f, ndig, bufsize) char *buf; float *f; int ndig; size_t bufsize;
+ #else
+! g_ffmt(char *buf, float *f, int ndig, size_t bufsize)
+ #endif
+ {
+--- 34,40 ----
+ char*
+ #ifdef KR_headers
+! gdtoa__g_ffmt(buf, f, ndig, bufsize) char *buf; float *f; int ndig; size_t bufsize;
+ #else
+! gdtoa__g_ffmt(char *buf, float *f, int ndig, size_t bufsize)
+ #endif
+ {
+***************
+*** 89,93 ****
+ }
+ i = STRTOG_Normal;
+! s = gdtoa(fpi, ex, bits, &i, mode, ndig, &decpt, &se);
+ return g__fmt(buf, s, se, decpt, sign, bufsize);
+ }
+--- 89,93 ----
+ }
+ i = STRTOG_Normal;
+! s = gdtoa__gdtoa(fpi, ex, bits, &i, mode, ndig, &decpt, &se);
+ return g__fmt(buf, s, se, decpt, sign, bufsize);
+ }
+diff -P -C 2 -r gdtoa/g__fmt.c gdtoa-new/g__fmt.c
+*** gdtoa/g__fmt.c 2009-02-21 11:53:53.000000000 -0500
+--- gdtoa-new/g__fmt.c 2011-05-27 17:09:13.940030010 -0400
+***************
+*** 143,147 ****
+ }
+ ret:
+! freedtoa(s0);
+ return b;
+ }
+--- 143,147 ----
+ }
+ ret:
+! gdtoa__freedtoa(s0);
+ return b;
+ }
+diff -P -C 2 -r gdtoa/g_Qfmt.c gdtoa-new/g_Qfmt.c
+*** gdtoa/g_Qfmt.c 2008-09-09 00:44:56.000000000 -0400
+--- gdtoa-new/g_Qfmt.c 2011-05-27 17:09:13.940030010 -0400
+***************
+*** 52,58 ****
+ char*
+ #ifdef KR_headers
+! g_Qfmt(buf, V, ndig, bufsize) char *buf; char *V; int ndig; size_t bufsize;
+ #else
+! g_Qfmt(char *buf, void *V, int ndig, size_t bufsize)
+ #endif
+ {
+--- 52,58 ----
+ char*
+ #ifdef KR_headers
+! gdtoa__g_Qfmt(buf, V, ndig, bufsize) char *buf; char *V; int ndig; size_t bufsize;
+ #else
+! gdtoa__g_Qfmt(char *buf, void *V, int ndig, size_t bufsize)
+ #endif
+ {
+***************
+*** 115,119 ****
+ mode = 0;
+ }
+! s = gdtoa(fpi, ex, bits, &i, mode, ndig, &decpt, &se);
+ return g__fmt(buf, s, se, decpt, sign, bufsize);
+ }
+--- 115,119 ----
+ mode = 0;
+ }
+! s = gdtoa__gdtoa(fpi, ex, bits, &i, mode, ndig, &decpt, &se);
+ return g__fmt(buf, s, se, decpt, sign, bufsize);
+ }
+diff -P -C 2 -r gdtoa/g_xfmt.c gdtoa-new/g_xfmt.c
+*** gdtoa/g_xfmt.c 2008-09-09 00:44:56.000000000 -0400
+--- gdtoa-new/g_xfmt.c 2011-05-27 17:09:13.941030075 -0400
+***************
+*** 54,60 ****
+ char*
+ #ifdef KR_headers
+! g_xfmt(buf, V, ndig, bufsize) char *buf; char *V; int ndig; size_t bufsize;
+ #else
+! g_xfmt(char *buf, void *V, int ndig, size_t bufsize)
+ #endif
+ {
+--- 54,60 ----
+ char*
+ #ifdef KR_headers
+! gdtoa__g_xfmt(buf, V, ndig, bufsize) char *buf; char *V; int ndig; size_t bufsize;
+ #else
+! gdtoa__g_xfmt(char *buf, void *V, int ndig, size_t bufsize)
+ #endif
+ {
+***************
+*** 115,119 ****
+ mode = 0;
+ }
+! s = gdtoa(fpi, ex, bits, &i, mode, ndig, &decpt, &se);
+ return g__fmt(buf, s, se, decpt, sign, bufsize);
+ }
+--- 115,119 ----
+ mode = 0;
+ }
+! s = gdtoa__gdtoa(fpi, ex, bits, &i, mode, ndig, &decpt, &se);
+ return g__fmt(buf, s, se, decpt, sign, bufsize);
+ }
+diff -P -C 2 -r gdtoa/g_xLfmt.c gdtoa-new/g_xLfmt.c
+*** gdtoa/g_xLfmt.c 2008-09-09 00:44:56.000000000 -0400
+--- gdtoa-new/g_xLfmt.c 2011-05-27 17:09:13.941030074 -0400
+***************
+*** 50,56 ****
+ char*
+ #ifdef KR_headers
+! g_xLfmt(buf, V, ndig, bufsize) char *buf; char *V; int ndig; size_t bufsize;
+ #else
+! g_xLfmt(char *buf, void *V, int ndig, size_t bufsize)
+ #endif
+ {
+--- 50,56 ----
+ char*
+ #ifdef KR_headers
+! gdtoa__g_xLfmt(buf, V, ndig, bufsize) char *buf; char *V; int ndig; size_t bufsize;
+ #else
+! gdtoa__g_xLfmt(char *buf, void *V, int ndig, size_t bufsize)
+ #endif
+ {
+***************
+*** 109,113 ****
+ mode = 0;
+ }
+! s = gdtoa(fpi, ex, bits, &i, mode, ndig, &decpt, &se);
+ return g__fmt(buf, s, se, decpt, sign, bufsize);
+ }
+--- 109,113 ----
+ mode = 0;
+ }
+! s = gdtoa__gdtoa(fpi, ex, bits, &i, mode, ndig, &decpt, &se);
+ return g__fmt(buf, s, se, decpt, sign, bufsize);
+ }
+diff -P -C 2 -r gdtoa/hd_init.c gdtoa-new/hd_init.c
+*** gdtoa/hd_init.c 2004-04-11 23:39:50.000000000 -0400
+--- gdtoa-new/hd_init.c 2011-05-27 17:09:13.941030075 -0400
+***************
+*** 47,51 ****
+
+ void
+! hexdig_init_D2A(Void)
+ {
+ #define USC (unsigned char *)
+--- 47,51 ----
+
+ void
+! hexdig_init(Void)
+ {
+ #define USC (unsigned char *)
+diff -P -C 2 -r gdtoa/hexnan.c gdtoa-new/hexnan.c
+*** gdtoa/hexnan.c 2009-03-16 00:39:17.000000000 -0400
+--- gdtoa-new/hexnan.c 2011-05-27 17:09:13.942030138 -0400
+***************
+*** 63,67 ****
+
+ if (!hexdig['0'])
+! hexdig_init_D2A();
+ nbits = fpi->nbits;
+ x = x0 + (nbits >> kshift);
+--- 63,67 ----
+
+ if (!hexdig['0'])
+! hexdig_init();
+ nbits = fpi->nbits;
+ x = x0 + (nbits >> kshift);
+diff -P -C 2 -r gdtoa/strtod.c gdtoa-new/strtod.c
+*** gdtoa/strtod.c 2011-03-04 13:15:00.000000000 -0500
+--- gdtoa-new/strtod.c 2011-05-27 17:09:13.944030259 -0400
+***************
+*** 81,85 ****
+
+ double
+! strtod
+ #ifdef KR_headers
+ (s00, se) CONST char *s00; char **se;
+--- 81,85 ----
+
+ double
+! gdtoa__strtod
+ #ifdef KR_headers
+ (s00, se) CONST char *s00; char **se;
+diff -P -C 2 -r gdtoa/strtodg.c gdtoa-new/strtodg.c
+*** gdtoa/strtodg.c 2009-04-11 23:11:05.000000000 -0400
+--- gdtoa-new/strtodg.c 2011-05-27 17:09:13.944030259 -0400
+***************
+*** 314,318 ****
+
+ int
+! strtodg
+ #ifdef KR_headers
+ (s00, se, fpi, exp, bits)
+--- 314,318 ----
+
+ int
+! gdtoa__strtodg
+ #ifdef KR_headers
+ (s00, se, fpi, exp, bits)
+diff -P -C 2 -r gdtoa/strtodI.c gdtoa-new/strtodI.c
+*** gdtoa/strtodI.c 2009-10-21 19:49:32.000000000 -0400
+--- gdtoa-new/strtodI.c 2011-05-27 17:09:13.944030259 -0400
+***************
+*** 51,57 ****
+ int
+ #ifdef KR_headers
+! strtodI(s, sp, dd) CONST char *s; char **sp; double *dd;
+ #else
+! strtodI(CONST char *s, char **sp, double *dd)
+ #endif
+ {
+--- 51,57 ----
+ int
+ #ifdef KR_headers
+! gdtoa__strtodI(s, sp, dd) CONST char *s; char **sp; double *dd;
+ #else
+! gdtoa__strtodI(CONST char *s, char **sp, double *dd)
+ #endif
+ {
+***************
+*** 62,66 ****
+ U *u;
+
+! k = strtodg(s, sp, &fpi, &exp, bits);
+ u = (U*)dd;
+ sign = k & STRTOG_Neg ? 0x80000000L : 0;
+--- 62,66 ----
+ U *u;
+
+! k = gdtoa__strtodg(s, sp, &fpi, &exp, bits);
+ u = (U*)dd;
+ sign = k & STRTOG_Neg ? 0x80000000L : 0;
+diff -P -C 2 -r gdtoa/strtof.c gdtoa-new/strtof.c
+*** gdtoa/strtof.c 2009-03-16 00:57:44.000000000 -0400
+--- gdtoa-new/strtof.c 2011-05-27 17:09:13.944030259 -0400
+***************
+*** 32,40 ****
+ #include "gdtoaimp.h"
+
+! float
+ #ifdef KR_headers
+! strtof(s, sp) CONST char *s; char **sp;
+ #else
+! strtof(CONST char *s, char **sp)
+ #endif
+ {
+--- 32,40 ----
+ #include "gdtoaimp.h"
+
+! float gdtoa__strtof
+ #ifdef KR_headers
+! (s, sp) CONST char *s; char **sp;
+ #else
+! (CONST char *s, char **sp)
+ #endif
+ {
+***************
+*** 50,54 ****
+ #endif
+
+! k = strtodg(s, sp, fpi, &exp, bits);
+ switch(k & STRTOG_Retmask) {
+ case STRTOG_NoNumber:
+--- 50,54 ----
+ #endif
+
+! k = gdtoa__strtodg(s, sp, fpi, &exp, bits);
+ switch(k & STRTOG_Retmask) {
+ case STRTOG_NoNumber:
+diff -P -C 2 -r gdtoa/strtoId.c gdtoa-new/strtoId.c
+*** gdtoa/strtoId.c 2004-04-11 23:39:50.000000000 -0400
+--- gdtoa-new/strtoId.c 2011-05-27 17:09:13.943030200 -0400
+***************
+*** 34,40 ****
+ int
+ #ifdef KR_headers
+! strtoId(s, sp, f0, f1) CONST char *s; char **sp; double *f0, *f1;
+ #else
+! strtoId(CONST char *s, char **sp, double *f0, double *f1)
+ #endif
+ {
+--- 34,40 ----
+ int
+ #ifdef KR_headers
+! gdtoa__strtoId(s, sp, f0, f1) CONST char *s; char **sp; double *f0, *f1;
+ #else
+! gdtoa__strtoId(CONST char *s, char **sp, double *f0, double *f1)
+ #endif
+ {
+diff -P -C 2 -r gdtoa/strtoIdd.c gdtoa-new/strtoIdd.c
+*** gdtoa/strtoIdd.c 2004-04-11 23:39:50.000000000 -0400
+--- gdtoa-new/strtoIdd.c 2011-05-27 17:09:13.943030200 -0400
+***************
+*** 34,40 ****
+ int
+ #ifdef KR_headers
+! strtoIdd(s, sp, f0, f1) CONST char *s; char **sp; double *f0, *f1;
+ #else
+! strtoIdd(CONST char *s, char **sp, double *f0, double *f1)
+ #endif
+ {
+--- 34,40 ----
+ int
+ #ifdef KR_headers
+! gdtoa__strtoIdd(s, sp, f0, f1) CONST char *s; char **sp; double *f0, *f1;
+ #else
+! gdtoa__strtoIdd(CONST char *s, char **sp, double *f0, double *f1)
+ #endif
+ {
+diff -P -C 2 -r gdtoa/strtoIf.c gdtoa-new/strtoIf.c
+*** gdtoa/strtoIf.c 2004-04-11 23:39:50.000000000 -0400
+--- gdtoa-new/strtoIf.c 2011-05-27 17:09:13.943030200 -0400
+***************
+*** 34,40 ****
+ int
+ #ifdef KR_headers
+! strtoIf(s, sp, f0, f1) CONST char *s; char **sp; float *f0, *f1;
+ #else
+! strtoIf(CONST char *s, char **sp, float *f0, float *f1)
+ #endif
+ {
+--- 34,40 ----
+ int
+ #ifdef KR_headers
+! gdtoa__strtoIf(s, sp, f0, f1) CONST char *s; char **sp; float *f0, *f1;
+ #else
+! gdtoa__strtoIf(CONST char *s, char **sp, float *f0, float *f1)
+ #endif
+ {
+diff -P -C 2 -r gdtoa/strtoIg.c gdtoa-new/strtoIg.c
+*** gdtoa/strtoIg.c 2009-03-16 00:55:05.000000000 -0400
+--- gdtoa-new/strtoIg.c 2011-05-27 17:09:13.943030200 -0400
+***************
+*** 45,49 ****
+
+ b = *B;
+! rv = strtodg(s00, se, fpi, exp, b->x);
+ if (!(rv & STRTOG_Inexact)) {
+ B[1] = 0;
+--- 45,49 ----
+
+ b = *B;
+! rv = gdtoa__strtodg(s00, se, fpi, exp, b->x);
+ if (!(rv & STRTOG_Inexact)) {
+ B[1] = 0;
+diff -P -C 2 -r gdtoa/strtoIQ.c gdtoa-new/strtoIQ.c
+*** gdtoa/strtoIQ.c 2004-04-11 23:39:50.000000000 -0400
+--- gdtoa-new/strtoIQ.c 2011-05-27 17:09:13.943030200 -0400
+***************
+*** 34,40 ****
+ int
+ #ifdef KR_headers
+! strtoIQ(s, sp, a, b) CONST char *s; char **sp; void *a; void *b;
+ #else
+! strtoIQ(CONST char *s, char **sp, void *a, void *b)
+ #endif
+ {
+--- 34,40 ----
+ int
+ #ifdef KR_headers
+! gdtoa__strtoIQ(s, sp, a, b) CONST char *s; char **sp; void *a; void *b;
+ #else
+! gdtoa__strtoIQ(CONST char *s, char **sp, void *a, void *b)
+ #endif
+ {
+diff -P -C 2 -r gdtoa/strtoIx.c gdtoa-new/strtoIx.c
+*** gdtoa/strtoIx.c 2004-04-11 23:39:50.000000000 -0400
+--- gdtoa-new/strtoIx.c 2011-05-27 17:09:13.943030200 -0400
+***************
+*** 34,40 ****
+ int
+ #ifdef KR_headers
+! strtoIx(s, sp, a, b) CONST char *s; char **sp; void *a; void *b;
+ #else
+! strtoIx(CONST char *s, char **sp, void *a, void *b)
+ #endif
+ {
+--- 34,40 ----
+ int
+ #ifdef KR_headers
+! gdtoa__strtoIx(s, sp, a, b) CONST char *s; char **sp; void *a; void *b;
+ #else
+! gdtoa__strtoIx(CONST char *s, char **sp, void *a, void *b)
+ #endif
+ {
+diff -P -C 2 -r gdtoa/strtoIxL.c gdtoa-new/strtoIxL.c
+*** gdtoa/strtoIxL.c 2004-04-11 23:39:50.000000000 -0400
+--- gdtoa-new/strtoIxL.c 2011-05-27 17:09:13.943030200 -0400
+***************
+*** 34,40 ****
+ int
+ #ifdef KR_headers
+! strtoIxL(s, sp, a, b) CONST char *s; char **sp; void *a; void *b;
+ #else
+! strtoIxL(CONST char *s, char **sp, void *a, void *b)
+ #endif
+ {
+--- 34,40 ----
+ int
+ #ifdef KR_headers
+! gdtoa__strtoIxL(s, sp, a, b) CONST char *s; char **sp; void *a; void *b;
+ #else
+! gdtoa__strtoIxL(CONST char *s, char **sp, void *a, void *b)
+ #endif
+ {
+diff -P -C 2 -r gdtoa/strtopd.c gdtoa-new/strtopd.c
+*** gdtoa/strtopd.c 2008-09-09 00:44:56.000000000 -0400
+--- gdtoa-new/strtopd.c 2011-05-27 17:09:13.945030317 -0400
+***************
+*** 34,40 ****
+ int
+ #ifdef KR_headers
+! strtopd(s, sp, d) char *s; char **sp; double *d;
+ #else
+! strtopd(CONST char *s, char **sp, double *d)
+ #endif
+ {
+--- 34,40 ----
+ int
+ #ifdef KR_headers
+! gdtoa__strtopd(s, sp, d) char *s; char **sp; double *d;
+ #else
+! gdtoa__strtopd(CONST char *s, char **sp, double *d)
+ #endif
+ {
+***************
+*** 49,53 ****
+ #endif
+
+! k = strtodg(s, sp, fpi, &exp, bits);
+ ULtod((ULong*)d, bits, exp, k);
+ return k;
+--- 49,53 ----
+ #endif
+
+! k = gdtoa__strtodg(s, sp, fpi, &exp, bits);
+ ULtod((ULong*)d, bits, exp, k);
+ return k;
+diff -P -C 2 -r gdtoa/strtopdd.c gdtoa-new/strtopdd.c
+*** gdtoa/strtopdd.c 2009-03-16 01:32:44.000000000 -0400
+--- gdtoa-new/strtopdd.c 2011-05-27 17:09:13.945030317 -0400
+***************
+*** 34,40 ****
+ int
+ #ifdef KR_headers
+! strtopdd(s, sp, dd) CONST char *s; char **sp; double *dd;
+ #else
+! strtopdd(CONST char *s, char **sp, double *dd)
+ #endif
+ {
+--- 34,40 ----
+ int
+ #ifdef KR_headers
+! gdtoa__strtopdd(s, sp, dd) CONST char *s; char **sp; double *dd;
+ #else
+! gdtoa__strtopdd(CONST char *s, char **sp, double *dd)
+ #endif
+ {
+***************
+*** 58,62 ****
+ #endif
+
+! rv = strtodg(s, sp, fpi, &exp, bits);
+ u = (U*)dd;
+ switch(rv & STRTOG_Retmask) {
+--- 58,62 ----
+ #endif
+
+! rv = gdtoa__strtodg(s, sp, fpi, &exp, bits);
+ u = (U*)dd;
+ switch(rv & STRTOG_Retmask) {
+diff -P -C 2 -r gdtoa/strtopf.c gdtoa-new/strtopf.c
+*** gdtoa/strtopf.c 2009-03-16 01:30:33.000000000 -0400
+--- gdtoa-new/strtopf.c 2011-05-27 17:09:13.945030317 -0400
+***************
+*** 34,40 ****
+ int
+ #ifdef KR_headers
+! strtopf(s, sp, f) CONST char *s; char **sp; float *f;
+ #else
+! strtopf(CONST char *s, char **sp, float *f)
+ #endif
+ {
+--- 34,40 ----
+ int
+ #ifdef KR_headers
+! gdtoa__strtopf(s, sp, f) CONST char *s; char **sp; float *f;
+ #else
+! gdtoa__strtopf(CONST char *s, char **sp, float *f)
+ #endif
+ {
+***************
+*** 49,53 ****
+ #endif
+
+! k = strtodg(s, sp, fpi, &exp, bits);
+ L = (ULong*)f;
+ switch(k & STRTOG_Retmask) {
+--- 49,53 ----
+ #endif
+
+! k = gdtoa__strtodg(s, sp, fpi, &exp, bits);
+ L = (ULong*)f;
+ switch(k & STRTOG_Retmask) {
+diff -P -C 2 -r gdtoa/strtopQ.c gdtoa-new/strtopQ.c
+*** gdtoa/strtopQ.c 2008-09-09 00:44:56.000000000 -0400
+--- gdtoa-new/strtopQ.c 2011-05-27 17:09:13.945030317 -0400
+***************
+*** 52,58 ****
+ int
+ #ifdef KR_headers
+! strtopQ(s, sp, V) CONST char *s; char **sp; void *V;
+ #else
+! strtopQ(CONST char *s, char **sp, void *V)
+ #endif
+ {
+--- 52,58 ----
+ int
+ #ifdef KR_headers
+! gdtoa__strtopQ(s, sp, V) CONST char *s; char **sp; void *V;
+ #else
+! gdtoa__strtopQ(CONST char *s, char **sp, void *V)
+ #endif
+ {
+***************
+*** 68,72 ****
+ #endif
+
+! k = strtodg(s, sp, fpi, &exp, bits);
+ switch(k & STRTOG_Retmask) {
+ case STRTOG_NoNumber:
+--- 68,72 ----
+ #endif
+
+! k = gdtoa__strtodg(s, sp, fpi, &exp, bits);
+ switch(k & STRTOG_Retmask) {
+ case STRTOG_NoNumber:
+diff -P -C 2 -r gdtoa/strtopx.c gdtoa-new/strtopx.c
+*** gdtoa/strtopx.c 2009-04-20 01:38:02.000000000 -0400
+--- gdtoa-new/strtopx.c 2011-05-27 17:09:13.945030317 -0400
+***************
+*** 54,60 ****
+ int
+ #ifdef KR_headers
+! strtopx(s, sp, V) CONST char *s; char **sp; void *V;
+ #else
+! strtopx(CONST char *s, char **sp, void *V)
+ #endif
+ {
+--- 54,60 ----
+ int
+ #ifdef KR_headers
+! gdtoa__strtopx(s, sp, V) CONST char *s; char **sp; void *V;
+ #else
+! gdtoa__strtopx(CONST char *s, char **sp, void *V)
+ #endif
+ {
+***************
+*** 70,74 ****
+ #endif
+
+! k = strtodg(s, sp, fpi, &exp, bits);
+ switch(k & STRTOG_Retmask) {
+ case STRTOG_NoNumber:
+--- 70,74 ----
+ #endif
+
+! k = gdtoa__strtodg(s, sp, fpi, &exp, bits);
+ switch(k & STRTOG_Retmask) {
+ case STRTOG_NoNumber:
+diff -P -C 2 -r gdtoa/strtopxL.c gdtoa-new/strtopxL.c
+*** gdtoa/strtopxL.c 2009-04-20 01:38:02.000000000 -0400
+--- gdtoa-new/strtopxL.c 2011-05-27 17:09:13.945030317 -0400
+***************
+*** 50,56 ****
+ int
+ #ifdef KR_headers
+! strtopxL(s, sp, V) CONST char *s; char **sp; void *V;
+ #else
+! strtopxL(CONST char *s, char **sp, void *V)
+ #endif
+ {
+--- 50,56 ----
+ int
+ #ifdef KR_headers
+! gdtoa__strtopxL(s, sp, V) CONST char *s; char **sp; void *V;
+ #else
+! gdtoa__strtopxL(CONST char *s, char **sp, void *V)
+ #endif
+ {
+***************
+*** 66,70 ****
+ #endif
+
+! k = strtodg(s, sp, fpi, &exp, bits);
+ switch(k & STRTOG_Retmask) {
+ case STRTOG_NoNumber:
+--- 66,70 ----
+ #endif
+
+! k = gdtoa__strtodg(s, sp, fpi, &exp, bits);
+ switch(k & STRTOG_Retmask) {
+ case STRTOG_NoNumber:
+diff -P -C 2 -r gdtoa/strtord.c gdtoa-new/strtord.c
+*** gdtoa/strtord.c 2005-01-12 01:47:38.000000000 -0500
+--- gdtoa-new/strtord.c 2011-05-27 17:09:13.946030372 -0400
+***************
+*** 71,77 ****
+ int
+ #ifdef KR_headers
+! strtord(s, sp, rounding, d) CONST char *s; char **sp; int rounding; double *d;
+ #else
+! strtord(CONST char *s, char **sp, int rounding, double *d)
+ #endif
+ {
+--- 71,77 ----
+ int
+ #ifdef KR_headers
+! gdtoa__strtord(s, sp, rounding, d) CONST char *s; char **sp; int rounding; double *d;
+ #else
+! gdtoa__strtord(CONST char *s, char **sp, int rounding, double *d)
+ #endif
+ {
+***************
+*** 88,92 ****
+ fpi = &fpi1;
+ }
+! k = strtodg(s, sp, fpi, &exp, bits);
+ ULtod((ULong*)d, bits, exp, k);
+ return k;
+--- 88,92 ----
+ fpi = &fpi1;
+ }
+! k = gdtoa__strtodg(s, sp, fpi, &exp, bits);
+ ULtod((ULong*)d, bits, exp, k);
+ return k;
+diff -P -C 2 -r gdtoa/strtordd.c gdtoa-new/strtordd.c
+*** gdtoa/strtordd.c 2009-03-16 01:27:35.000000000 -0400
+--- gdtoa-new/strtordd.c 2011-05-27 17:09:13.946030372 -0400
+***************
+*** 173,179 ****
+ int
+ #ifdef KR_headers
+! strtordd(s, sp, rounding, dd) CONST char *s; char **sp; int rounding; double *dd;
+ #else
+! strtordd(CONST char *s, char **sp, int rounding, double *dd)
+ #endif
+ {
+--- 173,179 ----
+ int
+ #ifdef KR_headers
+! gdtoa__strtordd(s, sp, rounding, dd) CONST char *s; char **sp; int rounding; double *dd;
+ #else
+! gdtoa__strtordd(CONST char *s, char **sp, int rounding, double *dd)
+ #endif
+ {
+***************
+*** 194,198 ****
+ fpi = &fpi1;
+ }
+! k = strtodg(s, sp, fpi, &exp, bits);
+ ULtodd((ULong*)dd, bits, exp, k);
+ return k;
+--- 194,198 ----
+ fpi = &fpi1;
+ }
+! k = gdtoa__strtodg(s, sp, fpi, &exp, bits);
+ ULtodd((ULong*)dd, bits, exp, k);
+ return k;
+diff -P -C 2 -r gdtoa/strtorf.c gdtoa-new/strtorf.c
+*** gdtoa/strtorf.c 2009-03-16 01:29:14.000000000 -0400
+--- gdtoa-new/strtorf.c 2011-05-27 17:09:13.946030372 -0400
+***************
+*** 67,73 ****
+ int
+ #ifdef KR_headers
+! strtorf(s, sp, rounding, f) CONST char *s; char **sp; int rounding; float *f;
+ #else
+! strtorf(CONST char *s, char **sp, int rounding, float *f)
+ #endif
+ {
+--- 67,73 ----
+ int
+ #ifdef KR_headers
+! gdtoa__strtorf(s, sp, rounding, f) CONST char *s; char **sp; int rounding; float *f;
+ #else
+! gdtoa__strtorf(CONST char *s, char **sp, int rounding, float *f)
+ #endif
+ {
+***************
+*** 84,88 ****
+ fpi = &fpi1;
+ }
+! k = strtodg(s, sp, fpi, &exp, bits);
+ ULtof((ULong*)f, bits, exp, k);
+ return k;
+--- 84,88 ----
+ fpi = &fpi1;
+ }
+! k = gdtoa__strtodg(s, sp, fpi, &exp, bits);
+ ULtof((ULong*)f, bits, exp, k);
+ return k;
+diff -P -C 2 -r gdtoa/strtorQ.c gdtoa-new/strtorQ.c
+*** gdtoa/strtorQ.c 2005-01-12 01:47:38.000000000 -0500
+--- gdtoa-new/strtorQ.c 2011-05-27 17:09:13.945030317 -0400
+***************
+*** 95,101 ****
+ int
+ #ifdef KR_headers
+! strtorQ(s, sp, rounding, L) CONST char *s; char **sp; int rounding; void *L;
+ #else
+! strtorQ(CONST char *s, char **sp, int rounding, void *L)
+ #endif
+ {
+--- 95,101 ----
+ int
+ #ifdef KR_headers
+! gdtoa__strtorQ(s, sp, rounding, L) CONST char *s; char **sp; int rounding; void *L;
+ #else
+! gdtoa__strtorQ(CONST char *s, char **sp, int rounding, void *L)
+ #endif
+ {
+***************
+*** 112,116 ****
+ fpi = &fpi1;
+ }
+! k = strtodg(s, sp, fpi, &exp, bits);
+ ULtoQ((ULong*)L, bits, exp, k);
+ return k;
+--- 112,116 ----
+ fpi = &fpi1;
+ }
+! k = gdtoa__strtodg(s, sp, fpi, &exp, bits);
+ ULtoQ((ULong*)L, bits, exp, k);
+ return k;
+diff -P -C 2 -r gdtoa/strtorx.c gdtoa-new/strtorx.c
+*** gdtoa/strtorx.c 2009-04-20 01:38:02.000000000 -0400
+--- gdtoa-new/strtorx.c 2011-05-27 17:09:13.946030372 -0400
+***************
+*** 98,104 ****
+ int
+ #ifdef KR_headers
+! strtorx(s, sp, rounding, L) CONST char *s; char **sp; int rounding; void *L;
+ #else
+! strtorx(CONST char *s, char **sp, int rounding, void *L)
+ #endif
+ {
+--- 98,104 ----
+ int
+ #ifdef KR_headers
+! gdtoa__strtorx(s, sp, rounding, L) CONST char *s; char **sp; int rounding; void *L;
+ #else
+! gdtoa__strtorx(CONST char *s, char **sp, int rounding, void *L)
+ #endif
+ {
+***************
+*** 115,119 ****
+ fpi = &fpi1;
+ }
+! k = strtodg(s, sp, fpi, &exp, bits);
+ ULtox((UShort*)L, bits, exp, k);
+ return k;
+--- 115,119 ----
+ fpi = &fpi1;
+ }
+! k = gdtoa__strtodg(s, sp, fpi, &exp, bits);
+ ULtox((UShort*)L, bits, exp, k);
+ return k;
+diff -P -C 2 -r gdtoa/strtorxL.c gdtoa-new/strtorxL.c
+*** gdtoa/strtorxL.c 2009-04-20 01:38:02.000000000 -0400
+--- gdtoa-new/strtorxL.c 2011-05-27 17:09:13.946030372 -0400
+***************
+*** 86,92 ****
+ int
+ #ifdef KR_headers
+! strtorxL(s, sp, rounding, L) CONST char *s; char **sp; int rounding; void *L;
+ #else
+! strtorxL(CONST char *s, char **sp, int rounding, void *L)
+ #endif
+ {
+--- 86,92 ----
+ int
+ #ifdef KR_headers
+! gdtoa__strtorxL(s, sp, rounding, L) CONST char *s; char **sp; int rounding; void *L;
+ #else
+! gdtoa__strtorxL(CONST char *s, char **sp, int rounding, void *L)
+ #endif
+ {
+***************
+*** 103,107 ****
+ fpi = &fpi1;
+ }
+! k = strtodg(s, sp, fpi, &exp, bits);
+ ULtoxL((ULong*)L, bits, exp, k);
+ return k;
+--- 103,107 ----
+ fpi = &fpi1;
+ }
+! k = gdtoa__strtodg(s, sp, fpi, &exp, bits);
+ ULtoxL((ULong*)L, bits, exp, k);
+ return k;
Modified: mlton/trunk/runtime/gdtoa-patch.internal
===================================================================
--- mlton/trunk/runtime/gdtoa-patch.internal 2011-06-04 1
More information about the MLton-commit
mailing list