From 1012585f1f94b4674a8370e4c1f3300a064da860 Mon Sep 17 00:00:00 2001 From: Jeff Johnston Date: Fri, 14 Oct 2005 21:03:13 +0000 Subject: 2005-10-14 Jeff Johnston * libc/stdio/vfprintf.c (_VFPRINTF_R): Fix up "inf" and "nan" processing for systems that have long double support. --- newlib/libc/stdio/vfprintf.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'newlib/libc/stdio/vfprintf.c') diff --git a/newlib/libc/stdio/vfprintf.c b/newlib/libc/stdio/vfprintf.c index 1c887d5aa..6c6e023f9 100644 --- a/newlib/libc/stdio/vfprintf.c +++ b/newlib/libc/stdio/vfprintf.c @@ -849,12 +849,18 @@ reswitch: switch (ch) { if (tmp == 2) { if (_fpvalue < 0) sign = '-'; - cp = "Inf"; + if (ch == 'E' || ch == 'F' || ch == 'G') + cp = "INF"; + else + cp = "inf"; size = 3; break; } if (tmp == 1) { - cp = "NaN"; + if (ch == 'E' || ch == 'F' || ch == 'G') + cp = "NAN"; + else + cp = "nan"; size = 3; break; } -- cgit v1.2.3