Don't rely on <string.h>

This commit is contained in:
Guido van Rossum 1991-12-24 13:29:10 +00:00
parent 0e8e872ebf
commit 54a41d6366

View File

@ -1,17 +1,15 @@
/* This is not a proper strtod() implementation, but sufficient for Python.
Python won't detect floating point constant overflow, though. */
#include <string.h>
extern int strlen();
extern double atof();
/*ARGSUSED*/
double
strtod(p, pp)
char *p;
char **pp;
{
if (pp)
*pp = strchr(p, '\0');
*pp = p + strlen(p);
return atof(p);
}