Add support for other standard length modifiers
Snaipe opened this issue · 0 comments
Snaipe commented
The C99 spec defines the following additional modifiers:
hh A following integer conversion corresponds to a signed char or
unsigned char argument, or a following n conversion corresponds
to a pointer to a signed char argument.
h A following integer conversion corresponds to a short int or unsigned
short int argument, or a following n conversion corresponds to a
pointer to a short int argument.
L A following a, A, e, E, f, F, g, or G conversion corresponds to a
long double argument.
j A following integer conversion corresponds to an intmax_t or
uintmax_t argument, or a following n conversion corresponds to a
pointer to an intmax_t argument.
t A following integer conversion corresponds to a ptrdiff_t argument,
or a following n conversion corresponds to a pointer to a ptrdiff_t
argument.
It would be good to support those for people that want a standard-compliant printf replacement.
h
and hh
should be relatively straightforward, as char
and short
decay to int
in varargs; so they should just be accepted, but do nothing.