From 56e89c9a557cd1182001a8b1130d7f10f40cc96a Mon Sep 17 00:00:00 2001 From: Christian Neukirchen Date: Tue, 2 Aug 2016 16:02:46 +0200 Subject: magrep: search message flags if header is empty --- magrep.c | 7 +++++++ 1 file changed, 7 insertions(+) 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++; -- cgit 1.4.1