aboutsummaryrefslogtreecommitdiff
path: root/findutils/grep.c
diff options
context:
space:
mode:
Diffstat (limited to 'findutils/grep.c')
-rw-r--r--findutils/grep.c9
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