printf
printf copied to clipboard
Tiny, fast(ish), self-contained, fully loaded printf, sprinf etc. implementation; particularly useful in embedded systems.
CMake has built-in support for an option named `BUILD_SHARED_LIBS` for controlling whether libraries are built static or shared/dynamic by default. Let's use that instead of our custom `BUILD_STATIC_LIBRARY`.
For relative old but still usable OS such vxWorks 6.x, we want a cross-platform printf to handling printf things and use c89 syntax supported
We currently don't support `long double` floating-point values - neither in terms of the printf syntax (`%Lf` is rejected), nor in terms of the semantics (we never `va_arg(args, long double)`)....
I found two problems with this code in lines 599-602 of the `get_components` function in printf.c. And I hope to discuss with you. https://github.com/eyalroz/printf/blob/f8ed5a9bd9fa8384430973465e94aa14c925872d/src/printf/printf.c#L599-L602 (1)Is there a lack of carry...
Isn't that comparison (first line) wrong considering the following comment? ``` if ((!(remainder < 0.5) || (remainder > 0.5)) && (number_.integral & 1)) { // exactly 0.5 and ODD, then...
As noted in README.md: > The implementation currently assumes each of intmax_t, signed size_t, and ptrdiff_t has the same size as long int or as long long int. If this...
This preprocessor directive: ``` #pragma GCC diagnostic ignored "-Wmaybe-uninitialized" ``` on line 939 of `src/printf/printf.c` will fail if the option is unknown. It's known if you build with the provided...
Our installation commands in CMakeLists.txt are currently lacking a critical component... installing a `print-config.cmake` file, without which `find_package()` will not be able to find the installed library. Thanks goes to...
`printf("%# 01.1g", 9.8)` should yield ` 1.e01`, but yields ` 10.`; this is likely due to a mis-evaluation of how many characters the exponential-format takes up, resulting in a mistaken...