aboutsummaryrefslogtreecommitdiffstats
path: root/src/tokenizers/tokenizers.h
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2014-07-23 12:45:28 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2014-07-23 12:45:28 +0100
commite0483657ff6cf1adc828ccce457814d61fe90a0d (patch)
tree5183e4163f40b81b3e7d5f51488d360883782154 /src/tokenizers/tokenizers.h
parent7962087e808fb824aa3af6d41d02abc92916ba1e (diff)
downloadrspamd-e0483657ff6cf1adc828ccce457814d61fe90a0d.tar.gz
rspamd-e0483657ff6cf1adc828ccce457814d61fe90a0d.zip
Unify code style.
Diffstat (limited to 'src/tokenizers/tokenizers.h')
-rw-r--r--src/tokenizers/tokenizers.h26
1 files changed, 17 insertions, 9 deletions
diff --git a/src/tokenizers/tokenizers.h b/src/tokenizers/tokenizers.h
index 207602dc8..ce056377b 100644
--- a/src/tokenizers/tokenizers.h
+++ b/src/tokenizers/tokenizers.h
@@ -2,9 +2,9 @@
#define TOKENIZERS_H
#include "config.h"
-#include "mem_pool.h"
#include "fstring.h"
#include "main.h"
+#include "mem_pool.h"
/* Size for features pipe */
#define FEATURE_WINDOW_SIZE 5
@@ -19,22 +19,30 @@ typedef struct token_node_s {
/* Common tokenizer structure */
struct tokenizer {
gchar *name;
- gint (*tokenize_func)(struct tokenizer *tokenizer, rspamd_mempool_t *pool, f_str_t *input,
- GTree **cur, gboolean save_token, gboolean is_utf, GList *exceptions);
- gchar* (*get_next_word)(f_str_t *buf, f_str_t *token, GList **exceptions);
+ gint (*tokenize_func)(struct tokenizer *tokenizer, rspamd_mempool_t *pool,
+ f_str_t *input,
+ GTree **cur, gboolean save_token, gboolean is_utf, GList *exceptions);
+ gchar * (*get_next_word)(f_str_t *buf, f_str_t *token, GList **exceptions);
};
/* Compare two token nodes */
int token_node_compare_func (gconstpointer a, gconstpointer b);
/* Get tokenizer structure by name or return NULL if this name is not found */
-struct tokenizer* get_tokenizer (const char *name);
+struct tokenizer * get_tokenizer (const char *name);
/* Get next word from specified f_str_t buf */
-gchar* get_next_word (f_str_t *buf, f_str_t *token, GList **exceptions);
+gchar * get_next_word (f_str_t *buf, f_str_t *token, GList **exceptions);
/* OSB tokenize function */
-int osb_tokenize_text (struct tokenizer *tokenizer, rspamd_mempool_t *pool, f_str_t *input,
- GTree **cur, gboolean save_token, gboolean is_utf, GList *exceptions);
+int osb_tokenize_text (struct tokenizer *tokenizer,
+ rspamd_mempool_t *pool,
+ f_str_t *input,
+ GTree **cur,
+ gboolean save_token,
+ gboolean is_utf,
+ GList *exceptions);
/* Common tokenizer for headers */
-int tokenize_headers (rspamd_mempool_t *pool, struct rspamd_task *task, GTree **cur);
+int tokenize_headers (rspamd_mempool_t *pool,
+ struct rspamd_task *task,
+ GTree **cur);
/* Make tokens for a subject */
void tokenize_subject (struct rspamd_task *task, GTree ** tree);