diff options
author | David Shaw <[email protected]> | 2003-11-15 22:31:58 +0000 |
---|---|---|
committer | David Shaw <[email protected]> | 2003-11-15 22:31:58 +0000 |
commit | 995d71258998eb6ed80a08cb5ad8c8bd03f13afb (patch) | |
tree | 486e8ad5b1e39f5c2063d82f5555a395be86f4a8 /g10/encode.c | |
parent | * encode.c (encode_simple), sign.c (sign_symencrypt_file): Properly use (diff) | |
download | gnupg-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 '')
-rw-r--r-- | g10/encode.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/g10/encode.c b/g10/encode.c index b6a776d4a..95df2f682 100644 --- a/g10/encode.c +++ b/g10/encode.c @@ -220,8 +220,8 @@ encode_simple( const char *filename, int mode, int use_seskey ) cfx.dek->use_mdc=use_mdc(NULL,cfx.dek->algo); } - if (opt.compress == -1 && cfx.dek && cfx.dek->use_mdc && - is_file_compressed(filename, &rc)) + if (do_compress && cfx.dek && cfx.dek->use_mdc + && is_file_compressed(filename, &rc)) { if (opt.verbose) log_info(_("`%s' already compressed\n"), filename); @@ -438,7 +438,7 @@ encode_crypt( const char *filename, STRLIST remusr, int use_symkey ) text_filter_context_t tfx; progress_filter_context_t pfx; PK_LIST pk_list,work_list; - int do_compress = opt.compress && !RFC1991; + int do_compress = opt.compress_algo && !RFC1991; memset( &cfx, 0, sizeof cfx); memset( &afx, 0, sizeof afx); @@ -534,8 +534,7 @@ encode_crypt( const char *filename, STRLIST remusr, int use_symkey ) not have a MDC to give some protection against chosen ciphertext attacks. */ - if (opt.compress == -1 && cfx.dek->use_mdc && - is_file_compressed(filename, &rc2) ) + if (do_compress && cfx.dek->use_mdc && is_file_compressed(filename, &rc2) ) { if (opt.verbose) log_info(_("`%s' already compressed\n"), filename); @@ -615,7 +614,7 @@ encode_crypt( const char *filename, STRLIST remusr, int use_symkey ) /* register the compress filter */ if( do_compress ) { - int compr_algo = opt.def_compress_algo; + int compr_algo = opt.compress_algo; if(compr_algo==-1) { |