* compress.c (init_compress): Remove compress level 10 trick, since it is
authorDavid Shaw <dshaw@jabberwocky.com>
Sat, 15 Nov 2003 23:54:14 +0000 (23:54 +0000)
committerDavid Shaw <dshaw@jabberwocky.com>
Sat, 15 Nov 2003 23:54:14 +0000 (23:54 +0000)
no longer needed.

* g10.c: Fix typoed option name.

* compress-bz2.c (init_compress): Compression level 0 is not meaningful
for bzip2.

g10/ChangeLog
g10/compress-bz2.c
g10/compress.c
g10/g10.c

index 7577b92..38f446c 100644 (file)
@@ -1,5 +1,13 @@
 2003-11-15  David Shaw  <dshaw@jabberwocky.com>
 
+       * compress.c (init_compress): Remove compress level 10 trick,
+       since it is no longer needed.
+
+       * g10.c: Fix typoed option name.
+
+       * compress-bz2.c (init_compress): Compression level 0 is not
+       meaningful for bzip2.
+
        * options.h, g10.c (main), compress.c (init_compress),
        compress-bz2.c (init_compress): Add --compress-level and
        --bzip2-compress-level.  -z sets them both.  Change various
index d1ad732..a81288e 100644 (file)
@@ -41,12 +41,10 @@ init_compress( compress_filter_context_t *zfx, bz_stream *bzs )
   int rc;
   int level;
 
-  if( opt.bz2_compress_level >= 0 && opt.bz2_compress_level <= 9 )
+  if( opt.bz2_compress_level >= 1 && opt.bz2_compress_level <= 9 )
     level = opt.bz2_compress_level;
   else if( opt.bz2_compress_level == -1 )
     level = 6; /* no particular reason, but it seems reasonable */
-  else if( opt.bz2_compress_level == 10 ) /* remove this ! */
-    level = 0;
   else
     {
       log_error("invalid compression level; using default level\n");
index c428215..3a027e5 100644 (file)
@@ -64,14 +64,11 @@ init_compress( compress_filter_context_t *zfx, z_stream *zs )
        level = opt.compress_level;
     else if( opt.compress_level == -1 )
        level = Z_DEFAULT_COMPRESSION;
-    else if( opt.compress_level == 10 ) /* remove this ! */
-       level = 0;
     else {
        log_error("invalid compression level; using default level\n");
        level = Z_DEFAULT_COMPRESSION;
     }
 
-
     if( (rc = zfx->algo == 1? deflateInit2( zs, level, Z_DEFLATED,
                                            -13, 8, Z_DEFAULT_STRATEGY)
                            : deflateInit( zs, level )
index 69e3a1b..6509b3e 100644 (file)
--- a/g10/g10.c
+++ b/g10/g10.c
@@ -422,7 +422,7 @@ static ARGPARSE_OPTS opts[] = {
     { oUser, "local-user",2, N_("use this user-id to sign or decrypt")},
     { oCompress, NULL, 1, N_("|N|set compress level N (0 disables)") },
     { oCompressLevel, "compress-level", 1, "@" },
-    { oBZ2CompressLevel, "bz2-compress-level", 1, "@" },
+    { oBZ2CompressLevel, "bzip2-compress-level", 1, "@" },
     { oTextmodeShort, NULL,   0, "@"},
     { oTextmode, "textmode",  0, N_("use canonical text mode")},
     { oNoTextmode, "no-textmode",  0, "@"},