summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1991-04-16 08:45:40 (GMT)
committerGuido van Rossum <guido@python.org>1991-04-16 08:45:40 (GMT)
commit753e2bfbbfb9bb706705bb6ccdd007c6d470e73f (patch)
tree0baf5bdd6a05357f396afdd7af9b2204d851905c /Python
parent27201069c0451c5844150c88e713c43b7eec5007 (diff)
downloadcpython-753e2bfbbfb9bb706705bb6ccdd007c6d470e73f.zip
cpython-753e2bfbbfb9bb706705bb6ccdd007c6d470e73f.tar.gz
cpython-753e2bfbbfb9bb706705bb6ccdd007c6d470e73f.tar.bz2
Initial revision
Diffstat (limited to 'Python')
-rw-r--r--Python/strtod.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/Python/strtod.c b/Python/strtod.c
new file mode 100644
index 0000000..106ec6e
--- /dev/null
+++ b/Python/strtod.c
@@ -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);
+}