Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Johnston <jjohnstn@redhat.com>2002-12-06 21:58:51 +0300
committerJeff Johnston <jjohnstn@redhat.com>2002-12-06 21:58:51 +0300
commitc049dd5a782f36ca5f6eeb39e110d5774631aa1c (patch)
tree42a17e5eac109ebf1ada11bff536938b4d83e71c /newlib/libc/stdlib
parente25e377eb323e9ac6f6ea3b23f57a68293be2ae9 (diff)
2002-12-06 Jeff Johnston <jjohnstn@redhat.com>
* libc/include/stdlib.h (strtof): New prototype (from C99). (strtodf): Changed from prototype to macro which redefines to strtof. * libc/stdlib/atof.c: Change documentation to refer to strtof instead of strtodf. * libc/stdlib/atoff.c (atoff): Change to call strtof instead of strtodf. * libc/stdlib/strtod.c (strtodf): Renamed to strtof. (strtof): New function. * libm/test/convert.c (test_strtodf): Renamed to test_strtof which calls strtof.
Diffstat (limited to 'newlib/libc/stdlib')
-rw-r--r--newlib/libc/stdlib/atof.c2
-rw-r--r--newlib/libc/stdlib/atoff.c2
-rw-r--r--newlib/libc/stdlib/strtod.c14
3 files changed, 9 insertions, 9 deletions
diff --git a/newlib/libc/stdlib/atof.c b/newlib/libc/stdlib/atof.c
index cf4abdb71..bba343cad 100644
--- a/newlib/libc/stdlib/atof.c
+++ b/newlib/libc/stdlib/atof.c
@@ -36,7 +36,7 @@ of whitespace, or if the first non-whitespace character is
something other than <<+>>, <<->>, <<.>>, or a digit.
<<atof(<[s]>)>> is implemented as <<strtod(<[s]>, NULL)>>.
-<<atoff(<[s]>)>> is implemented as <<strtodf(<[s]>, NULL)>>.
+<<atoff(<[s]>)>> is implemented as <<strtof(<[s]>, NULL)>>.
RETURNS
<<atof>> returns the converted substring value, if any, as a
diff --git a/newlib/libc/stdlib/atoff.c b/newlib/libc/stdlib/atoff.c
index 9c682c47a..c97b78fb1 100644
--- a/newlib/libc/stdlib/atoff.c
+++ b/newlib/libc/stdlib/atoff.c
@@ -5,5 +5,5 @@ float
_DEFUN (atoff, (s),
_CONST char *s)
{
- return strtodf (s, NULL);
+ return strtof (s, NULL);
}
diff --git a/newlib/libc/stdlib/strtod.c b/newlib/libc/stdlib/strtod.c
index c16d75d4f..19467f495 100644
--- a/newlib/libc/stdlib/strtod.c
+++ b/newlib/libc/stdlib/strtod.c
@@ -1,18 +1,18 @@
/*
FUNCTION
- <<strtod>>, <<strtodf>>---string to double or float
+ <<strtod>>, <<strtof>>---string to double or float
INDEX
strtod
INDEX
_strtod_r
INDEX
- strtodf
+ strtof
ANSI_SYNOPSIS
#include <stdlib.h>
double strtod(const char *<[str]>, char **<[tail]>);
- float strtodf(const char *<[str]>, char **<[tail]>);
+ float strtof(const char *<[str]>, char **<[tail]>);
double _strtod_r(void *<[reent]>,
const char *<[str]>, char **<[tail]>);
@@ -23,7 +23,7 @@ TRAD_SYNOPSIS
char *<[str]>;
char **<[tail]>;
- float strtodf(<[str]>,<[tail]>)
+ float strtof(<[str]>,<[tail]>)
char *<[str]>;
char **<[tail]>;
@@ -48,7 +48,7 @@ DESCRIPTION
(which will contain at least the terminating null character of
<[str]>) is stored in <<*<[tail]>>>. If you want no
assignment to <<*<[tail]>>>, pass a null pointer as <[tail]>.
- <<strtodf>> is identical to <<strtod>> except for its return type.
+ <<strtof>> is identical to <<strtod>> except for its return type.
This implementation returns the nearest machine number to the
input decimal string. Ties are broken by using the IEEE
@@ -721,11 +721,11 @@ _DEFUN (strtod, (s00, se),
}
float
-_DEFUN (strtodf, (s00, se),
+_DEFUN (strtof, (s00, se),
_CONST char *s00 _AND
char **se)
{
- return _strtod_r (_REENT, s00, se);
+ return (float)_strtod_r (_REENT, s00, se);
}
#endif