home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 9 / FreshFishVol9-CD2.bin / bbs / gnu / libnix-0.8-src.lha / libnix-0.8 / sources / math / stdlib / strtod.c < prev   
Encoding:
C/C++ Source or Header  |  1994-12-12  |  185 b   |  11 lines

  1. #include <stdio.h>
  2.  
  3. double strtod(const char *nptr,char **endptr)
  4. { double a;
  5.   unsigned long n=0;
  6.   sscanf(nptr,"%lf%ln",&a,&n);
  7.   if(endptr)
  8.     *endptr=(char *)nptr+n;
  9.   return a;
  10. }
  11.