[svn-r4020] Purpose:

Bug Fix
Description:
    On some platforms, long long is printed with the "ll" modifier.
    HDfprintf didn't handle this case.
Solution:
    Added code which checks if there's an "ll" modifier on the template.
    If so, then it uses that as the modifier.
Platforms tested:
    Kelgia and Dangermouse
This commit is contained in:
Bill Wendling 2001-06-19 13:59:24 -05:00
parent fd78a6021d
commit 0b008afcb4

View File

@ -752,7 +752,7 @@ HDfprintf (FILE *stream, const char *fmt, ...)
fmt += 2;
nout++;
} else if ('%'==fmt[0]) {
s = fmt+1;
s = fmt + 1;
/* Flags */
while (HDstrchr ("-+ #", *s)) {
@ -821,7 +821,14 @@ HDfprintf (FILE *stream, const char *fmt, ...)
HDstrcpy (modifier, PRINTF_LL_WIDTH);
}
break;
case 'l':
/* takes care of "long long (ll)" modifiers */
if (*(s + 1) == 'l') {
HDstrcpy(modifier, "ll");
s++;
break;
}
/* FALL THROUGH */
default:
/* Handle 'll' for long long types */
if(*s=='l' && *(s+1)=='l') {