Commit 54a41d63 authored by Guido van Rossum's avatar Guido van Rossum

Don't rely on <string.h>

parent 0e8e872e
/* 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);
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment