aboutsummaryrefslogtreecommitdiffstats
path: root/src/libutil/printf.h
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2019-07-08 15:22:05 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2019-07-08 15:22:05 +0100
commitc271eb36656a4ff88a9c8c1d59934949260275a3 (patch)
tree3dd586e38b5b37cfebc7c12b6ff6f434904167c7 /src/libutil/printf.h
parentb266445f47dec06392a7e058f499325fa3c052b9 (diff)
downloadrspamd-c271eb36656a4ff88a9c8c1d59934949260275a3.tar.gz
rspamd-c271eb36656a4ff88a9c8c1d59934949260275a3.zip
[Rework] Add C++ guards to all headers
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_ */