diff options
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | builtin.c | 10 |
2 files changed, 13 insertions, 5 deletions
@@ -1,3 +1,11 @@ +2021-06-04 Arnold D. Robbins <arnold@skeeve.com> + + * builtin.c (format_tree): In MPFR prints, cast values to + int for proper int vs. unsigned comparison. Fixes things + for HP-UX. Thanks to Daniel Richard G. for the report. + +2021-06-04 Arnold D. Robbins <arnold@skeeve.com> + 2021-05-21 Arnold D. Robbins <arnold@skeeve.com> * debug.c: For z/OS, use %#p to print pointers, %p everything else. @@ -1558,19 +1558,19 @@ mpf1: case MP_INT_WITH_PREC: sprintf(cp, "*.*Z%c", cs1); while ((nc = mpfr_snprintf(obufout, ofre, cpbuf, - (int) fw, (int) prec, zi)) >= ofre) + (int) fw, (int) prec, zi)) >= (int) ofre) chksize(nc) break; case MP_INT_WITHOUT_PREC: sprintf(cp, "*Z%c", cs1); while ((nc = mpfr_snprintf(obufout, ofre, cpbuf, - (int) fw, zi)) >= ofre) + (int) fw, zi)) >= (int) ofre) chksize(nc) break; case MP_FLOAT: sprintf(cp, "*.*R*%c", cs1); while ((nc = mpfr_snprintf(obufout, ofre, cpbuf, - (int) fw, (int) prec, ROUND_MODE, mf)) >= ofre) + (int) fw, (int) prec, ROUND_MODE, mf)) >= (int) ofre) chksize(nc) break; #endif @@ -1579,7 +1579,7 @@ mpf1: sprintf(cp, "*.*%c", cs1); while ((nc = snprintf(obufout, ofre, cpbuf, (int) fw, (int) prec, - (double) tmpval)) >= ofre) + (double) tmpval)) >= (int) ofre) chksize(nc) } else { // For %a and %A, use the default precision if it @@ -1587,7 +1587,7 @@ mpf1: sprintf(cp, "*%c", cs1); while ((nc = snprintf(obufout, ofre, cpbuf, (int) fw, - (double) tmpval)) >= ofre) + (double) tmpval)) >= (int) ofre) chksize(nc) } } |