tools/nolibc/printf: Use bit-masks to hold requested flag, length and conversion chars
Use flags bits (1u << (ch & 31)) for the flags, length modifiers, and
conversion specifiers.
This makes it easy to test for multiple values at once.
Detect the conversion flags " #+-0" although they are currently all ignored.
Unconditionally generate the signed values (for %d) to remove a second
set of checks for the size.
Separate out the formatting of single characters from numbers.
Output the sign for negative values then negate and treat as unsigned.
Signed-off-by: David Laight <david.laight.linux@gmail.com>
Acked-by: Willy Tarreau <w@1wt.eu>
Link: https://patch.msgid.link/20260308113742.12649-9-david.laight.linux@gmail.com
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>