summaryrefslogtreecommitdiffstats
path: root/src/libutil/printf.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/libutil/printf.h')
-rw-r--r--src/libutil/printf.h28
1 files changed, 21 insertions, 7 deletions
diff --git a/src/libutil/printf.h b/src/libutil/printf.h
index 86947f67c..008e08245 100644
--- a/src/libutil/printf.h
+++ b/src/libutil/printf.h
@@ -19,6 +19,9 @@
#include "config.h"
#include "fstring.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
/*
* supported formats:
* %[0][width][x][X]O off_t
@@ -59,24 +62,35 @@
* @param ud opaque pointer
* @return number of characters written
*/
-typedef glong (*rspamd_printf_append_func)(const gchar *buf, glong buflen,
- gpointer ud);
+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);
+
+gchar *rspamd_vsnprintf (gchar *buf, glong max, const gchar *fmt,
+ va_list args);
+
glong rspamd_printf_gstring (GString *s, const gchar *fmt, ...);
+
glong rspamd_vprintf_gstring (GString *s, const gchar *fmt, va_list args);
glong rspamd_printf_fstring (rspamd_fstring_t **s, const gchar *fmt, ...);
+
glong rspamd_vprintf_fstring (rspamd_fstring_t **s, const gchar *fmt, va_list args);
glong rspamd_vprintf_common (rspamd_printf_append_func func,
- gpointer apd,
- const gchar *fmt,
- va_list args);
+ gpointer apd,
+ const gchar *fmt,
+ va_list args);
+
+#ifdef __cplusplus
+}
+#endif
#endif /* PRINTF_H_ */