From eeeb7a6e53ae54b795f47131bf36227d6fd3fe87 Mon Sep 17 00:00:00 2001 From: Quentin Rameau Date: Tue, 5 Jan 2016 14:52:46 +0100 Subject: [PATCH] grep: make E and F flags mutually exclusive Don't make F the priority flag when both E and F are given, instead use the last one. --- grep.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/grep.c b/grep.c index ca255ff..9f4093c 100644 --- a/grep.c +++ b/grep.c @@ -183,10 +183,13 @@ main(int argc, char *argv[]) ARGBEGIN { case 'E': Eflag = 1; + Fflag = 0; flags |= REG_EXTENDED; break; case 'F': Fflag = 1; + Eflag = 0; + flags &= ~REG_EXTENDED; break; case 'H': Hflag = 1;