summaryrefslogtreecommitdiffstats
path: root/contrib/gdtoa
diff options
context:
space:
mode:
authordas <das@FreeBSD.org>2003-03-25 17:55:07 +0000
committerdas <das@FreeBSD.org>2003-03-25 17:55:07 +0000
commit3ea4e0447cbbdb952ac6044969bc0ce92bd278f6 (patch)
treeba13a62fd9cc6ea3e0af750ff6704c0207832885 /contrib/gdtoa
parentbd86f7b4fe154b51d33e16871985c6fafccaf54b (diff)
parentac4cce98d01fbe19f88ac1e217e7895ec38fdbac (diff)
downloadFreeBSD-src-3ea4e0447cbbdb952ac6044969bc0ce92bd278f6.zip
FreeBSD-src-3ea4e0447cbbdb952ac6044969bc0ce92bd278f6.tar.gz
This commit was generated by cvs2svn to compensate for changes in r112620,
which included commits to RCS files with non-trunk default branches.
Diffstat (limited to 'contrib/gdtoa')
-rw-r--r--contrib/gdtoa/README5
-rw-r--r--contrib/gdtoa/g__fmt.c6
-rw-r--r--contrib/gdtoa/gethex.c21
-rw-r--r--contrib/gdtoa/strtod.c8
-rw-r--r--contrib/gdtoa/strtodg.c6
-rw-r--r--contrib/gdtoa/xsum0.out10
6 files changed, 23 insertions, 33 deletions
diff --git a/contrib/gdtoa/README b/contrib/gdtoa/README
index d1dcb26..6bece75 100644
--- a/contrib/gdtoa/README
+++ b/contrib/gdtoa/README
@@ -320,7 +320,4 @@ it is '.'.
Please send comments to
David M. Gay
- Bell Labs, Room 2C-463
- 600 Mountain Avenue
- Murray Hill, NJ 07974-0636, U.S.A.
- dmg@research.bell-labs.com
+ dmg@acm.org
diff --git a/contrib/gdtoa/g__fmt.c b/contrib/gdtoa/g__fmt.c
index 5edc492..6274681 100644
--- a/contrib/gdtoa/g__fmt.c
+++ b/contrib/gdtoa/g__fmt.c
@@ -28,11 +28,7 @@ THIS SOFTWARE.
/* Please send bug reports to
David M. Gay
- Bell Laboratories, Room 2C-463
- 600 Mountain Avenue
- Murray Hill, NJ 07974-0636
- U.S.A.
- dmg@bell-labs.com
+ dmg@acm.org
*/
#include "gdtoaimp.h"
diff --git a/contrib/gdtoa/gethex.c b/contrib/gdtoa/gethex.c
index 333f075..0f9ae33 100644
--- a/contrib/gdtoa/gethex.c
+++ b/contrib/gdtoa/gethex.c
@@ -28,15 +28,15 @@ THIS SOFTWARE.
/* Please send bug reports to
David M. Gay
- Bell Laboratories, Room 2C-463
- 600 Mountain Avenue
- Murray Hill, NJ 07974-0636
- U.S.A.
- dmg@bell-labs.com
+ dmg@acm.org
*/
#include "gdtoaimp.h"
+#ifdef USE_LOCALE
+#include "locale.h"
+#endif
+
int
#ifdef KR_headers
gethex(sp, fpi, exp, bp, sign)
@@ -50,6 +50,11 @@ gethex( CONST char **sp, FPI *fpi, Long *exp, Bigint **bp, int sign)
int esign, havedig, irv, k, n, nbits, up;
ULong L, lostbits, *x;
Long e, e1;
+#ifdef USE_LOCALE
+ char decimalpoint = *localeconv()->decimal_point;
+#else
+#define decimalpoint '.'
+#endif
if (!hexdig['0'])
hexdig_init_D2A();
@@ -61,7 +66,7 @@ gethex( CONST char **sp, FPI *fpi, Long *exp, Bigint **bp, int sign)
s = s0;
decpt = 0;
if (!hexdig[*s]) {
- if (*s == '.') {
+ if (*s == decimalpoint) {
decpt = ++s;
if (!hexdig[*s])
goto ret0;
@@ -80,7 +85,7 @@ gethex( CONST char **sp, FPI *fpi, Long *exp, Bigint **bp, int sign)
}
while(hexdig[*s])
s++;
- if (*s == '.' && !decpt) {
+ if (*s == decimalpoint && !decpt) {
decpt = ++s;
while(hexdig[*s])
s++;
@@ -120,7 +125,7 @@ gethex( CONST char **sp, FPI *fpi, Long *exp, Bigint **bp, int sign)
n = 0;
L = 0;
while(s1 > s0) {
- if (*--s1 == '.')
+ if (*--s1 == decimalpoint)
continue;
if (n == 32) {
*x++ = L;
diff --git a/contrib/gdtoa/strtod.c b/contrib/gdtoa/strtod.c
index 0a559d5..f1a0c04 100644
--- a/contrib/gdtoa/strtod.c
+++ b/contrib/gdtoa/strtod.c
@@ -28,11 +28,7 @@ THIS SOFTWARE.
/* Please send bug reports to
David M. Gay
- Bell Laboratories, Room 2C-463
- 600 Mountain Avenue
- Murray Hill, NJ 07974-0636
- U.S.A.
- dmg@bell-labs.com
+ dmg@acm.org
*/
#include "gdtoaimp.h"
@@ -118,7 +114,7 @@ strtod
switch(s[1]) {
case 'x':
case 'X':
- switch(gethex(&s, &fpi, &exp, &bb, sign)) {
+ switch(i = gethex(&s, &fpi, &exp, &bb, sign)) {
case STRTOG_NoNumber:
s = s00;
sign = 0;
diff --git a/contrib/gdtoa/strtodg.c b/contrib/gdtoa/strtodg.c
index 5b8409b..bf30e33 100644
--- a/contrib/gdtoa/strtodg.c
+++ b/contrib/gdtoa/strtodg.c
@@ -28,11 +28,7 @@ THIS SOFTWARE.
/* Please send bug reports to
David M. Gay
- Bell Laboratories, Room 2C-463
- 600 Mountain Avenue
- Murray Hill, NJ 07974-0636
- U.S.A.
- dmg@bell-labs.com
+ dmg@acm.org
*/
#include "gdtoaimp.h"
diff --git a/contrib/gdtoa/xsum0.out b/contrib/gdtoa/xsum0.out
index f564f91..e5ec8f7 100644
--- a/contrib/gdtoa/xsum0.out
+++ b/contrib/gdtoa/xsum0.out
@@ -1,9 +1,9 @@
-README 7150e50 13249
+README c9c34c1 13153
arithchk.c e37b8a75 4070
dmisc.c e8d262b6 4712
dtoa.c f3c132b3 16905
g_Qfmt.c e5847e9 2870
-g__fmt.c e29d67f1 2534
+g__fmt.c ee5f9be0 2439
g_ddfmt.c fcf94527 3790
g_dfmt.c f30e55a9 2533
g_ffmt.c 7c4ea96 2459
@@ -12,7 +12,7 @@ g_xfmt.c c20a5e4 2795
gdtoa.c 364a0d2 17017
gdtoa.h 1eb440de 4810
gdtoaimp.h 6a955ba 19106
-gethex.c ff3c434d 4981
+gethex.c 1310d1b3 5066
gmisc.c e1a268ea 2114
hd_init.c cf9a94e 1827
hexnan.c f53be1da 2988
@@ -26,9 +26,9 @@ strtoIf.c eb75ac99 1905
strtoIg.c ec59c2fa 3484
strtoIx.c 8f8c9d 1990
strtoIxL.c 1313ff7f 1961
-strtod.c 1ad667 20076
+strtod.c fd6556c8 19985
strtodI.c e58338e0 4062
-strtodg.c 1caf3fa4 19553
+strtodg.c e04b9254 19458
strtof.c 1e7a787a 2202
strtopQ.c e232c542 2685
strtopd.c e865dc64 1701
OpenPOWER on IntegriCloud