127 regfree(&rcol->
regex);
238 bool sensitive,
struct AttrColor *ac_val,
239 struct Buffer *err,
bool is_index,
int match)
334 bool sensitive =
false;
335 bool is_index =
false;
365 *rc =
add_pattern(rcl, pat, sensitive, ac, err, is_index, 0);
void attr_color_overwrite(struct AttrColor *ac_old, struct AttrColor *ac_new)
Update an AttrColor in-place.
void attr_color_clear(struct AttrColor *ac)
Free the contents of an AttrColor.
size_t buf_strcpy(struct Buffer *buf, const char *s)
Copy a string into a Buffer.
void get_colorid_name(unsigned int cid, struct Buffer *buf)
Get the name of a color id.
struct Notify * ColorsNotify
Notifications: ColorId, EventColor.
struct RegexColorList IndexCollapsedList
List of colours applied to a collapsed thread in the index.
struct RegexColorList IndexFlagsList
List of colours applied to the flags in the index.
struct RegexColorList IndexAuthorList
List of colours applied to the author in the index.
struct RegexColorList IndexSubjectList
List of colours applied to the subject in the index.
struct RegexColorList IndexLabelList
List of colours applied to the label in the index.
struct RegexColorList * regex_colors_get_list(enum ColorId cid)
Return the RegexColorList for a colour id.
int regex_colors_parse_status_list(enum ColorId cid, const char *pat, struct AttrColor *ac, int match, struct Buffer *err)
Parse a Regex 'color status' command.
bool regex_colors_parse_color_list(enum ColorId cid, const char *pat, struct AttrColor *ac, int *rc, struct Buffer *err)
Parse a Regex 'color' command.
struct RegexColorList StatusList
List of colours applied to the status bar.
void regex_colors_init(void)
Initialise the Regex colours.
struct RegexColorList IndexList
List of default colours applied to the index.
void regex_color_free(struct RegexColorList *list, struct RegexColor **ptr)
Free a Regex colour.
struct RegexColorList IndexTagList
List of colours applied to tags in the index.
struct RegexColorList BodyList
List of colours applied to the email body.
struct RegexColorList IndexTagsList
List of colours applied to the tags in the index.
bool regex_colors_parse_uncolor(enum ColorId cid, const char *pat, bool uncolor)
Parse a Regex 'uncolor' command.
struct RegexColorList HeaderList
List of colours applied to the email headers.
struct RegexColorList AttachList
List of colours applied to the attachment headers.
void regex_colors_cleanup(void)
Clear the Regex colours.
struct RegexColorList IndexDateList
List of colours applied to the date in the index.
struct RegexColor * regex_color_new(void)
Create a new RegexColor.
struct RegexColorList IndexNumberList
List of colours applied to the message number in the index.
void regex_color_list_clear(struct RegexColorList *rcl)
Free the contents of a RegexColorList.
struct RegexColorList IndexSizeList
List of colours applied to the size in the index.
static enum CommandResult add_pattern(struct RegexColorList *rcl, const char *s, bool sensitive, struct AttrColor *ac_val, struct Buffer *err, bool is_index, int match)
Associate a colour to a pattern.
void regex_color_clear(struct RegexColor *rcol)
Free the contents of a Regex colour.
Color and attribute parsing.
ColorId
List of all colored objects.
@ MT_COLOR_INDEX_AUTHOR
Index: author field.
@ MT_COLOR_HEADER
Message headers (takes a pattern)
@ MT_COLOR_STATUS
Status bar (takes a pattern)
@ MT_COLOR_INDEX_SIZE
Index: size field.
@ MT_COLOR_INDEX_TAGS
Index: tags field (g, J)
@ MT_COLOR_INDEX_SUBJECT
Index: subject field.
@ MT_COLOR_BODY
Pager: highlight body of message (takes a pattern)
@ MT_COLOR_INDEX_DATE
Index: date field.
@ MT_COLOR_INDEX_TAG
Index: tag field (G)
@ MT_COLOR_ATTACH_HEADERS
MIME attachment test (takes a pattern)
@ MT_COLOR_INDEX_LABEL
Index: label field.
@ MT_COLOR_INDEX
Index: default colour.
@ MT_COLOR_INDEX_NUMBER
Index: index number.
@ MT_COLOR_INDEX_FLAGS
Index: flags field.
@ MT_COLOR_INDEX_COLLAPSED
Index: number of messages in collapsed thread.
CommandResult
Error codes for command_t parse functions.
@ MUTT_CMD_SUCCESS
Success: Command worked.
@ MUTT_CMD_ERROR
Error: Can't help the user.
struct PatternList * mutt_pattern_comp(struct MailboxView *mv, struct Menu *menu, const char *s, PatternCompFlags flags, struct Buffer *err)
Create a Pattern.
void mutt_pattern_free(struct PatternList **pat)
Free a Pattern.
const char * cs_subset_string(const struct ConfigSubset *sub, const char *name)
Get a string config item by name.
Convenience wrapper for the config headers.
Convenience wrapper for the core headers.
static int color_debug(enum LogLevel level, const char *format,...)
#define mutt_debug(LEVEL,...)
GUI manage the main index (list of emails)
struct MailboxView * get_current_mailbox_view(void)
Get the current Mailbox view.
struct Menu * get_current_menu(void)
Get the current Menu.
@ LL_DEBUG5
Log at debug level 5.
@ LL_DEBUG1
Log at debug level 1.
@ LL_NOTIFY
Log of notifications.
bool mutt_mb_is_lower(const char *s)
Does a multi-byte string contain only lowercase characters?
void * mutt_mem_calloc(size_t nmemb, size_t size)
Allocate zeroed memory on the heap.
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_istr_equal(const char *a, const char *b)
Compare two strings, ignoring case.
char * mutt_str_dup(const char *str)
Copy a string, safely.
bool mutt_str_equal(const char *a, const char *b)
Compare two strings.
@ NT_COLOR_RESET
Color has been reset/removed.
@ NT_COLOR_SET
Color has been set.
@ NT_COLOR
Colour has changed, NotifyColor, EventColor.
Match patterns to emails.
#define MUTT_PC_FULL_MSG
Enable body and header matching.
void mutt_check_simple(struct Buffer *s, const char *simple)
Convert a simple search into a real request.
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.
#define STAILQ_REMOVE_HEAD(head, field)
#define STAILQ_REMOVE(head, elm, type, field)
#define STAILQ_INIT(head)
#define STAILQ_REMOVE_AFTER(head, elm, field)
#define STAILQ_FOREACH(var, head, field)
#define STAILQ_INSERT_TAIL(head, elm, field)
#define STAILQ_EMPTY(head)
#define STAILQ_FOREACH_SAFE(var, head, field, tvar)
#define REG_COMP(preg, regex, cflags)
Compile a regular expression.
A curses colour and its attributes.
String manipulation buffer.
size_t dsize
Length of data.
char * data
Pointer to data.
An Event that happened to a Colour.
enum ColorId cid
Colour ID that has changed.
Container for Accounts, Notifications.
struct ConfigSubset * sub
Inherited config items.
A regular expression and a color to highlight a line.
regex_t regex
Compiled regex.
struct PatternList * color_pattern
Compiled pattern to speed up index color calculation.
struct AttrColor attr_color
Colour and attributes to apply.
char * pattern
Pattern to match.
bool stop_matching
Used by the pager for body patterns, to prevent the color from being retried once it fails.
int match
Substring to match, 0 for old behaviour.