aboutsummaryrefslogtreecommitdiffstats
path: root/src/libutil/printf.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2015-10-06 16:51:35 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2015-10-06 16:51:35 +0100
commit8e6bd45485c358e5081e5f49e8376e8098f4a95e (patch)
tree9a95e4cdd113dec256dbf8379ea4d4996ae87835 /src/libutil/printf.c
parent66d896e8c819fb25f40fedfbea64f3af7e4a485c (diff)
downloadrspamd-8e6bd45485c358e5081e5f49e8376e8098f4a95e.tar.gz
rspamd-8e6bd45485c358e5081e5f49e8376e8098f4a95e.zip
Add %T for printing rspamd_ftok_t
Diffstat (limited to 'src/libutil/printf.c')
-rw-r--r--src/libutil/printf.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/libutil/printf.c b/src/libutil/printf.c
index 7fe7a9c26..9204060b2 100644
--- a/src/libutil/printf.c
+++ b/src/libutil/printf.c
@@ -338,6 +338,7 @@ rspamd_vprintf_common (rspamd_printf_append_func func,
guint64 ui64;
guint width, sign, hex, humanize, bytes, frac_width, i;
rspamd_fstring_t *v;
+ rspamd_ftok_t *tok;
GString *gs;
GError *err;
gboolean bv;
@@ -457,6 +458,11 @@ rspamd_vprintf_common (rspamd_printf_append_func func,
continue;
+ case 'T':
+ tok = va_arg (args, rspamd_ftok_t *);
+ RSPAMD_PRINTF_APPEND (tok->begin, tok->len);
+ continue;
+
case 'v':
gs = va_arg (args, GString *);
RSPAMD_PRINTF_APPEND (gs->str, gs->len);
@@ -523,7 +529,7 @@ rspamd_vprintf_common (rspamd_printf_append_func func,
sign = 1;
break;
- case 'T':
+ case 't':
i64 = (gint64) va_arg (args, time_t);
sign = 1;
break;