mescc: Mes C Library: Support gcc-4.6.4: vfprintf, vsnprintf: pad with space.

* lib/stdio/vfprintf.c (vfprintf): pad with space.
* lib/stdio/vsnprintf.c (vsnprintf): pad with space.
This commit is contained in:
Jan Nieuwenhuizen 2019-09-20 14:44:31 +02:00
parent 98b9ac8e98
commit 0e55071bc7
No known key found for this signature in database
GPG key ID: F3C1A0D9C1D65273
2 changed files with 10 additions and 0 deletions

View file

@ -48,6 +48,11 @@ vfprintf (FILE * f, char const *format, va_list ap)
c = *++p; c = *++p;
} }
char pad = ' '; char pad = ' ';
if (c == ' ')
{
pad = c;
c = *p++;
}
if (c == '0') if (c == '0')
{ {
pad = c; pad = c;

View file

@ -50,6 +50,11 @@ vsnprintf (char *str, size_t size, char const *format, va_list ap)
c = *++p; c = *++p;
} }
char pad = ' '; char pad = ' ';
if (c == ' ')
{
pad = c;
c = *p++;
}
if (c == '0') if (c == '0')
{ {
pad = c; pad = c;