aboutsummaryrefslogtreecommitdiffstats
path: root/g10/compress-bz2.c
diff options
context:
space:
mode:
authorDavid Shaw <[email protected]>2003-11-15 22:31:58 +0000
committerDavid Shaw <[email protected]>2003-11-15 22:31:58 +0000
commit995d71258998eb6ed80a08cb5ad8c8bd03f13afb (patch)
tree486e8ad5b1e39f5c2063d82f5555a395be86f4a8 /g10/compress-bz2.c
parent* encode.c (encode_simple), sign.c (sign_symencrypt_file): Properly use (diff)
downloadgnupg-995d71258998eb6ed80a08cb5ad8c8bd03f13afb.tar.gz
gnupg-995d71258998eb6ed80a08cb5ad8c8bd03f13afb.zip
* 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 callers.
Diffstat (limited to 'g10/compress-bz2.c')
-rw-r--r--g10/compress-bz2.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/g10/compress-bz2.c b/g10/compress-bz2.c
index a8497c154..d1ad7326e 100644
--- a/g10/compress-bz2.c
+++ b/g10/compress-bz2.c
@@ -30,10 +30,10 @@
#include "options.h"
/* Note that the code in compress.c is nearly identical to the code
- here, so if you fix a bug here, look there to see if the matching
- bug needs to be fixed. I tried to have one set of functions that
- could do ZIP, ZLIB, and BZIP2, but it became dangerously unreadable
- with #ifdefs and if(algo) -dshaw */
+ here, so if you fix a bug here, look there to see if a matching bug
+ needs to be fixed. I tried to have one set of functions that could
+ do ZIP, ZLIB, and BZIP2, but it became dangerously unreadable with
+ #ifdefs and if(algo) -dshaw */
static void
init_compress( compress_filter_context_t *zfx, bz_stream *bzs )
@@ -41,11 +41,11 @@ init_compress( compress_filter_context_t *zfx, bz_stream *bzs )
int rc;
int level;
- if( opt.compress >= 0 && opt.compress <= 9 )
- level = opt.compress;
- else if( opt.compress == -1 )
+ if( opt.bz2_compress_level >= 0 && 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.compress == 10 ) /* remove this ! */
+ else if( opt.bz2_compress_level == 10 ) /* remove this ! */
level = 0;
else
{