2005-10-11 David Weatherford <weath@tensilica.com>
* libc/stdio/vfprintf.c (_VFPRINTF_R): Recognize 'F' format. Print "inf" and "nan" in lowercase for e/f/g formats and in uppercase for E/F/G formats.
This commit is contained in:
parent
677f3499b3
commit
da71e51811
|
@ -1,3 +1,9 @@
|
|||
2005-10-11 David Weatherford <weath@tensilica.com>
|
||||
|
||||
* libc/stdio/vfprintf.c (_VFPRINTF_R): Recognize 'F' format.
|
||||
Print "inf" and "nan" in lowercase for e/f/g formats and in
|
||||
uppercase for E/F/G formats.
|
||||
|
||||
2005-10-07 Bob Wilson <bob.wilson@acm.org>
|
||||
|
||||
* libc/stdlib/mallocr.c (mALLOc, rEALLOCc, mEMALIGn): Set errno
|
||||
|
|
|
@ -800,6 +800,7 @@ reswitch: switch (ch) {
|
|||
case 'e':
|
||||
case 'E':
|
||||
case 'f':
|
||||
case 'F':
|
||||
case 'g':
|
||||
case 'G':
|
||||
if (prec == -1) {
|
||||
|
@ -819,12 +820,18 @@ reswitch: switch (ch) {
|
|||
if (isinf (_fpvalue)) {
|
||||
if (_fpvalue < 0)
|
||||
sign = '-';
|
||||
cp = "Inf";
|
||||
if (ch == 'E' || ch == 'F' || ch == 'G')
|
||||
cp = "INF";
|
||||
else
|
||||
cp = "inf";
|
||||
size = 3;
|
||||
break;
|
||||
}
|
||||
if (isnan (_fpvalue)) {
|
||||
cp = "NaN";
|
||||
if (ch == 'E' || ch == 'F' || ch == 'G')
|
||||
cp = "NAN";
|
||||
else
|
||||
cp = "nan";
|
||||
size = 3;
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue