summaryrefslogtreecommitdiffstats
path: root/src/printf.h
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rambler-co.ru>2011-06-09 17:33:07 +0400
committerVsevolod Stakhov <vsevolod@rambler-co.ru>2011-06-09 17:33:07 +0400
commit25591d79bad7c201ee12717cde3c6c39e39e48e5 (patch)
tree996d5e14b47ee8dd11e826d1c02767f7e513bf1a /src/printf.h
parent8c23f93d02fb111baa27e8141b13d6fe658bb155 (diff)
downloadrspamd-25591d79bad7c201ee12717cde3c6c39e39e48e5.tar.gz
rspamd-25591d79bad7c201ee12717cde3c6c39e39e48e5.zip
* Add api for creating XML-rpc calls
Diffstat (limited to 'src/printf.h')
-rw-r--r--src/printf.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/printf.h b/src/printf.h
index 74f665a2d..0d41bdc80 100644
--- a/src/printf.h
+++ b/src/printf.h
@@ -55,7 +55,17 @@
*/
gint rspamd_sprintf (gchar *buf, const gchar *fmt, ...);
gint rspamd_fprintf (FILE *f, const gchar *fmt, ...);
-gint rspamd_snprintf (gchar *buf, size_t max, const gchar *fmt, ...);
-gchar *rspamd_vsnprintf (gchar *buf, size_t max, const gchar *fmt, va_list args);
+gint rspamd_snprintf (gchar *buf, glong max, const gchar *fmt, ...);
+gchar *rspamd_vsnprintf (gchar *buf, glong max, const gchar *fmt, va_list args);
+
+/*
+ * Escape rspamd string to write it to log file or other 7 bit prefferable places
+ *
+ * @param dst destination string
+ * @param src source string
+ * @param len length of destination buffer
+ * @return pointer to end of buffer
+ */
+gchar * rspamd_escape_string (gchar *dst, const gchar *src, glong len);
#endif /* PRINTF_H_ */