mirror of
https://github.com/apache/nuttx.git
synced 2026-06-06 16:50:55 +08:00
lib_libvscanf.c: Implement "j" modifier for scanf
It's a part of C99 and commonly used these days.
This commit is contained in:
committed by
Xiang Xiao
parent
a92e394884
commit
3e6561c3cf
@@ -332,6 +332,15 @@ int lib_vscanf(FAR struct lib_instream_s *obj, FAR int *lastc,
|
||||
fmt++;
|
||||
}
|
||||
}
|
||||
else if (fmt_char(fmt) == 'j')
|
||||
{
|
||||
/* Same as long long if available. Otherwise, long. */
|
||||
#ifdef CONFIG_LIBC_LONG_LONG
|
||||
modifier = LL_MOD;
|
||||
#else
|
||||
modifier = L_MOD;
|
||||
#endif
|
||||
}
|
||||
else if (fmt_char(fmt) == 'h' || fmt_char(fmt) == 'H')
|
||||
{
|
||||
modifier = H_MOD;
|
||||
|
||||
Reference in New Issue
Block a user