Mail Archives: djgpp/1992/08/26/10:05:08
Deiter Buerssner has informed me that my patch to doprnt.c should
have been made using a context diff. The results f
diff -c doprnt.old doprnt.new
follows. Sorry for any inconvenience.
David Ronis
===========================Cut Here===================================
*** doprnt.old Wed Aug 26 08:46:50 1992
--- doprnt.c Mon Aug 24 17:41:04 1992
***************
*** 598,618 ****
else
dotrim = 0;
/* if requires more precision and some fraction left */
! if (fract) {
! if (prec) {
! do {
fract = modf(fract * 10, &tmp);
*t++ = tochar((int)tmp);
! } while(!tmp);
! while (--prec && fract) {
! fract = modf(fract * 10, &tmp);
! *t++ = tochar((int)tmp);
}
- }
if (fract)
startp = round(fract, (int *)NULL, startp,
t - 1, (char)0, signp);
- }
/* alternate format, adds 0's for precision, else trim 0's */
if (flags&ALT)
for (; prec--; *t++ = '0');
--- 598,611 ----
else
dotrim = 0;
/* if requires more precision and some fraction left */
! while (prec && fract) {
fract = modf(fract * 10, &tmp);
*t++ = tochar((int)tmp);
! prec--;
}
if (fract)
startp = round(fract, (int *)NULL, startp,
t - 1, (char)0, signp);
/* alternate format, adds 0's for precision, else trim 0's */
if (flags&ALT)
for (; prec--; *t++ = '0');
===========================CUT HERE===================================
- Raw text -