From fa2b72b020984dfb89e7cc4bce4b48c9db955f2d Mon Sep 17 00:00:00 2001 From: Doug Currie Date: Sat, 9 Jan 2016 00:15:49 -0500 Subject: [PATCH] Use emyg_atod instead of emyg_strtod --- contrib/10.roundtrip/emyg_atod.c | 5 +++++ contrib/10.roundtrip/emyg_atod.h | 2 ++ contrib/10.roundtrip/nitro.mk | 2 +- 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/contrib/10.roundtrip/emyg_atod.c b/contrib/10.roundtrip/emyg_atod.c index 321d80e9..f742e15c 100644 --- a/contrib/10.roundtrip/emyg_atod.c +++ b/contrib/10.roundtrip/emyg_atod.c @@ -736,6 +736,11 @@ no_conv: return minus ? -res : res; } +double emyg_atod (const char *nptr) +{ + return emyg_strtod(nptr, NULL); +} + #ifdef TESTING_QUOREM int main (int argc, char **argv) diff --git a/contrib/10.roundtrip/emyg_atod.h b/contrib/10.roundtrip/emyg_atod.h index 7857a36e..3c875fbc 100644 --- a/contrib/10.roundtrip/emyg_atod.h +++ b/contrib/10.roundtrip/emyg_atod.h @@ -7,6 +7,8 @@ extern "C" { double emyg_strtod (const char *nptr, char **endptr); +double emyg_atod (const char *nptr); + #ifdef __cplusplus } #endif diff --git a/contrib/10.roundtrip/nitro.mk b/contrib/10.roundtrip/nitro.mk index 57919a80..e28f3ffb 100644 --- a/contrib/10.roundtrip/nitro.mk +++ b/contrib/10.roundtrip/nitro.mk @@ -1,4 +1,4 @@ -CONTRIB_DEFS += -DPIC_CSTRING_TO_DOUBLE=emyg_strtod -DPIC_DOUBLE_TO_CSTRING=emyg_dtoa +CONTRIB_DEFS += -DPIC_CSTRING_TO_DOUBLE=emyg_atod -DPIC_DOUBLE_TO_CSTRING=emyg_dtoa CONTRIB_SRCS += contrib/10.roundtrip/emyg_dtoa.c \ contrib/10.roundtrip/emyg_atod.c