diff options
author | Vsevolod Stakhov <vsevolod@rspamd.com> | 2023-07-26 10:49:23 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rspamd.com> | 2023-07-26 10:49:23 +0100 |
commit | 537a7180a0d5132c11636c4fd8b1450cd99d352c (patch) | |
tree | fb9f8c84955a411bdffbd6371ea32f2716fb3687 /src/libstat/tokenizers/tokenizers.h | |
parent | 5fd7a90fdaa33f52c59bdb0ca84451e5c1e22365 (diff) | |
download | rspamd-537a7180a0d5132c11636c4fd8b1450cd99d352c.tar.gz rspamd-537a7180a0d5132c11636c4fd8b1450cd99d352c.zip |
[Rework] Use clang-format to unify formatting in all sources
No meaningful changes.
Diffstat (limited to 'src/libstat/tokenizers/tokenizers.h')
-rw-r--r-- | src/libstat/tokenizers/tokenizers.h | 68 |
1 files changed, 34 insertions, 34 deletions
diff --git a/src/libstat/tokenizers/tokenizers.h b/src/libstat/tokenizers/tokenizers.h index ca7261802..e908c359d 100644 --- a/src/libstat/tokenizers/tokenizers.h +++ b/src/libstat/tokenizers/tokenizers.h @@ -11,7 +11,7 @@ #define RSPAMD_DEFAULT_TOKENIZER "osb" -#ifdef __cplusplus +#ifdef __cplusplus extern "C" { #endif @@ -22,15 +22,15 @@ struct rspamd_stat_ctx; struct rspamd_stat_tokenizer { gchar *name; - gpointer (*get_config) (rspamd_mempool_t *pool, - struct rspamd_tokenizer_config *cf, gsize *len); + gpointer (*get_config)(rspamd_mempool_t *pool, + struct rspamd_tokenizer_config *cf, gsize *len); - gint (*tokenize_func) (struct rspamd_stat_ctx *ctx, - struct rspamd_task *task, - GArray *words, - gboolean is_utf, - const gchar *prefix, - GPtrArray *result); + gint (*tokenize_func)(struct rspamd_stat_ctx *ctx, + struct rspamd_task *task, + GArray *words, + gboolean is_utf, + const gchar *prefix, + GPtrArray *result); }; enum rspamd_tokenize_type { @@ -40,44 +40,44 @@ enum rspamd_tokenize_type { }; /* Compare two token nodes */ -gint token_node_compare_func (gconstpointer a, gconstpointer b); +gint token_node_compare_func(gconstpointer a, gconstpointer b); /* Tokenize text into array of words (rspamd_stat_token_t type) */ -GArray *rspamd_tokenize_text (const gchar *text, gsize len, - const UText *utxt, - enum rspamd_tokenize_type how, - struct rspamd_config *cfg, - GList *exceptions, - guint64 *hash, - GArray *cur_words, - rspamd_mempool_t *pool); +GArray *rspamd_tokenize_text(const gchar *text, gsize len, + const UText *utxt, + enum rspamd_tokenize_type how, + struct rspamd_config *cfg, + GList *exceptions, + guint64 *hash, + GArray *cur_words, + rspamd_mempool_t *pool); /* OSB tokenize function */ -gint rspamd_tokenizer_osb (struct rspamd_stat_ctx *ctx, - struct rspamd_task *task, - GArray *words, - gboolean is_utf, - const gchar *prefix, - GPtrArray *result); +gint rspamd_tokenizer_osb(struct rspamd_stat_ctx *ctx, + struct rspamd_task *task, + GArray *words, + gboolean is_utf, + const gchar *prefix, + GPtrArray *result); -gpointer rspamd_tokenizer_osb_get_config (rspamd_mempool_t *pool, - struct rspamd_tokenizer_config *cf, - gsize *len); +gpointer rspamd_tokenizer_osb_get_config(rspamd_mempool_t *pool, + struct rspamd_tokenizer_config *cf, + gsize *len); struct rspamd_lang_detector; -void rspamd_normalize_single_word (rspamd_stat_token_t *tok, rspamd_mempool_t *pool); +void rspamd_normalize_single_word(rspamd_stat_token_t *tok, rspamd_mempool_t *pool); -void rspamd_normalize_words (GArray *words, rspamd_mempool_t *pool); +void rspamd_normalize_words(GArray *words, rspamd_mempool_t *pool); -void rspamd_stem_words (GArray *words, rspamd_mempool_t *pool, - const gchar *language, - struct rspamd_lang_detector *d); +void rspamd_stem_words(GArray *words, rspamd_mempool_t *pool, + const gchar *language, + struct rspamd_lang_detector *d); -void rspamd_tokenize_meta_words (struct rspamd_task *task); +void rspamd_tokenize_meta_words(struct rspamd_task *task); -#ifdef __cplusplus +#ifdef __cplusplus } #endif |