blob: e3fb81b921b2b89f718097f8db00d63681ba2912 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
/* This is not a proper strtod() implementation, but sufficient for Python.
Python won't detect floating point constant overflow, though. */
extern int errno;
extern int strlen();
extern double atof();
double
strtod(p, pp)
char *p;
char **pp;
{
double res;
if (pp)
*pp = p + strlen(p);
res = atof(p);
errno = 0;
return res;
}
|