summaryrefslogtreecommitdiffstats
path: root/src/diff.h
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rambler-co.ru>2012-10-12 18:43:07 +0400
committerVsevolod Stakhov <vsevolod@rambler-co.ru>2012-10-12 18:43:07 +0400
commit9c867f8a27255ec15a87675f0bd037fddb30a440 (patch)
tree1d06dfe40fe5eb82c2a5e53c2438eb40572a7797 /src/diff.h
parentaa7c8f99ba4860a3cbf2153026cb91f6053fc66c (diff)
downloadrspamd-9c867f8a27255ec15a87675f0bd037fddb30a440.tar.gz
rspamd-9c867f8a27255ec15a87675f0bd037fddb30a440.zip
Forgot in previous commit.
Diffstat (limited to 'src/diff.h')
-rw-r--r--src/diff.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/diff.h b/src/diff.h
index e10fe943d..cea5e5d4a 100644
--- a/src/diff.h
+++ b/src/diff.h
@@ -64,4 +64,11 @@ gint rspamd_diff(const void *a, gint aoff, gint n, const void *b, gint boff, gin
*/
guint32 compare_diff_distance (f_str_t *s1, f_str_t *s2);
+/*
+ * Calculate distance between two strings (in percentage) using diff algorithm. Strings are normalized before:
+ * all spaces are removed and all characters are lowercased.
+ * @return 100 in case of identical strings and 0 in case of totally different strings.
+*/
+guint32 compare_diff_distance_normalized (f_str_t *s1, f_str_t *s2);
+
#endif /* DIFF_H_ */