Merging upstream version 1.13~rc1.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
f40403d840
commit
95e3ee3bd3
29 changed files with 472 additions and 517 deletions
11
zgrep.cc
11
zgrep.cc
|
@ -52,8 +52,8 @@ void show_help()
|
|||
"given is compressed, its decompressed content is used. If a file given\n"
|
||||
"does not exist, and its name does not end with one of the known\n"
|
||||
"extensions, zgrep tries the compressed file names corresponding to the\n"
|
||||
"formats supported. If a file fails to decompress, zgrep continues\n"
|
||||
"searching the rest of the files.\n"
|
||||
"formats supported until one is found. If a file fails to decompress, zgrep\n"
|
||||
"continues searching the rest of the files.\n"
|
||||
"\nIf a file is specified as '-', data are read from standard input,\n"
|
||||
"decompressed if needed, and fed to grep. Data read from standard input\n"
|
||||
"must be of the same type; all uncompressed or all in the same\n"
|
||||
|
@ -338,7 +338,8 @@ int main( const int argc, const char * const argv[] )
|
|||
case color_opt: color_option = "--color";
|
||||
if( !sarg.empty() ) { color_option += '='; color_option += sarg; }
|
||||
break;
|
||||
case label_opt: label_option = sarg; label = arg; break;
|
||||
case label_opt: label_option = "--label="; label_option += sarg;
|
||||
label = arg; break;
|
||||
case linebuf_opt: grep_args.push_back( "--line-buffered" );
|
||||
line_buffered = true; break;
|
||||
case bz2_opt: parse_compressor( sarg, pn, fmt_bz2 ); break;
|
||||
|
@ -346,14 +347,14 @@ int main( const int argc, const char * const argv[] )
|
|||
case lz_opt: parse_compressor( sarg, pn, fmt_lz ); break;
|
||||
case xz_opt: parse_compressor( sarg, pn, fmt_xz ); break;
|
||||
case zst_opt: parse_compressor( sarg, pn, fmt_zst ); break;
|
||||
default : internal_error( "uncaught option." );
|
||||
default: internal_error( "uncaught option." );
|
||||
}
|
||||
} // end process options
|
||||
|
||||
if( !color_option.empty() ) // push the last value set
|
||||
grep_args.push_back( color_option.c_str() );
|
||||
if( !label_option.empty() ) // for "Binary file <label> matches"
|
||||
grep_args.push_back( label_option.insert( 0, "--label=" ).c_str() );
|
||||
grep_args.push_back( label_option.c_str() );
|
||||
|
||||
#if defined __MSVCRT__ || defined __OS2__
|
||||
setmode( STDIN_FILENO, O_BINARY );
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue