/* Convert string to double, using the C locale.
- Copyright (C) 2003-2004, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2003-2004, 2009-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
accepting only the ASCII digits '0'..'9', and only '.' as decimal point
character.
If ENDPTR is not NULL, set *ENDPTR to point to the first byte beyond the
- parsed number or to NPTR if the string does not start with a parseable
+ parsed number or to NPTR if the string does not start with a parsable
number.
Return value:
- If successful, return the value as a double or 'long double',
- In case of underflow, return a value very near to 0 and set errno to
ERANGE.
- If the string does not start with a number at all, return 0 (and recall
- that if ENDPTR != NULL, *ENDPTR is set to NPTR).
- - In case of other error, return 0 and set errno, for example to EINVAL
- or ENOMEM. */
+ that if ENDPTR != NULL, *ENDPTR is set to NPTR), and maybe set errno to
+ EINVAL.
+ - In case of other error, return 0 and set errno, for example to ENOMEM. */
extern double c_strtod (char const *nptr, char **endptr);
extern long double c_strtold (char const *nptr, char **endptr);