aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/libutil/printf.c13
-rw-r--r--src/libutil/printf.h1
2 files changed, 14 insertions, 0 deletions
diff --git a/src/libutil/printf.c b/src/libutil/printf.c
index d72ec95c8..0c4c8f03d 100644
--- a/src/libutil/printf.c
+++ b/src/libutil/printf.c
@@ -225,6 +225,19 @@ rspamd_fprintf (FILE *f, const gchar *fmt, ...)
}
glong
+rspamd_printf (const gchar *fmt, ...)
+{
+ va_list args;
+ glong r;
+
+ va_start (args, fmt);
+ r = rspamd_vprintf_common (rspamd_printf_append_file, stdout, fmt, args);
+ va_end (args);
+
+ return r;
+}
+
+glong
rspamd_log_fprintf (FILE *f, const gchar *fmt, ...)
{
va_list args;
diff --git a/src/libutil/printf.h b/src/libutil/printf.h
index a4e03791d..bd5c62cb6 100644
--- a/src/libutil/printf.h
+++ b/src/libutil/printf.h
@@ -65,6 +65,7 @@
typedef glong (*rspamd_printf_append_func)(const gchar *buf, glong buflen, gpointer ud);
glong rspamd_fprintf (FILE *f, const gchar *fmt, ...);
+glong rspamd_printf (const gchar *fmt, ...);
glong rspamd_log_fprintf (FILE *f, const gchar *fmt, ...);
glong rspamd_snprintf (gchar *buf, glong max, const gchar *fmt, ...);
gchar *rspamd_vsnprintf (gchar *buf, glong max, const gchar *fmt, va_list args);