#include "fstring.h"
#include "cryptobox.h"
#include "images.h"
+#include "libstat/stat_api.h"
#define SHINGLES_WINDOW 3
guchar shabuf[rspamd_cryptobox_HASHBYTES], *out_key;
const guchar *cur_key;
rspamd_fstring_t *row;
- rspamd_ftok_t *word;
+ rspamd_stat_token_t *word;
rspamd_cryptobox_hash_state_t bs;
guint64 val;
gint i, j, k;
for (i = 0; i <= (gint)input->len; i ++) {
if (i - beg >= SHINGLES_WINDOW || i == (gint)input->len) {
for (j = beg; j < i; j ++) {
- word = &g_array_index (input, rspamd_ftok_t, j);
+ word = &g_array_index (input, rspamd_stat_token_t, j);
row = rspamd_fstring_append (row, word->begin, word->len);
}
res[j * SHINGLES_WINDOW + k + 1];
}
- word = &g_array_index (input, rspamd_ftok_t, beg);
+ word = &g_array_index (input, rspamd_stat_token_t, beg);
/* Insert the last element to the pipe */
memcpy (&seed, keys[j], sizeof (seed));
res[j * SHINGLES_WINDOW + SHINGLES_WINDOW - 1] =
}
}
- msg_debug_chartable ("word %T, badness: %.2f", w, badness);
+ msg_debug_chartable ("word %*s, badness: %.2f", (gint)w->len, w->begin,
+ badness);
return badness;
}
badness = 4.0;
}
- msg_debug_chartable ("word %T, badness: %.2f", w, badness);
+ msg_debug_chartable ("word %*s, badness: %.2f", (gint)w->len, w->begin,
+ badness);
return badness;
}