| version 1.10, 1993/12/21 18:59:11 |
version 1.11, 1993/12/21 19:24:09 |
| Line 115 static char *rcsid = "$Id$"; |
|
| Line 115 static char *rcsid = "$Id$"; |
|
| #ifndef KR_headers |
#ifndef KR_headers |
| #include "stdlib.h" |
#include "stdlib.h" |
| #include "string.h" |
#include "string.h" |
| |
#include "locale.h" |
| #else |
#else |
| #include "malloc.h" |
#include "malloc.h" |
| #include "memory.h" |
#include "memory.h" |
|
|
| Long L; |
Long L; |
| unsigned Long y, z; |
unsigned Long y, z; |
| Bigint *bb, *bb1, *bd, *bd0, *bs, *delta; |
Bigint *bb, *bb1, *bd, *bd0, *bs, *delta; |
| |
|
| |
#ifndef KR_headers |
| |
CONST char decimal_point = localeconv()->decimal_point[0]; |
| |
#else |
| |
CONST char decimal_point = '.'; |
| |
#endif |
| |
|
| sign = nz0 = nz = 0; |
sign = nz0 = nz = 0; |
| rv = 0.; |
rv = 0.; |
| |
|
| |
|
| for(s = s00; isspace(*s); s++) |
for(s = s00; isspace(*s); s++) |
| ; |
; |
| |
|
|
|
| else if (nd < 16) |
else if (nd < 16) |
| z = 10*z + c - '0'; |
z = 10*z + c - '0'; |
| nd0 = nd; |
nd0 = nd; |
| if (c == '.') { |
if (c == decimal_point) { |
| c = *++s; |
c = *++s; |
| if (!nd) { |
if (!nd) { |
| for(; c == '0'; c = *++s) |
for(; c == '0'; c = *++s) |