NeoMutt
2025-12-11-1039-g550ac6
Teaching an old dog new tricks
DOXYGEN
Toggle main menu visibility
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
29
struct
Buffer
;
30
struct
Email
;
31
struct
ParseContext
;
32
struct
ParseError
;
33
37
struct
Score
38
{
39
char
*
str
;
40
struct
PatternList *
pat
;
41
int
val
;
42
bool
exact
;
43
struct
Score
*
next
;
44
};
45
46
void
score_list_free
(
struct
Score
**sp);
47
48
enum
CommandResult
parse_score
(
const
struct
Command
*cmd,
struct
Buffer
*line,
const
struct
ParseContext
*pc,
struct
ParseError
*pe);
49
enum
CommandResult
parse_unscore
(
const
struct
Command
*cmd,
struct
Buffer
*line,
const
struct
ParseContext
*pc,
struct
ParseError
*pe);
50
51
void
mutt_check_rescore
(
struct
Mailbox
*m);
52
void
mutt_score_message
(
struct
Mailbox
*m,
struct
Email
*e,
bool
upd_mbox);
53
54
#endif
/* MUTT_EMAIL_SCORE_H */
CommandResult
CommandResult
Error codes for command_t parse functions.
Definition
command.h:37
lib.h
Convenience wrapper for the core headers.
parse_unscore
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:168
parse_score
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:76
mutt_check_rescore
void mutt_check_rescore(struct Mailbox *m)
Do the emails need to have their scores recalculated?
Definition
score.c:219
mutt_score_message
void mutt_score_message(struct Mailbox *m, struct Email *e, bool upd_mbox)
Apply scoring to an email.
Definition
score.c:246
score_list_free
void score_list_free(struct Score **sp)
Free a list of scoring rules.
Definition
score.c:53
Buffer
String manipulation buffer.
Definition
buffer.h:36
Command
Definition
command.h:161
Email
The envelope/body of an email.
Definition
email.h:39
Mailbox
A mailbox.
Definition
mailbox.h:81
ParseContext
Context for config parsing (history/backtrace).
Definition
pcontext.h:34
ParseError
Detailed error information from config parsing.
Definition
perror.h:34
Score
Scoring rule for email.
Definition
score.h:38
Score::exact
bool exact
If this rule matches, don't evaluate any more.
Definition
score.h:42
Score::str
char * str
String to match.
Definition
score.h:39
Score::pat
struct PatternList * pat
Pattern to match.
Definition
score.h:40
Score::val
int val
Score to add.
Definition
score.h:41
Score::next
struct Score * next
Linked list.
Definition
score.h:43