about summary refs log tree commit diff
path: root/include
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2022-12-19 18:56:54 +0100
committerFlorian Weimer <fweimer@redhat.com>2022-12-19 18:56:54 +0100
commitc7bf2e99cafbd8970f81c38d6f32842cc7846421 (patch)
tree6df9a7855896e846ccd8fe8db570c13ad2895018 /include
parent659fe9fdd14b0772f4e9722b751b9b010665e053 (diff)
downloadglibc-c7bf2e99cafbd8970f81c38d6f32842cc7846421.tar.gz
glibc-c7bf2e99cafbd8970f81c38d6f32842cc7846421.tar.xz
glibc-c7bf2e99cafbd8970f81c38d6f32842cc7846421.zip
stdio-common: Add __printf_function_invoke
And __wprintf_function_invoke.  These functions will be used to
to call registered printf specifier callbacks on printf buffers
after vfprintf and vfwprintf have been converted to buffers.  The new
implementation avoids alloca/variable length arrays.

Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
Diffstat (limited to 'include')
-rw-r--r--include/printf.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/printf.h b/include/printf.h
index 78accaab6d..8f064149d3 100644
--- a/include/printf.h
+++ b/include/printf.h
@@ -41,6 +41,16 @@ union printf_arg
     void *pa_user;
 };
 
+/* Invoke a registered printf callback.  Called from vfprintf and vfwprintf.  */
+int __printf_function_invoke (void *, printf_function callback,
+			      union printf_arg *args_value,
+			      size_t ndata_args,
+			      struct printf_info *info) attribute_hidden;
+int __wprintf_function_invoke (void *, printf_function callback,
+			       union printf_arg *args_value,
+			       size_t ndata_args,
+			       struct printf_info *info) attribute_hidden;
+
 #include <bits/types/locale_t.h>
 
 /* Now define the internal interfaces.  */