]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Initial revision
authorGuido van Rossum <guido@python.org>
Tue, 16 Apr 1991 08:45:40 +0000 (08:45 +0000)
committerGuido van Rossum <guido@python.org>
Tue, 16 Apr 1991 08:45:40 +0000 (08:45 +0000)
Python/strtod.c [new file with mode: 0644]

diff --git a/Python/strtod.c b/Python/strtod.c
new file mode 100644 (file)
index 0000000..106ec6e
--- /dev/null
@@ -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);
+}