Karol Herbst
4080269845
util/u_printf: do not double print format string with unused arugments
...
the CL CTS added a new test being printf("\n", "foo"), but we ended up
printing the new line twice. If we can't find a specifier anymore, ignore
the argument as after the loop processing all arguments we'll print the
remaining format string anyway.
Cc: mesa-stable
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30574 >
2024-08-12 18:49:01 +00:00
Karol Herbst
d51a14aab8
util/u_printf: properly handle %%
...
Cc: mesa-stable
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29776 >
2024-06-21 13:58:14 +00:00
Konstantin
03379d74ba
util/printf: Expose util_printf_prev_tok
...
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25753 >
2024-01-20 16:11:55 +01:00
Yonggang Luo
d6c258d9ee
util: Add align_uintptr and use it treewide to replace ALIGN that works on size_t and uintptr_t
...
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com >
Acked-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26866 >
2024-01-05 21:54:35 +00:00
Lionel Landwerlin
751e919c33
util/u_printf: add a u_printf_ptr() variant
...
Taking an array of pointer to u_printf_info.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Karol Herbst <kherbst@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26505 >
2023-12-12 11:11:10 +00:00
Yonggang Luo
605ebc32ee
util: Remove va_copy fixup because of c11 is required
...
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com >
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19646 >
2022-11-11 06:15:42 +00:00
Karol Herbst
aa82808645
printf: extract clovers printf impl
...
Also make the code cleaner and simplier.
Signed-off-by: Karol Herbst <kherbst@redhat.com >
Acked-by: Jesse Natalie <jenatali@microsoft.com >
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17334 >
2022-08-04 23:53:49 +00:00
Yonggang Luo
6d263ff5a3
util: Convert util/u_printf.cpp to util/u_printf.c
...
By doing this to remove the need of C++ runtime when not using llvmpipe
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com >
Reviewed-by: Mihai Preda <mhpreda@gmail.com >
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15659 >
2022-04-11 03:31:40 +00:00