diff Python/strtod.c @ 208:f352ea4dff70 legacy-trunk

Initial revision
author Guido van Rossum <guido@python.org>
date Tue, 16 Apr 1991 08:45:40 +0000
parents
children b46d76ebd9a7
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Python/strtod.c	Tue Apr 16 08:45:40 1991 +0000
@@ -0,0 +1,17 @@
+/* This is not a proper strtod() implementation, but sufficient for Python.
+   Python won't detect floating point constant overflow, though. */
+
+#include <string.h>
+
+extern double atof();
+
+/*ARGSUSED*/
+double
+strtod(p, pp)
+	char *p;
+	char **pp;
+{
+	if (pp)
+		*pp = strchr(p, '\0');
+	return atof(p);
+}