X-Git-Url: http://git.sourceforge.jp/view?a=blobdiff_plain;f=libiberty%2Fstrtod.c;h=adbc33b0da07dce7b4f1d565694cc60ee7d743cd;hb=2f1c2b417a5b96cb59459c6f4d876bd68c0d406b;hp=874e5e5241626dc3819a1c84fefac50c8dbe7bea;hpb=a3a8a3df15ba3bfeaad5a3fa695b1736c2a33fd1;p=pf3gnuchains%2Fgcc-fork.git diff --git a/libiberty/strtod.c b/libiberty/strtod.c index 874e5e52416..adbc33b0da0 100644 --- a/libiberty/strtod.c +++ b/libiberty/strtod.c @@ -1,5 +1,5 @@ /* Implementation of strtod for systems with atof. - Copyright (C) 1991, 1995 Free Software Foundation, Inc. + Copyright (C) 1991, 1995, 2002 Free Software Foundation, Inc. This file is part of the libiberty library. This library is free software; you can redistribute it and/or modify it under the @@ -14,7 +14,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License along with GNU CC; see the file COPYING. If not, write to -the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +the Free Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. As a special exception, if you link this library with files compiled with a GNU compiler to produce an executable, this does not cause @@ -26,7 +26,7 @@ the executable file might be covered by the GNU General Public License. */ @deftypefn Supplemental double strtod (const char *@var{string}, char **@var{endptr}) -This ANSI C function converts the initial portion of @var{string} to a +This ISO C function converts the initial portion of @var{string} to a @code{double}. If @var{endptr} is not @code{NULL}, a pointer to the character after the last character used in the conversion is stored in the location referenced by @var{endptr}. If no conversion is @@ -40,16 +40,14 @@ the location referenced by @var{endptr}. #include "ansidecl.h" #include "safe-ctype.h" -extern double atof (); +extern double atof (const char *); /* Disclaimer: this is currently just used by CHILL in GDB and therefore has not been tested well. It may have been tested for nothing except that it compiles. */ double -strtod (str, ptr) - char *str; - char **ptr; +strtod (char *str, char **ptr) { char *p; @@ -75,7 +73,7 @@ strtod (str, ptr) && (p[6] == 't' || p[6] == 'T') && (p[7] == 'y' || p[7] == 'Y')) { - *ptr = p + 7; + *ptr = p + 8; return atof (str); } else