Go to the documentation of this file.
59 struct PatternList *
pat;
86 for (
int i = 0; m && i < m->
msg_count; i++)
103 intptr_t data,
struct Buffer *err)
105 struct Score *ptr = NULL, *last = NULL;
106 char *pattern = NULL, *pc = NULL;
125 for (ptr =
ScoreList, last = NULL; ptr; last = ptr, ptr = ptr->
next)
175 struct Score *tmp = NULL;
183 if (tmp->
exact || (tmp->
val == 9999) || (tmp->
val == -9999))
206 intptr_t data,
struct Buffer *err)
208 struct Score *tmp = NULL, *last = NULL;
struct PatternList * mutt_pattern_comp(struct Context *ctx, const char *s, PatternCompFlags flags, struct Buffer *err)
Create a Pattern.
enum CommandResult mutt_parse_unscore(struct Buffer *buf, struct Buffer *s, intptr_t data, struct Buffer *err)
Parse the 'unscore' command - Implements Command::parse()
@ MUTT_FLAG
Flagged messages.
short C_ScoreThresholdDelete
Config: Messages with a lower score will be automatically deleted.
void * mutt_mem_calloc(size_t nmemb, size_t size)
Allocate zeroed memory on the heap.
@ SORT_THREADS
Sort by email threads.
WHERE bool OptNeedResort
(pseudo) used to force a re-sort
struct Email ** emails
Array of Emails.
void mutt_pattern_free(struct PatternList **pat)
Free a Pattern.
String manipulation buffer.
int 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_check_rescore(struct Mailbox *m)
Do the emails need to have their scores recalculated?
#define MUTT_TOKEN_NO_FLAGS
No flags are set.
void mutt_score_message(struct Mailbox *m, struct Email *e, bool upd_mbox)
Apply scoring to an email.
#define MUTT_MATCH_FULL_ADDRESS
Match the full address.
#define SORT_MASK
Mask for the sort id.
enum CommandResult mutt_parse_score(struct Buffer *buf, struct Buffer *s, intptr_t data, struct Buffer *err)
Parse the 'score' command - Implements Command::parse()
#define MUTT_PC_NO_FLAGS
No flags are set.
int mutt_str_atoi(const char *str, int *dst)
Convert ASCII string to an integer.
void mutt_set_flag_update(struct Mailbox *m, struct Email *e, enum MessageType flag, bool bf, bool upd_mbox)
Set a flag on an email.
short C_ScoreThresholdFlag
Config: Messages with a greater score will be automatically flagged.
WHERE bool OptNeedRescore
(pseudo) set when the 'score' command is used
@ MUTT_READ
Messages that have been read.
bool mutt_str_equal(const char *a, const char *b)
Compare two strings.
WHERE bool C_Score
Config: Use message scoring.
int mutt_extract_token(struct Buffer *dest, struct Buffer *tok, TokenFlags flags)
Extract one token from a string.
bool exact
if this rule matches, don't evaluate any more
short C_ScoreThresholdRead
Config: Messages with a lower score will be automatically marked read.
static struct Score * ScoreList
@ SORT_SCORE
Sort by the email's score.
int msg_count
Total number of messages.
@ MUTT_CMD_SUCCESS
Success: Command worked.
@ MUTT_CMD_ERROR
Error: Can't help the user.
#define SLIST_FIRST(head)
CommandResult
Error codes for command_t parse functions.
@ MUTT_CMD_WARNING
Warning: Help given to the user.
@ MUTT_DELETE
Messages to be deleted.
WHERE short C_Sort
Config: Sort method for the index.
@ MENU_MAIN
Index panel (list of emails)
WHERE bool OptSortSubthreads
(pseudo) used when $sort_aux changes
char * mutt_buffer_strdup(const struct Buffer *buf)
Copy a Buffer's string.
char * data
Pointer to data.
The envelope/body of an email.
WHERE short C_SortAux
Config: Secondary sort method for the index.
int mutt_buffer_printf(struct Buffer *buf, const char *fmt,...)
Format a string overwriting a Buffer.
@ MENU_PAGER
Pager pager (email viewer)
size_t mutt_buffer_strcpy(struct Buffer *buf, const char *s)
Copy a string into a Buffer.
Cache commonly-used patterns.
int pair
Color-pair to use when displaying in the index.