diff options
author | Lukas Fleischer <calcurse@cryptocrack.de> | 2014-08-06 09:26:46 +0200 |
---|---|---|
committer | Lukas Fleischer <calcurse@cryptocrack.de> | 2014-08-06 12:08:14 +0200 |
commit | 9ce586146825200c819662ea8dcb44cc03d2cd53 (patch) | |
tree | ca9e9db902574de4da0eb2155d9020b73c695699 /src/apoint.c | |
parent | bfe73d0e5d66c43006a8a0dd8d58e311432bcb57 (diff) | |
download | calcurse-9ce586146825200c819662ea8dcb44cc03d2cd53.zip |
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>
Diffstat (limited to 'src/apoint.c')
-rw-r--r-- | src/apoint.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/apoint.c b/src/apoint.c index 9bdd575..3c32c04 100644 --- a/src/apoint.c +++ b/src/apoint.c @@ -198,6 +198,8 @@ struct apoint *apoint_scan(FILE * f, struct tm start, struct tm end, if (filter) { if (!(filter->type_mask & TYPE_MASK_APPT)) return NULL; + if (filter->regex && regexec(filter->regex, buf, 0, 0, 0)) + return NULL; if (filter->start_from >= 0 && tstart < filter->start_from) return NULL; if (filter->start_to >= 0 && tstart > filter->start_to) |