diff options
| author | Ruslan Ermilov <ru@FreeBSD.org> | 2000-01-04 10:32:55 +0000 |
|---|---|---|
| committer | Ruslan Ermilov <ru@FreeBSD.org> | 2000-01-04 10:32:55 +0000 |
| commit | 95a9e62800441f64f097fedcc9c5bf9746be318a (patch) | |
| tree | 86275d5f041690727705961b7e58a7377d2ee9e5 /gnu | |
| parent | 91141ae2e88a6a2be9d633ba577a7caffa0a9652 (diff) | |
Notes
Diffstat (limited to 'gnu')
| -rw-r--r-- | gnu/usr.bin/grep/grep.c | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/gnu/usr.bin/grep/grep.c b/gnu/usr.bin/grep/grep.c index 79c7c489a376..a45df88d4f61 100644 --- a/gnu/usr.bin/grep/grep.c +++ b/gnu/usr.bin/grep/grep.c @@ -61,13 +61,12 @@ static int show_version; /* If nonzero, use mmap if possible. */ static int mmap_option; +/* If zero, output nulls after filenames. */ +static int filename_mask; + /* Short options. */ static char const short_options[] = -#if HAVE_LIBZ > 0 "0123456789A:B:C::EFGHUVX:abcd:e:f:hiLlnqrsuvwxyZz"; -#else -"0123456789A:B:C::EFGHUVX:abcd:e:f:hiLlnqrsuvwxyZz"; -#endif /* Long options equivalences. */ static struct option long_options[] = @@ -93,7 +92,8 @@ static struct option long_options[] = {"no-filename", no_argument, NULL, 'h'}, {"no-messages", no_argument, NULL, 's'}, #if HAVE_LIBZ > 0 - {"null", no_argument, NULL, /*'Z'*/ 1}, + {"decompress", no_argument, NULL, 'Z'}, + {"null", no_argument, &filename_mask, 0}, #else {"null", no_argument, NULL, 'Z'}, #endif @@ -109,15 +109,10 @@ static struct option long_options[] = {"version", no_argument, NULL, 'V'}, {"with-filename", no_argument, NULL, 'H'}, {"word-regexp", no_argument, NULL, 'w'}, -#if HAVE_LIBZ > 0 - {"decompress", no_argument, NULL, 'Z'}, -#endif {0, 0, 0, 0} }; /* Define flags declared in grep.h. */ -/* I do not know why we need this decl, while if you build GNU grep 2.4 by - hand you don't... */ char const *matcher; int match_icase; int match_words; @@ -517,7 +512,6 @@ fillbuf (save, stats) /* Flags controlling the style of output. */ static int always_text; /* Assume the input is always text. */ -static int filename_mask; /* If zero, output nulls after filenames. */ static int out_quiet; /* Suppress all normal output. */ static int out_invert; /* Print nonmatching stuff. */ static int out_file; /* Print filenames. */ |
