atof.c 338 B

12345678910111213141516171819
  1. /*
  2. * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
  3. * See the copyright notice in the ACK home directory, in the file "Copyright".
  4. */
  5. /* $Id$ */
  6. #include <stdlib.h>
  7. #include <errno.h>
  8. double
  9. (atof)(const char *nptr)
  10. {
  11. double d;
  12. int e = errno;
  13. d = strtod(nptr, (char **) NULL);
  14. errno = e;
  15. return d;
  16. }