Alejandro Colomar
ce044d1791
*/: s/SNPRINTF/stprintf_a/
...
This name better reflects that it handles arrays, and doesn't shout.
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-11-27 20:50:48 -06:00
Evgeny Grin (Karlson2k)
eb71706b1c
*/: Fix including <config.h> as system header
...
"config.h" is a locally generated header. It must be included as
'#include "config.h"'.
It is already included correctly in some sources files. This commit
unifies the way how "config.h" is included.
Signed-off-by: Evgeny Grin (Karlson2k) <k2k@drgrin.dev>
2025-07-16 14:12:40 +02:00
Alejandro Colomar
ba3456c9fd
lib/, src/, tests/: Use the standard countof() instead of our NITEMS()
...
countof() is the name blessed by the C Committee for ISO C2y.
Use it if available, and define it if not.
countof() will be provided by GCC 16 and Clang 21.
This is mostly a scripted change:
$ grep -rl NITEMS | xargs sed -i s/NITEMS/countof/;
Apart from the scripted changes, I've adjusted white-space alignment,
and of course the definition at "lib/sizeof.h".
Link: <https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3550.pdf#subsubsection.0.6.5.4.5 >
Link: <https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3550.pdf#section.0.7.21 >
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-06-03 09:34:55 -05:00
Alejandro Colomar
22272347b6
lib/string/sprintf/, lib/, src/, tests/: Move all sprintf(3)-like APIs to a subdirectory
...
And have a separate file for each pair of APIs.
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2024-07-01 21:40:11 -05:00