0
0
mirror of https://github.com/python/cpython.git synced 2024-11-28 08:20:55 +01:00
cpython/Python/strtod.c

16 lines
285 B
C
Raw Normal View History

1991-04-16 10:45:40 +02:00
/* This is not a proper strtod() implementation, but sufficient for Python.
Python won't detect floating point constant overflow, though. */
1991-12-24 14:29:10 +01:00
extern int strlen();
1991-04-16 10:45:40 +02:00
extern double atof();
double
strtod(p, pp)
char *p;
char **pp;
{
if (pp)
1991-12-24 14:29:10 +01:00
*pp = p + strlen(p);
1991-04-16 10:45:40 +02:00
return atof(p);
}