diff options
Diffstat (limited to 'src/stdlib/atof.c')
-rw-r--r-- | src/stdlib/atof.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/stdlib/atof.c b/src/stdlib/atof.c new file mode 100644 index 00000000..c8fd2344 --- /dev/null +++ b/src/stdlib/atof.c @@ -0,0 +1,19 @@ +#include <stdlib.h> + +/** convert string to floating-point **/ + +double atof(const char * nptr) +{ + return strtod(nptr, (char**)NULL); +} + +/*** +converts the string at ARGUMENT(nptr) to a TYPE(double). The +conversion goes until the first inappropriate character. +***/ + +/* +LC_CTYPE +RETURN_SUCCESS(the converted value) +STDC(1) +*/ |