lib_libvscanf.c: Implement "j" modifier for scanf
It's a part of C99 and commonly used these days.
This commit is contained in:
parent
a92e394884
commit
3e6561c3cf
1 changed files with 9 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue