gdtoa-smisc.c.patch   [plain text]


--- gdtoa-smisc.c.orig	2005-01-20 20:12:36.000000000 -0800
+++ gdtoa-smisc.c	2005-03-24 17:33:43.000000000 -0800
@@ -34,9 +34,9 @@
  Bigint *
 s2b
 #ifdef KR_headers
-	(s, nd0, nd, y9) CONST char *s; int nd0, nd; ULong y9;
+	(s, nd0, nd, y9, decpt) CONST char *s; int nd0, nd; ULong y9; int decpt;
 #else
-	(CONST char *s, int nd0, int nd, ULong y9)
+	(CONST char *s, int nd0, int nd, ULong y9, int decpt)
 #endif
 {
 	Bigint *b;
@@ -60,10 +60,10 @@
 		s += 9;
 		do b = multadd(b, 10, *s++ - '0');
 			while(++i < nd0);
-		s++;
+		s += decpt;
 		}
 	else
-		s += 10;
+		s += 9 + decpt;
 	for(; i < nd; i++)
 		b = multadd(b, 10, *s++ - '0');
 	return b;