/[gnats]/gnats/libiberty/strtod.c
ViewVC logotype

Diff of /gnats/libiberty/strtod.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.2 by pdm, Mon Dec 10 23:03:26 2001 UTC revision 1.3 by chewie, Sat Nov 13 05:14:17 2004 UTC
# Line 1  Line 1 
1  /* Implementation of strtod for systems with atof.  /* Implementation of strtod for systems with atof.
2     Copyright (C) 1991, 1995 Free Software Foundation, Inc.     Copyright (C) 1991, 1995, 2002 Free Software Foundation, Inc.
3    
4  This file is part of the libiberty library.  This library is free  This file is part of the libiberty library.  This library is free
5  software; you can redistribute it and/or modify it under the  software; you can redistribute it and/or modify it under the
# Line 22  the resulting executable to be covered b Line 22  the resulting executable to be covered b
22  This exception does not however invalidate any other reasons why  This exception does not however invalidate any other reasons why
23  the executable file might be covered by the GNU General Public License. */  the executable file might be covered by the GNU General Public License. */
24    
25    /*
26    
27    @deftypefn Supplemental double strtod (const char *@var{string}, char **@var{endptr})
28    
29    This ISO C function converts the initial portion of @var{string} to a
30    @code{double}.  If @var{endptr} is not @code{NULL}, a pointer to the
31    character after the last character used in the conversion is stored in
32    the location referenced by @var{endptr}.  If no conversion is
33    performed, zero is returned and the value of @var{string} is stored in
34    the location referenced by @var{endptr}.
35    
36    @end deftypefn
37    
38    */
39    
40  #include "ansidecl.h"  #include "ansidecl.h"
41  #include "safe-ctype.h"  #include "safe-ctype.h"
42    
# Line 60  strtod (str, ptr) Line 75  strtod (str, ptr)
75            && (p[6] == 't' || p[6] == 'T')            && (p[6] == 't' || p[6] == 'T')
76            && (p[7] == 'y' || p[7] == 'Y'))            && (p[7] == 'y' || p[7] == 'Y'))
77          {          {
78            *ptr = p + 7;            *ptr = p + 8;
79            return atof (str);            return atof (str);
80          }          }
81        else        else

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26