NeoMutt  2025-12-11-435-g4ac674
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
score.h
Go to the documentation of this file.
1
22
23#ifndef MUTT_EMAIL_SCORE_H
24#define MUTT_EMAIL_SCORE_H
25
26#include <stdbool.h>
27#include "core/lib.h"
28
29struct Buffer;
30struct Email;
31struct ParseContext;
32struct ParseError;
33
37struct Score
38{
39 char *str;
40 struct PatternList *pat;
41 int val;
42 bool exact;
43 struct Score *next;
44};
45
46extern struct Score *ScoreList;
47
48enum CommandResult parse_score (const struct Command *cmd, struct Buffer *line, const struct ParseContext *pc, struct ParseError *pe);
49enum CommandResult parse_unscore(const struct Command *cmd, struct Buffer *line, const struct ParseContext *pc, struct ParseError *pe);
50
51void mutt_check_rescore(struct Mailbox *m);
52void mutt_score_message(struct Mailbox *m, struct Email *e, bool upd_mbox);
53
54#endif /* MUTT_EMAIL_SCORE_H */
CommandResult
Error codes for command_t parse functions.
Definition command.h:37
Convenience wrapper for the core headers.
enum CommandResult parse_unscore(const struct Command *cmd, struct Buffer *line, const struct ParseContext *pc, struct ParseError *pe)
Parse the 'unscore' command - Implements Command::parse() -.
Definition score.c:146
enum CommandResult parse_score(const struct Command *cmd, struct Buffer *line, const struct ParseContext *pc, struct ParseError *pe)
Parse the 'score' command - Implements Command::parse() -.
Definition score.c:57
struct Score * ScoreList
Linked list of email scoring rules.
Definition score.c:49
void mutt_check_rescore(struct Mailbox *m)
Do the emails need to have their scores recalculated?
Definition score.c:202
void mutt_score_message(struct Mailbox *m, struct Email *e, bool upd_mbox)
Apply scoring to an email.
Definition score.c:229
String manipulation buffer.
Definition buffer.h:36
The envelope/body of an email.
Definition email.h:39
A mailbox.
Definition mailbox.h:78
Context for config parsing (history/backtrace)
Definition pcontext.h:34
Detailed error information from config parsing.
Definition perror.h:34
Scoring rule for email.
Definition score.h:38
bool exact
If this rule matches, don't evaluate any more.
Definition score.h:42
char * str
String to match.
Definition score.h:39
struct PatternList * pat
Pattern to match.
Definition score.h:40
int val
Score to add.
Definition score.h:41
struct Score * next
Linked list.
Definition score.h:43