annotate Python/strtod.c @ 388:31d509e94271
legacy-trunk
Comment out 'abort()' call.
Changed comparison operators.
| author |
Guido van Rossum <guido@python.org> |
| date |
Sun, 20 Oct 1991 20:12:38 +0000 |
| parents |
f352ea4dff70 |
| children |
b46d76ebd9a7 |
| rev |
line source |
|
208
|
1 /* This is not a proper strtod() implementation, but sufficient for Python.
|
|
|
2 Python won't detect floating point constant overflow, though. */
|
|
|
3
|
|
|
4 #include <string.h>
|
|
|
5
|
|
|
6 extern double atof();
|
|
|
7
|
|
|
8 /*ARGSUSED*/
|
|
|
9 double
|
|
|
10 strtod(p, pp)
|
|
|
11 char *p;
|
|
|
12 char **pp;
|
|
|
13 {
|
|
|
14 if (pp)
|
|
|
15 *pp = strchr(p, '\0');
|
|
|
16 return atof(p);
|
|
|
17 }
|