mescc: Support binutils 2.20.1: vfprint, vsprintf: %llx.
* lib/libc+tcc.c (vfprintf, vsprintf): Handle %%llx. Print error: should we skip another int, va_arg a long long?
This commit is contained in:
parent
2551eef953
commit
41a6585295
|
@ -682,8 +682,6 @@ vfprintf (FILE* f, char const* format, va_list ap)
|
|||
int left_p = 0;
|
||||
int precision = -1;
|
||||
int width = -1;
|
||||
if (c == 'l')
|
||||
c = *++p;
|
||||
if (c == '-')
|
||||
{
|
||||
left_p = 1;
|
||||
|
@ -721,6 +719,11 @@ vfprintf (FILE* f, char const* format, va_list ap)
|
|||
}
|
||||
if (c == 'l')
|
||||
c = *++p;
|
||||
if (c == 'l')
|
||||
{
|
||||
eputs ("vfprintf: skipping second: l\n");
|
||||
c = *++p;
|
||||
}
|
||||
switch (c)
|
||||
{
|
||||
case '%': {fputc (*p, fd); count++; break;}
|
||||
|
@ -906,8 +909,6 @@ vsprintf (char *str, char const* format, va_list ap)
|
|||
int left_p = 0;
|
||||
int precision = -1;
|
||||
int width = -1;
|
||||
if (c == 'l')
|
||||
c = *++p;
|
||||
if (c == '-')
|
||||
{
|
||||
left_p = 1;
|
||||
|
@ -945,6 +946,13 @@ vsprintf (char *str, char const* format, va_list ap)
|
|||
}
|
||||
if (c == 'l')
|
||||
c = *++p;
|
||||
if (c == 'l')
|
||||
c = *++p;
|
||||
if (c == 'l')
|
||||
{
|
||||
eputs ("vfprintf: skipping second: l\n");
|
||||
c = *++p;
|
||||
}
|
||||
switch (c)
|
||||
{
|
||||
case '%': {*str++ = *p; count++; break;}
|
||||
|
|
Loading…
Reference in a new issue