aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Neukirchen <chneukirchen@gmail.com>2016-08-02 16:02:46 +0200
committerChristian Neukirchen <chneukirchen@gmail.com>2016-08-02 16:02:46 +0200
commit56e89c9a557cd1182001a8b1130d7f10f40cc96a (patch)
tree9d1f1d3cb85e82de66de979fdf0e68b67aca49ba
parentc99944cbc52cdd0770d3e1851e7a2ddbd0fe06c1 (diff)
downloadmblaze-56e89c9a557cd1182001a8b1130d7f10f40cc96a.tar.gz
magrep: search message flags if header is empty
-rw-r--r--magrep.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/magrep.c b/magrep.c
index 7b6a7a4..0c53c9f 100644
--- a/magrep.c
+++ b/magrep.c
@@ -40,6 +40,13 @@ match(char *file, char *s)
void
magrep(char *file)
{
+ if (!*header) {
+ char *flags = strstr(file, ":2,");
+ if (flags)
+ match(file, flags+3);
+ return;
+ }
+
char *filename = file;
while (*filename == ' ' || *filename == '\t')
filename++;