fb73ac392c
This makes cbprintf_nano.c much closer to the standard printf and therefore more useful. The following are now implemented: - right justification for everything (only for numbers previously) - precision value for numbers, chars and strings - width/precision passed as arguments with * - "unlimited" padding length - lower/uppercase hex output - the #, + and ' ' flags are supported And the code was heavily reworked to reduce its size as much as possible to mitigate the size growth. Still, the binary resulting from cbprintf_nano.c is now between 10% and 20% bigger depending on the architecture. This is still far smaller than cbprintf_complete.c which remains about twice as big on average even without FP support. Many unit tests that were skipped with CONFIG_CBPRINTF_NANO are now enabled, and a few more were added for good measure. Signed-off-by: Nicolas Pitre <npitre@baylibre.com> |
||
---|---|---|
.. | ||
CMakeLists.txt | ||
main.c | ||
testcase.yaml |