23#ifndef MUTT_PATTERN_PRIVATE_H
24#define MUTT_PATTERN_PRIVATE_H
100#define RANGE_NUM_RX "([[:digit:]]+|0x[[:xdigit:]]+)[MmKk]?"
101#define RANGE_REL_SLOT_RX "[[:blank:]]*([.^$]|-?" RANGE_NUM_RX ")?[[:blank:]]*"
102#define RANGE_REL_RX "^" RANGE_REL_SLOT_RX "," RANGE_REL_SLOT_RX
105#define RANGE_ABS_SLOT_RX "[[:blank:]]*([.^$]|" RANGE_NUM_RX ")?[[:blank:]]*"
106#define RANGE_ABS_RX "^" RANGE_ABS_SLOT_RX "-" RANGE_ABS_SLOT_RX
109#define RANGE_LT_RX "^()[[:blank:]]*(<[[:blank:]]*" RANGE_NUM_RX ")[[:blank:]]*"
110#define RANGE_GT_RX "^()[[:blank:]]*(>[[:blank:]]*" RANGE_NUM_RX ")[[:blank:]]*"
113#define RANGE_BARE_RX "^[[:blank:]]*([.^$]|" RANGE_NUM_RX ")[[:blank:]]*"
114#define RANGE_RX_GROUPS 5
117#define RANGE_CIRCUM '^'
118#define RANGE_DOLLAR '$'
141#define MUTT_MAXRANGE -1
Structs that make up an email.
bool eat_message_range(struct Pattern *pat, PatternCompFlags flags, struct Buffer *s, struct Buffer *err, struct MailboxView *mv)
Parse a range of message numbers - Implements eat_arg_t -.
Convenience wrapper for the library headers.
uint8_t PatternCompFlags
Flags for mutt_pattern_comp(), e.g. MUTT_PC_FULL_MSG.
RangeSide
Which side of the range.
@ RANGE_S_LEFT
Left side of range.
@ RANGE_S_RIGHT
Right side of range.
bool eval_date_minmax(struct Pattern *pat, const char *s, struct Buffer *err)
Evaluate a date-range pattern against 'now'.
ExpandoDataPattern
Expando UIDs for Patterns.
@ ED_PAT_DESCRIPTION
PatternEntry.desc.
@ ED_PAT_EXPRESSION
PatternEntry.expr.
@ ED_PAT_NUMBER
PatternEntry.num.
PatternEat
Function to process pattern arguments.
@ EAT_NONE
No arguments required.
@ EAT_RANGE
Process a number (range)
@ EAT_MESSAGE_RANGE
Process a message number (range)
@ EAT_DATE
Process a date (range)
@ EAT_QUERY
Process a query string.
@ EAT_REGEX
Process a regex.
const struct PatternFlags Flags[]
Lookup table for all patterns.
const struct PatternFlags * lookup_tag(char tag)
Lookup a pattern modifier.
struct RangeRegex RangeRegexes[]
Set of Regexes for various range types.
const struct PatternFlags * lookup_op(int op)
Lookup the Pattern Flags for an op.
static int email_msgno(struct Email *e)
Helper to get the Email's message number.
@ RANGE_K_REL
Relative range.
@ RANGE_K_ABS
Absolute range.
@ RANGE_K_LT
Less-than range.
@ RANGE_K_INVALID
Range is invalid.
@ RANGE_K_BARE
Single symbol.
@ RANGE_K_GT
Greater-than range.
String manipulation buffer.
The envelope/body of an email.
int msgno
Number displayed to the user.
Mapping between user character and internal constant.
enum PatternEat eat_arg
Type of function needed to parse flag, e.g. EAT_DATE.
char tag
Character used to represent this operation, e.g. 'A' for '~A'.
char * desc
Description of flag.
PatternCompFlags flags
Pattern flags, e.g. MUTT_PC_FULL_MSG.
int op
Operation to perform, e.g. MUTT_PAT_SCORE.
A simple (non-regex) pattern.
Regular expression representing a range.
int lgrp
Paren group matching the left side.
int rgrp
Paren group matching the right side.
regex_t cooked
Compiled form.
const char * raw
Regex as string.