else if (i==i/2 && d+1==z) small=0x10p-1;
else small=0x11p-1;
if (pl && *prefix=='-') round*=-1, small*=-1;
+ *d -= x;
/* Decide whether to round by probing round+small */
if (round+small != round) {
- *d = *d - x + i;
+ *d = *d + i;
while (*d > 999999999) {
*d--=0;
(*d)++;
for (i=10, e=9*(r-a); *a>=i; i*=10, e++);
}
}
+ if (z>d+1) z=d+1;
for (; !z[-1] && z>a; z--);
}
int vfprintf(FILE *f, const char *fmt, va_list ap)
{
va_list ap2;
- int nl_type[NL_ARGMAX] = {0};
- union arg nl_arg[NL_ARGMAX];
+ int nl_type[NL_ARGMAX+1] = {0};
+ union arg nl_arg[NL_ARGMAX+1];
unsigned char internal_buf[80], *saved_buf = 0;
int ret;