summaryrefslogtreecommitdiffstats
path: root/main.cc
diff options
context:
space:
mode:
authorDaniel Baumann <mail@daniel-baumann.ch>2015-11-07 07:23:39 +0000
committerDaniel Baumann <mail@daniel-baumann.ch>2015-11-07 07:23:39 +0000
commit0966aef6cc18db439eb59a6325a0bac9462b428b (patch)
tree7e86146c8af05d5eeea569d6022cfeb848fb3fa5 /main.cc
parentAdding upstream version 1.6~pre2. (diff)
downloadlzip-0966aef6cc18db439eb59a6325a0bac9462b428b.tar.xz
lzip-0966aef6cc18db439eb59a6325a0bac9462b428b.zip
Adding upstream version 1.6~pre3.upstream/1.6_pre3
Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
Diffstat (limited to '')
-rw-r--r--main.cc18
1 files changed, 9 insertions, 9 deletions
diff --git a/main.cc b/main.cc
index 87d186a..2cb998c 100644
--- a/main.cc
+++ b/main.cc
@@ -84,7 +84,7 @@ void show_help() throw()
{
std::printf( "%s - A data compressor based on the LZMA algorithm.\n", Program_name );
std::printf( "\nUsage: %s [options] [files]\n", invocation_name );
- std::printf( "Options:\n" );
+ std::printf( "\nOptions:\n" );
std::printf( " -h, --help display this help and exit\n" );
std::printf( " -V, --version output version information and exit\n" );
std::printf( " -b, --member-size=<n> set member size limit in bytes\n" );
@@ -102,7 +102,7 @@ void show_help() throw()
std::printf( " -1 .. -9 set compression level [default 6]\n" );
std::printf( " --fast alias for -1\n" );
std::printf( " --best alias for -9\n" );
- std::printf( "If no file names are given, lzip compresses or decompresses\n" );
+ std::printf( "If no file names are given, %s compresses or decompresses\n", program_name );
std::printf( "from standard input to standard output.\n" );
std::printf( "Numbers may be followed by a multiplier: k = kB = 10^3 = 1000,\n" );
std::printf( "Ki = KiB = 2^10 = 1024, M = 10^6, Mi = 2^20, G = 10^9, Gi = 2^30, etc...\n" );
@@ -645,10 +645,10 @@ int main( const int argc, const char * argv[] )
// to the corresponding LZMA compression modes.
const lzma_options option_mapping[] =
{
- { 1 << 22, 10 }, // -1
- { 1 << 22, 12 }, // -2
- { 1 << 22, 17 }, // -3
- { 1 << 22, 26 }, // -4
+ { 1 << 20, 10 }, // -1
+ { 1 << 20, 12 }, // -2
+ { 1 << 20, 17 }, // -3
+ { 1 << 21, 26 }, // -4
{ 1 << 22, 44 }, // -5
{ 1 << 23, 80 }, // -6
{ 1 << 24, 108 }, // -7
@@ -741,13 +741,13 @@ int main( const int argc, const char * argv[] )
if( filenames_given ) set_signals();
Pretty_print pp( filenames );
- if( program_mode == m_compress )
+ if( program_mode == m_test )
+ outhandle = -1;
+ else if( program_mode == m_compress )
{
dis_slots.init();
prob_prices.init();
}
- else if( program_mode == m_test )
- outhandle = -1;
int retval = 0;
for( unsigned int i = 0; i < filenames.size(); ++i )