54 struct PatternList *
pat;
103 struct Score *ptr = NULL, *last = NULL;
104 char *pattern = NULL, *pc = NULL;
124 for (ptr =
ScoreList, last = NULL; ptr; last = ptr, ptr = ptr->
next)
160 if (!mutt_str_atoi_full(pc, &ptr->
val))
162 buf_strcpy(err,
_(
"Error: score: invalid number"));
183 struct Score *tmp = NULL;
191 if (tmp->
exact || (tmp->
val == 9999) || (tmp->
val == -9999))
206 if (e->
score <= c_score_threshold_delete)
208 if (e->
score <= c_score_threshold_read)
210 if (e->
score >= c_score_threshold_flag)
229 struct Score *tmp = NULL, *last = NULL;
253 last->next = tmp->next;
int buf_printf(struct Buffer *buf, const char *fmt,...)
Format a string overwriting a Buffer.
size_t buf_strcpy(struct Buffer *buf, const char *s)
Copy a string into a Buffer.
char * buf_strdup(const struct Buffer *buf)
Copy a Buffer's string.
static const char * buf_string(const struct Buffer *buf)
Convert a buffer to a const char * "string".
CommandResult
Error codes for command_t parse functions.
@ MUTT_CMD_SUCCESS
Success: Command worked.
@ MUTT_CMD_ERROR
Error: Can't help the user.
@ MUTT_CMD_WARNING
Warning: Help given to the user.
struct PatternList * mutt_pattern_comp(struct MailboxView *mv, const char *s, PatternCompFlags flags, struct Buffer *err)
Create a Pattern.
void mutt_pattern_free(struct PatternList **pat)
Free a Pattern.
short cs_subset_number(const struct ConfigSubset *sub, const char *name)
Get a number config item by name.
bool cs_subset_bool(const struct ConfigSubset *sub, const char *name)
Get a boolean config item by name.
short cs_subset_sort(const struct ConfigSubset *sub, const char *name)
Get a sort config item by name.
Convenience wrapper for the config headers.
#define SORT_MASK
Mask for the sort id.
Convenience wrapper for the core headers.
Structs that make up an email.
bool OptNeedRescore
(pseudo) set when the 'score' command is used
bool OptNeedResort
(pseudo) used to force a re-sort
EmailSortType
Methods for sorting Emails.
@ EMAIL_SORT_SCORE
Sort by the email's score.
bool mutt_pattern_exec(struct Pattern *pat, PatternExecFlags flags, struct Mailbox *m, struct Email *e, struct PatternCache *cache)
Match a pattern against an email header.
void mutt_set_flag(struct Mailbox *m, struct Email *e, enum MessageType flag, bool bf, bool upd_mbox)
Set a flag on an email.
bool OptSortSubthreads
(pseudo) used when $sort_aux changes
enum CommandResult parse_unscore(const struct Command *cmd, struct Buffer *line, struct Buffer *err)
Parse the 'unscore' command - Implements Command::parse() -.
enum CommandResult parse_score(const struct Command *cmd, struct Buffer *line, struct Buffer *err)
Parse the 'score' command - Implements Command::parse() -.
#define mutt_debug(LEVEL,...)
GUI manage the main index (list of emails)
struct MailboxView * get_current_mailbox_view(void)
Get the current Mailbox view.
@ LL_NOTIFY
Log of notifications.
#define MUTT_MEM_CALLOC(n, type)
Convenience wrapper for the library headers.
bool notify_send(struct Notify *notify, enum NotifyType event_type, int event_subtype, void *event_data)
Send out a notification message.
bool mutt_str_equal(const char *a, const char *b)
Compare two strings.
Many unsorted constants and some structs.
@ MUTT_READ
Messages that have been read.
@ MUTT_FLAG
Flagged messages.
@ MUTT_DELETE
Messages to be deleted.
Create/manipulate threading in emails.
#define mutt_using_threads()
@ NT_SCORE
Email scoring has changed.
Match patterns to emails.
#define MUTT_PC_NO_FLAGS
No flags are set.
#define MUTT_MATCH_FULL_ADDRESS
Match the full address.
struct Buffer * buf_pool_get(void)
Get a Buffer from the pool.
void buf_pool_release(struct Buffer **ptr)
Return a Buffer to the pool.
Prototypes for many functions.
#define SLIST_FIRST(head)
void mutt_check_rescore(struct Mailbox *m)
Do the emails need to have their scores recalculated?
static struct Score * ScoreList
Linked list of email scoring rules.
void mutt_score_message(struct Mailbox *m, struct Email *e, bool upd_mbox)
Apply scoring to an email.
Routines for adding user scores to emails.
String manipulation buffer.
char * data
Pointer to data.
const char * name
Name of the command.
The envelope/body of an email.
Container for Accounts, Notifications.
struct ConfigSubset * sub
Inherited config items.
Cache commonly-used patterns.
bool exact
If this rule matches, don't evaluate any more.
struct Score * next
Linked list.