Shared constants/structs that are private to libpattern. More...
Go to the source code of this file.
Data Structures | |
struct | PatternFlags |
Mapping between user character and internal constant. More... | |
struct | RangeRegex |
Regular expression representing a range. More... | |
Macros | |
#define | RANGE_NUM_RX "([[:digit:]]+|0x[[:xdigit:]]+)[MmKk]?" |
#define | RANGE_REL_SLOT_RX "[[:blank:]]*([.^$]|-?" RANGE_NUM_RX ")?[[:blank:]]*" |
#define | RANGE_REL_RX "^" RANGE_REL_SLOT_RX "," RANGE_REL_SLOT_RX |
#define | RANGE_ABS_SLOT_RX "[[:blank:]]*([.^$]|" RANGE_NUM_RX ")?[[:blank:]]*" |
#define | RANGE_ABS_RX "^" RANGE_ABS_SLOT_RX "-" RANGE_ABS_SLOT_RX |
#define | RANGE_LT_RX "^()[[:blank:]]*(<[[:blank:]]*" RANGE_NUM_RX ")[[:blank:]]*" |
#define | RANGE_GT_RX "^()[[:blank:]]*(>[[:blank:]]*" RANGE_NUM_RX ")[[:blank:]]*" |
#define | RANGE_BARE_RX "^[[:blank:]]*([.^$]|" RANGE_NUM_RX ")[[:blank:]]*" |
#define | RANGE_RX_GROUPS 5 |
#define | RANGE_DOT '.' |
#define | RANGE_CIRCUM '^' |
#define | RANGE_DOLLAR '$' |
#define | RANGE_LT '<' |
#define | RANGE_GT '>' |
#define | MUTT_MAXRANGE -1 |
Enumerations | |
enum | ExpandoDataPattern { ED_PAT_DESCRIPTION = 1 , ED_PAT_EXPRESION , ED_PAT_NUMBER } |
Expando UIDs for Patterns. More... | |
enum | PatternEat { EAT_NONE , EAT_REGEX , EAT_DATE , EAT_RANGE , EAT_MESSAGE_RANGE , EAT_QUERY } |
Function to process pattern arguments. More... | |
enum | RangeType { RANGE_K_REL , RANGE_K_ABS , RANGE_K_LT , RANGE_K_GT , RANGE_K_BARE , RANGE_K_INVALID } |
Type of range. More... | |
enum | RangeSide { RANGE_S_LEFT , RANGE_S_RIGHT } |
Which side of the range. More... | |
Functions | |
static int | email_msgno (struct Email *e) |
Helper to get the Email's message number. | |
const struct PatternFlags * | lookup_op (int op) |
Lookup the Pattern Flags for an op. | |
const struct PatternFlags * | lookup_tag (char tag) |
Lookup a pattern modifier. | |
bool | eval_date_minmax (struct Pattern *pat, const char *s, struct Buffer *err) |
Evaluate a date-range pattern against 'now'. | |
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 -. | |
Variables | |
struct RangeRegex | RangeRegexes [] |
Set of Regexes for various range types. | |
const struct PatternFlags | Flags [] |
Lookup table for all patterns. | |
Shared constants/structs that are private to libpattern.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.
Definition in file private.h.
#define RANGE_NUM_RX "([[:digit:]]+|0x[[:xdigit:]]+)[MmKk]?" |
#define RANGE_REL_SLOT_RX "[[:blank:]]*([.^$]|-?" RANGE_NUM_RX ")?[[:blank:]]*" |
#define RANGE_REL_RX "^" RANGE_REL_SLOT_RX "," RANGE_REL_SLOT_RX |
#define RANGE_ABS_SLOT_RX "[[:blank:]]*([.^$]|" RANGE_NUM_RX ")?[[:blank:]]*" |
#define RANGE_ABS_RX "^" RANGE_ABS_SLOT_RX "-" RANGE_ABS_SLOT_RX |
#define RANGE_LT_RX "^()[[:blank:]]*(<[[:blank:]]*" RANGE_NUM_RX ")[[:blank:]]*" |
#define RANGE_GT_RX "^()[[:blank:]]*(>[[:blank:]]*" RANGE_NUM_RX ")[[:blank:]]*" |
#define RANGE_BARE_RX "^[[:blank:]]*([.^$]|" RANGE_NUM_RX ")[[:blank:]]*" |
enum ExpandoDataPattern |
Expando UIDs for Patterns.
Enumerator | |
---|---|
ED_PAT_DESCRIPTION | |
ED_PAT_EXPRESION | |
ED_PAT_NUMBER |
enum PatternEat |
Function to process pattern arguments.
Values for PatternFlags.eat_arg
enum RangeType |
Type of range.
Enumerator | |
---|---|
RANGE_K_REL | Relative range. |
RANGE_K_ABS | Absolute range. |
RANGE_K_LT | Less-than range. |
RANGE_K_GT | Greater-than range. |
RANGE_K_BARE | Single symbol. |
RANGE_K_INVALID | Range is invalid. |
Definition at line 88 of file private.h.
enum RangeSide |
Which side of the range.
Enumerator | |
---|---|
RANGE_S_LEFT | Left side of range. |
RANGE_S_RIGHT | Right side of range. |
|
inlinestatic |
const struct PatternFlags * lookup_op | ( | int | op | ) |
Lookup the Pattern Flags for an op.
op | Operation, e.g. MUTT_PAT_SENDER |
ptr | PatternFlags |
Definition at line 211 of file flags.c.
const struct PatternFlags * lookup_tag | ( | char | tag | ) |
Evaluate a date-range pattern against 'now'.
Definition at line 496 of file compile.c.
|
extern |
|
extern |