From c7bf2e99cafbd8970f81c38d6f32842cc7846421 Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Mon, 19 Dec 2022 18:56:54 +0100 Subject: 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 --- stdio-common/wprintf_function_invoke.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 stdio-common/wprintf_function_invoke.c (limited to 'stdio-common/wprintf_function_invoke.c') diff --git a/stdio-common/wprintf_function_invoke.c b/stdio-common/wprintf_function_invoke.c new file mode 100644 index 0000000..29a6b4e --- /dev/null +++ b/stdio-common/wprintf_function_invoke.c @@ -0,0 +1,22 @@ +/* Invoke a printf specifier handler. Wide version. + Copyright (C) 2022 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#include +#include +#include "printf_buffer-wchar_t.h" +#include "Xprintf_function_invoke.c" -- cgit v1.1