Implement "j" modifier for printf format

It's a part of C99 and commonly used these days.
This commit is contained in:
YAMAMOTO Takashi 2020-06-02 13:51:12 +09:00 committed by Alin Jerpelea
parent d884dd301f
commit 86b7c20b7d

View File

@ -410,6 +410,18 @@ static int vsprintf_internal(FAR struct lib_outstream_s *stream,
}
}
if (c == 'j')
{
/* Same as long long if available. Otherwise, long. */
#ifdef CONFIG_LIBC_LONG_LONG
flags |= FL_REPD_TYPE;
#endif
flags |= FL_LONG;
flags &= ~FL_SHORT;
continue;
}
if (c == 'l')
{
if ((flags & FL_LONG) != 0)