sbase

suckless unix tools
git clone git://git.2f30.org/sbase.git
Log | Files | Refs | README | LICENSE

commit 6427386b022c125377fccf21b2d03493eea613bf
parent 04bac53826813eda5d561f37e03869b7cd16fcaa
Author: Connor Lane Smith <cls@lubutu.com>
Date:   Sun May 29 20:38:15 +0100

grep: default REG_NOSUB
Diffstat:
grep.c | 4+---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/grep.c b/grep.c @@ -18,7 +18,7 @@ int main(int argc, char *argv[]) { char c; - int flags = 0; + int flags = REG_NOSUB; regex_t preg; FILE *fp; @@ -43,8 +43,6 @@ main(int argc, char *argv[]) fprintf(stderr, "usage: %s [-cilnqv] pattern [files...]\n", argv[0]); exit(2); } - if(mode == 'c') - flags |= REG_NOSUB; if(iflag) flags |= REG_ICASE; regcomp(&preg, argv[optind++], flags);