mirror of
https://github.com/sheumann/hush.git
synced 2024-11-05 06:07:00 +00:00
Fixed -qv interaction (thanks to a report and patch from David Douthitt).
This commit is contained in:
parent
09acc06c10
commit
0810f723b1
@ -85,6 +85,11 @@ static void grep_file(FILE *file)
|
|||||||
|
|
||||||
}
|
}
|
||||||
else if (ret == REG_NOMATCH && invert_search) {
|
else if (ret == REG_NOMATCH && invert_search) {
|
||||||
|
if (be_quiet) {
|
||||||
|
regfree(®ex);
|
||||||
|
exit(0);
|
||||||
|
}
|
||||||
|
|
||||||
nmatches++;
|
nmatches++;
|
||||||
print_matched_line(line, linenum);
|
print_matched_line(line, linenum);
|
||||||
}
|
}
|
||||||
|
5
grep.c
5
grep.c
@ -85,6 +85,11 @@ static void grep_file(FILE *file)
|
|||||||
|
|
||||||
}
|
}
|
||||||
else if (ret == REG_NOMATCH && invert_search) {
|
else if (ret == REG_NOMATCH && invert_search) {
|
||||||
|
if (be_quiet) {
|
||||||
|
regfree(®ex);
|
||||||
|
exit(0);
|
||||||
|
}
|
||||||
|
|
||||||
nmatches++;
|
nmatches++;
|
||||||
print_matched_line(line, linenum);
|
print_matched_line(line, linenum);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user