Hi @ll,
both
and
are rather terse and fail to specify the supported arguments and their
conversion specifiers/modifiers.
tells OTOH:
| The behaviour of these functions may vary slightly from those
| defined by ANSI, and these deviations are noted in the text.
There is but no text (see above) despite multiple deviations from
ANSI C
| /* '%*[' not yet supported, invalid format */
...
| /*
| * Warning: This implementation of the '[' conversion specifier
| * deviates from its glibc counterpart in the following ways:
...
More deviations (just from reading the source):
1. no support for %p
2. no support for conversion modifiers j and t
3. no support for multibyte characters and strings, i.e. %c
and %s may split UTF-8 codepoints
4. accepts %[][c|s], but ignores all conversion
modifiers
5. treats %% (and combinations) as %%
6. accepts %n (and combinations)
7. doesn't scan the input for %[...]n
8. uses simple_strto[u]l for the conversion modifier z, i.e. assigns
uint32_t to size_t, resulting in truncation
Is this intended?
If not: patch to fix 5. and 6. and simplify the qualifier handling
attached
Stefan Kanthak