aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--printf.c7
-rw-r--r--printf.h1
2 files changed, 8 insertions, 0 deletions
diff --git a/printf.c b/printf.c
index 02c0075..4f2be94 100644
--- a/printf.c
+++ b/printf.c
@@ -918,3 +918,10 @@ int fctprintf(void (*out)(char character, void* arg), void* arg, const char* for
va_end(va);
return ret;
}
+
+
+int fctvprintf(void (*out)(char character, void* arg), void* arg, const char* format, va_list va)
+{
+ const out_fct_wrap_type out_fct_wrap = { out, arg };
+ return _vsnprintf(_out_fct, (char*)(uintptr_t)&out_fct_wrap, (size_t)-1, format, va);
+}
diff --git a/printf.h b/printf.h
index b0a2fd9..a4f92c6 100644
--- a/printf.h
+++ b/printf.h
@@ -109,6 +109,7 @@ int vprintf_(const char* format, va_list va);
* \return The number of characters that are sent to the output function, not counting the terminating null character
*/
int fctprintf(void (*out)(char character, void* arg), void* arg, const char* format, ...);
+int fctvprintf(void (*out)(char character, void* arg), void* arg, const char* format, va_list va);
#ifdef __cplusplus