Location of scorefile: $XDG_CONFIG_HOME/$CFG_NAME/scorefile
.
More...
Macros | |
#define | MAIN_ERR_PREFIX "FILTER: " |
Message prefix for FILTER module. | |
#define | FILTER_PERM (posix_mode_t) (POSIX_S_IRUSR | POSIX_S_IWUSR) |
Permissions for score file. | |
Functions | |
int | filter_init (int utf8) |
Initialize filter module. More... | |
void | filter_exit (void) |
Shutdown filter module. More... | |
int | filter_check_testgroup (const char *group) |
Check for test group. More... | |
int | filter_match_own (const struct core_hierarchy_element *he) |
Check for own article. More... | |
int | filter_match_reply_to_own (const struct core_hierarchy_element *he) |
Check for reply to own article. More... | |
int | filter_get_score (const struct core_hierarchy_element *he) |
Get article score. More... | |
enum filter_cs | filter_get_locale_ctype (void) |
Get codeset of locale category LC_CTYPE . More... | |
Score limits | |
Type must be | |
#define | FILTER_SCORE_MAX INT_MAX |
#define | FILTER_SCORE_MIN INT_MIN |
Location of scorefile: $XDG_CONFIG_HOME/$CFG_NAME/scorefile
.
Any line starting with #
is treated as a comment (not parsed and ignored). All other lines are parsed as rules with 4 colon-separated fields:
: (colon) is used as field separator, it is not allowed to use it in wildmats.Rules with unknown type are ignored.
int filter_check_testgroup | ( | const char * | group | ) |
void filter_exit | ( | void | ) |
Shutdown filter module.
Step 1:
Step 2 (only if CONF_SCORERC
is configured):
scorefile
to the location configured with CONF_SCORERC
Definition at line 1335 of file filter.c.
References CONF_SCORERC, config, data, conf_entry_val::s, and conf::val.
enum filter_cs filter_get_locale_ctype | ( | void | ) |
Get codeset of locale category LC_CTYPE
.
LC_CTYPE
Definition at line 1805 of file filter.c.
Referenced by core_convert_pathname_to_locale().
int filter_get_score | ( | const struct core_hierarchy_element * | he | ) |
int filter_init | ( | int | utf8 | ) |
Initialize filter module.
[in] | utf8 | Flag indicating that the locale use UTF-8 encoding |
Step1 (only if CONF_SCORERC
is configured):
scorefile
to scorefile.old
CONF_SCORERC
to scorefile
Step 2:
Definition at line 1047 of file filter.c.
References CONF_SCORERC, config, data, PRINT_ERROR, conf_entry_val::s, and conf::val.
int filter_match_own | ( | const struct core_hierarchy_element * | he | ) |
Check for own article.
[in] | he | Pointer to article hierarchy element |
The identity configuration is used as reference for matching.
Definition at line 1587 of file filter.c.
References CONF_FROM, CONF_REPLYTO, config, core_article_header::from, core_hierarchy_element::header, conf_entry_val::s, and conf::val.
Referenced by filter_match_reply_to_own().
int filter_match_reply_to_own | ( | const struct core_hierarchy_element * | he | ) |
Check for reply to own article.
[in] | he | Pointer to article hierarchy element |
Definition at line 1635 of file filter.c.
References filter_match_own(), core_hierarchy_element::header, core_article_header::msgid, core_hierarchy_element::parent, and core_article_header::refs.