diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2010-04-26 08:45:44 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2010-04-26 08:45:44 +0200 |
commit | 05273daf6ff570e5e4936028ef501c59be745311 (patch) | |
tree | 606b712779247ea91027f3057b77bd6baa7d96bc /findutils/grep.c | |
parent | 5f94346f7387cb5e33cf202dd3306f062bb22052 (diff) | |
download | busybox-w32-05273daf6ff570e5e4936028ef501c59be745311.tar.gz busybox-w32-05273daf6ff570e5e4936028ef501c59be745311.tar.bz2 busybox-w32-05273daf6ff570e5e4936028ef501c59be745311.zip |
grep: makw -w support unconditional
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'findutils/grep.c')
-rw-r--r-- | findutils/grep.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/findutils/grep.c b/findutils/grep.c index a321cc31b..40caef423 100644 --- a/findutils/grep.c +++ b/findutils/grep.c | |||
@@ -24,10 +24,9 @@ | |||
24 | 24 | ||
25 | /* options */ | 25 | /* options */ |
26 | #define OPTSTR_GREP \ | 26 | #define OPTSTR_GREP \ |
27 | "lnqvscFiHhe:f:Lorm:" \ | 27 | "lnqvscFiHhe:f:Lorm:w" \ |
28 | IF_FEATURE_GREP_CONTEXT("A:B:C:") \ | 28 | IF_FEATURE_GREP_CONTEXT("A:B:C:") \ |
29 | IF_FEATURE_GREP_EGREP_ALIAS("E") \ | 29 | IF_FEATURE_GREP_EGREP_ALIAS("E") \ |
30 | IF_DESKTOP("w") \ | ||
31 | IF_EXTRA_COMPAT("z") \ | 30 | IF_EXTRA_COMPAT("z") \ |
32 | "aI" | 31 | "aI" |
33 | 32 | ||
@@ -51,11 +50,11 @@ enum { | |||
51 | OPTBIT_o, /* show only matching parts of lines */ | 50 | OPTBIT_o, /* show only matching parts of lines */ |
52 | OPTBIT_r, /* recurse dirs */ | 51 | OPTBIT_r, /* recurse dirs */ |
53 | OPTBIT_m, /* -m MAX_MATCHES */ | 52 | OPTBIT_m, /* -m MAX_MATCHES */ |
53 | OPTBIT_w, /* -w whole word match */ | ||
54 | IF_FEATURE_GREP_CONTEXT( OPTBIT_A ,) /* -A NUM: after-match context */ | 54 | IF_FEATURE_GREP_CONTEXT( OPTBIT_A ,) /* -A NUM: after-match context */ |
55 | IF_FEATURE_GREP_CONTEXT( OPTBIT_B ,) /* -B NUM: before-match context */ | 55 | IF_FEATURE_GREP_CONTEXT( OPTBIT_B ,) /* -B NUM: before-match context */ |
56 | IF_FEATURE_GREP_CONTEXT( OPTBIT_C ,) /* -C NUM: -A and -B combined */ | 56 | IF_FEATURE_GREP_CONTEXT( OPTBIT_C ,) /* -C NUM: -A and -B combined */ |
57 | IF_FEATURE_GREP_EGREP_ALIAS(OPTBIT_E ,) /* extended regexp */ | 57 | IF_FEATURE_GREP_EGREP_ALIAS(OPTBIT_E ,) /* extended regexp */ |
58 | IF_DESKTOP( OPTBIT_w ,) /* whole word match */ | ||
59 | IF_EXTRA_COMPAT( OPTBIT_z ,) /* input is NUL terminated */ | 58 | IF_EXTRA_COMPAT( OPTBIT_z ,) /* input is NUL terminated */ |
60 | OPT_l = 1 << OPTBIT_l, | 59 | OPT_l = 1 << OPTBIT_l, |
61 | OPT_n = 1 << OPTBIT_n, | 60 | OPT_n = 1 << OPTBIT_n, |
@@ -73,11 +72,11 @@ enum { | |||
73 | OPT_o = 1 << OPTBIT_o, | 72 | OPT_o = 1 << OPTBIT_o, |
74 | OPT_r = 1 << OPTBIT_r, | 73 | OPT_r = 1 << OPTBIT_r, |
75 | OPT_m = 1 << OPTBIT_m, | 74 | OPT_m = 1 << OPTBIT_m, |
75 | OPT_w = 1 << OPTBIT_w, | ||
76 | OPT_A = IF_FEATURE_GREP_CONTEXT( (1 << OPTBIT_A)) + 0, | 76 | OPT_A = IF_FEATURE_GREP_CONTEXT( (1 << OPTBIT_A)) + 0, |
77 | OPT_B = IF_FEATURE_GREP_CONTEXT( (1 << OPTBIT_B)) + 0, | 77 | OPT_B = IF_FEATURE_GREP_CONTEXT( (1 << OPTBIT_B)) + 0, |
78 | OPT_C = IF_FEATURE_GREP_CONTEXT( (1 << OPTBIT_C)) + 0, | 78 | OPT_C = IF_FEATURE_GREP_CONTEXT( (1 << OPTBIT_C)) + 0, |
79 | OPT_E = IF_FEATURE_GREP_EGREP_ALIAS((1 << OPTBIT_E)) + 0, | 79 | OPT_E = IF_FEATURE_GREP_EGREP_ALIAS((1 << OPTBIT_E)) + 0, |
80 | OPT_w = IF_DESKTOP( (1 << OPTBIT_w)) + 0, | ||
81 | OPT_z = IF_EXTRA_COMPAT( (1 << OPTBIT_z)) + 0, | 80 | OPT_z = IF_EXTRA_COMPAT( (1 << OPTBIT_z)) + 0, |
82 | }; | 81 | }; |
83 | 82 | ||