diff options
author | Ron Yorston <rmy@pobox.com> | 2016-07-07 14:28:08 +0100 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2016-07-07 14:58:55 +0100 |
commit | 613f46218c53c8cabdbf0435653e74e0e0e91e1c (patch) | |
tree | ca06a7e7a3e4c861441acb4ea20648d7827fa6ae /findutils | |
parent | a0c61c9492723dd31681f878f9c68c92817a476d (diff) | |
parent | 237bedd499c58034a1355484d6d4d906f0180308 (diff) | |
download | busybox-w32-613f46218c53c8cabdbf0435653e74e0e0e91e1c.tar.gz busybox-w32-613f46218c53c8cabdbf0435653e74e0e0e91e1c.tar.bz2 busybox-w32-613f46218c53c8cabdbf0435653e74e0e0e91e1c.zip |
Merge branch 'busybox' into merge
Diffstat (limited to 'findutils')
-rw-r--r-- | findutils/grep.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/findutils/grep.c b/findutils/grep.c index e956abbb8..02ce65159 100644 --- a/findutils/grep.c +++ b/findutils/grep.c | |||
@@ -115,8 +115,8 @@ | |||
115 | //usage:#define fgrep_full_usage "" | 115 | //usage:#define fgrep_full_usage "" |
116 | 116 | ||
117 | #define OPTSTR_GREP \ | 117 | #define OPTSTR_GREP \ |
118 | "lnqvscFiHhe:f:Lorm:wx" \ | 118 | "lnqvscFiHhe:*f:*Lorm:+wx" \ |
119 | IF_FEATURE_GREP_CONTEXT("A:B:C:") \ | 119 | IF_FEATURE_GREP_CONTEXT("A:+B:+C:+") \ |
120 | IF_FEATURE_GREP_EGREP_ALIAS("E") \ | 120 | IF_FEATURE_GREP_EGREP_ALIAS("E") \ |
121 | IF_EXTRA_COMPAT("z") \ | 121 | IF_EXTRA_COMPAT("z") \ |
122 | "aI" | 122 | "aI" |
@@ -694,6 +694,7 @@ int grep_main(int argc UNUSED_PARAM, char **argv) | |||
694 | #if ENABLE_FEATURE_GREP_CONTEXT | 694 | #if ENABLE_FEATURE_GREP_CONTEXT |
695 | int Copt, opts; | 695 | int Copt, opts; |
696 | #endif | 696 | #endif |
697 | INIT_G(); | ||
697 | 698 | ||
698 | /* For grep, exitcode of 1 is "not found". Other errors are 2: */ | 699 | /* For grep, exitcode of 1 is "not found". Other errors are 2: */ |
699 | xfunc_error_retval = 2; | 700 | xfunc_error_retval = 2; |
@@ -702,7 +703,7 @@ int grep_main(int argc UNUSED_PARAM, char **argv) | |||
702 | #if ENABLE_FEATURE_GREP_CONTEXT | 703 | #if ENABLE_FEATURE_GREP_CONTEXT |
703 | /* -H unsets -h; -C unsets -A,-B; -e,-f are lists; | 704 | /* -H unsets -h; -C unsets -A,-B; -e,-f are lists; |
704 | * -m,-A,-B,-C have numeric param */ | 705 | * -m,-A,-B,-C have numeric param */ |
705 | opt_complementary = "H-h:C-AB:e::f::m+:A+:B+:C+"; | 706 | opt_complementary = "H-h:C-AB"; |
706 | opts = getopt32(argv, | 707 | opts = getopt32(argv, |
707 | OPTSTR_GREP, | 708 | OPTSTR_GREP, |
708 | &pattern_head, &fopt, &max_matches, | 709 | &pattern_head, &fopt, &max_matches, |
@@ -731,7 +732,7 @@ int grep_main(int argc UNUSED_PARAM, char **argv) | |||
731 | #else | 732 | #else |
732 | /* with auto sanity checks */ | 733 | /* with auto sanity checks */ |
733 | /* -H unsets -h; -c,-q or -l unset -n; -e,-f are lists; -m N */ | 734 | /* -H unsets -h; -c,-q or -l unset -n; -e,-f are lists; -m N */ |
734 | opt_complementary = "H-h:c-n:q-n:l-n:e::f::m+"; | 735 | opt_complementary = "H-h:c-n:q-n:l-n:"; |
735 | getopt32(argv, OPTSTR_GREP, | 736 | getopt32(argv, OPTSTR_GREP, |
736 | &pattern_head, &fopt, &max_matches); | 737 | &pattern_head, &fopt, &max_matches); |
737 | #endif | 738 | #endif |