Add pattern filter option

This adds a new item filter option --filter-pattern and removes the
whole -S parameter logic, while making -S an alias for --filter-pattern.

Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
This commit is contained in:
Lukas Fleischer
2014-08-06 09:26:46 +02:00
parent bfe73d0e5d
commit 9ce5861468
6 changed files with 51 additions and 56 deletions

View File

@@ -394,6 +394,7 @@ enum day_item_type {
/* Filter settings. */
struct item_filter {
int type_mask;
regex_t *regex;
long start_from;
long start_to;
long end_from;
@@ -722,7 +723,7 @@ long day_item_get_duration(struct day_item *);
int day_item_get_state(struct day_item *);
void day_item_add_exc(struct day_item *, long);
void day_item_fork(struct day_item *, struct day_item *);
void day_store_items(long, regex_t *, int);
void day_store_items(long, int);
void day_process_storage(struct date *, unsigned);
void day_display_item_date(struct day_item *, WINDOW *, int, long, int, int);
void day_display_item(struct day_item *, WINDOW *, int, int, int, int);