mirror of
https://github.com/apache/nuttx.git
synced 2026-05-30 05:16:47 +08:00
Implement "j" modifier for printf format
It's a part of C99 and commonly used these days.
This commit is contained in:
committed by
Alin Jerpelea
parent
d884dd301f
commit
86b7c20b7d
@@ -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 (c == 'l')
|
||||||
{
|
{
|
||||||
if ((flags & FL_LONG) != 0)
|
if ((flags & FL_LONG) != 0)
|
||||||
|
|||||||
Reference in New Issue
Block a user