summaryrefslogtreecommitdiffstats
path: root/test/getround.c
diff options
context:
space:
mode:
authordas <das@FreeBSD.org>2008-09-03 06:07:18 +0000
committerdas <das@FreeBSD.org>2008-09-03 06:07:18 +0000
commit9e68f339c3463ba2ab62c6fd7c3448d042e34b02 (patch)
treee48c0ff63939739c1eee586709c5e6be6cff7b87 /test/getround.c
parent1ea2a36187beeb49167030ef545fb32a960c10d9 (diff)
downloadFreeBSD-src-9e68f339c3463ba2ab62c6fd7c3448d042e34b02.zip
FreeBSD-src-9e68f339c3463ba2ab62c6fd7c3448d042e34b02.tar.gz
Import the latest gdtoa sources from the vendor, dated 2008-08-31.
Diffstat (limited to 'test/getround.c')
-rw-r--r--test/getround.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/test/getround.c b/test/getround.c
index 1754fb3..786bcc3 100644
--- a/test/getround.c
+++ b/test/getround.c
@@ -44,7 +44,14 @@ getround(int r, char *s)
{
int i;
- i = atoi(s+1);
+ while(*++s <= ' ') {
+ if (!*s) {
+ printf("Current round mode for strtor... is %d (%s).\n",
+ r, dir[r]);
+ return r;
+ }
+ }
+ i = atoi(s);
if (i >= 0 && i < 4) {
printf("Rounding mode for strtor... ");
if (i == r)
OpenPOWER on IntegriCloud