Deleted Added
full compact
strtodg.c (112158) strtodg.c (112415)
1/****************************************************************
2
3The author of this software is David M. Gay.
4
5Copyright (C) 1998-2001 by Lucent Technologies
6All Rights Reserved
7
8Permission to use, copy, modify, and distribute this software and

--- 45 unchanged lines hidden (view full) ---

54#ifdef KR_headers
55increment(b) Bigint *b;
56#else
57increment(Bigint *b)
58#endif
59{
60 ULong *x, *xe;
61 Bigint *b1;
1/****************************************************************
2
3The author of this software is David M. Gay.
4
5Copyright (C) 1998-2001 by Lucent Technologies
6All Rights Reserved
7
8Permission to use, copy, modify, and distribute this software and

--- 45 unchanged lines hidden (view full) ---

54#ifdef KR_headers
55increment(b) Bigint *b;
56#else
57increment(Bigint *b)
58#endif
59{
60 ULong *x, *xe;
61 Bigint *b1;
62#ifdef USE_LOCALE
63 CONST char *s2;
64#endif
65#ifdef Pack_16
66 ULong carry = 1, y;
67#endif
68
69 x = b->x;
70 xe = x + b->wds;
71#ifdef Pack_32
72 do {

--- 321 unchanged lines hidden (view full) ---

394 y = z = 0;
395 for(nd = nf = 0; (c = *s) >= '0' && c <= '9'; nd++, s++)
396 if (nd < 9)
397 y = 10*y + c - '0';
398 else if (nd < 16)
399 z = 10*z + c - '0';
400 nd0 = nd;
401#ifdef USE_LOCALE
62#ifdef Pack_16
63 ULong carry = 1, y;
64#endif
65
66 x = b->x;
67 xe = x + b->wds;
68#ifdef Pack_32
69 do {

--- 321 unchanged lines hidden (view full) ---

391 y = z = 0;
392 for(nd = nf = 0; (c = *s) >= '0' && c <= '9'; nd++, s++)
393 if (nd < 9)
394 y = 10*y + c - '0';
395 else if (nd < 16)
396 z = 10*z + c - '0';
397 nd0 = nd;
398#ifdef USE_LOCALE
402 s1 = localeconv()->decimal_point;
403 if (c == *s1) {
404 c = '.';
405 if (*++s1) {
406 s2 = s;
407 for(;;) {
408 if (*++s2 != *s1) {
409 c = 0;
410 break;
411 }
412 if (!*++s1) {
413 s = s2;
414 break;
415 }
416 }
417 }
418 }
399 if (c == *localeconv()->decimal_point)
400#else
401 if (c == '.')
419#endif
402#endif
420 if (c == '.') {
403 {
421 c = *++s;
422 if (!nd) {
423 for(; c == '0'; c = *++s)
424 nz++;
425 if (c > '0' && c <= '9') {
426 s0 = s;
427 nf += nz;
428 nz = 0;

--- 594 unchanged lines hidden ---
404 c = *++s;
405 if (!nd) {
406 for(; c == '0'; c = *++s)
407 nz++;
408 if (c > '0' && c <= '9') {
409 s0 = s;
410 nf += nz;
411 nz = 0;

--- 594 unchanged lines hidden ---