1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-06-10 23:49:50 +02:00

* options.h, g10.c (main), compress-bz2.c (init_uncompress): Backport

--bzip2-decompress-lowmem since we do handle receiving a bzip2 message on
the stable branch.
This commit is contained in:
David Shaw 2004-03-25 22:53:54 +00:00
parent fd2e1cd717
commit 00bdac950e
4 changed files with 13 additions and 3 deletions

View File

@ -1,3 +1,9 @@
2004-03-25 David Shaw <dshaw@jabberwocky.com>
* options.h, g10.c (main), compress-bz2.c (init_uncompress):
Backport --bzip2-decompress-lowmem since we do handle receiving a
bzip2 message on the stable branch.
2004-03-23 David Shaw <dshaw@jabberwocky.com>
* keyedit.c (no_primary_warning): Cleanup.

View File

@ -1,5 +1,5 @@
/* compress.c - bzip2 compress filter
* Copyright (C) 2003 Free Software Foundation, Inc.
* Copyright (C) 2003, 2004 Free Software Foundation, Inc.
*
* This file is part of GnuPG.
*
@ -101,7 +101,7 @@ init_uncompress( compress_filter_context_t *zfx, bz_stream *bzs )
{
int rc;
if((rc=BZ2_bzDecompressInit(bzs,0,0))!=BZ_OK)
if((rc=BZ2_bzDecompressInit(bzs,0,opt.bz2_decompress_lowmem))!=BZ_OK)
log_fatal("bz2lib problem: %d\n",rc);
zfx->inbufsize = 2048;

View File

@ -184,6 +184,7 @@ enum cmd_and_opt_values
oDigestAlgo,
oCertDigestAlgo,
oCompressAlgo,
oBZ2DecompressLowmem,
oPasswdFD,
oPasswdFile, /* only used with risc os */
oCommandFD,
@ -395,6 +396,7 @@ static ARGPARSE_OPTS opts[] = {
{ oNoEncryptTo, "no-encrypt-to", 0, "@" },
{ oUser, "local-user",2, N_("use this user-id to sign or decrypt")},
{ oCompress,"compress-level",1,N_("|N|set compress level N (0 disables)")},
{ oBZ2DecompressLowmem, "bzip2-decompress-lowmem", 0, "@" },
{ oTextmodeShort, NULL, 0, "@"},
{ oTextmode, "textmode", 0, N_("use canonical text mode")},
{ oNoTextmode, "no-textmode", 0, "@"},
@ -478,7 +480,7 @@ static ARGPARSE_OPTS opts[] = {
{ oDigestAlgo, "digest-algo", 2 , N_("|NAME|use message digest algorithm NAME")},
{ oCertDigestAlgo, "cert-digest-algo", 2 , "@" },
{ oCompressAlgo, "compress-algo", 1 , N_("|N|use compress algorithm N")},
{ oThrowKeyid, "throw-keyid", 0, N_("throw keyid field of encrypted packets")},
{ oThrowKeyid, "throw-keyids", 0, N_("throw keyid field of encrypted packets")},
{ oShowPhotos, "show-photos", 0, N_("Show Photo IDs")},
{ oNoShowPhotos, "no-show-photos", 0, N_("Don't show Photo IDs")},
{ oPhotoViewer, "photo-viewer", 2, N_("Set command line to view Photo IDs")},
@ -1765,6 +1767,7 @@ main( int argc, char **argv )
add_to_strlist2( &locusr, pargs.r.ret_str, utf8_strings );
break;
case oCompress: opt.compress = pargs.r.ret_int; break;
case oBZ2DecompressLowmem: opt.bz2_decompress_lowmem=1; break;
case oPasswdFD:
pwfd = iobuf_translate_file_handle (pargs.r.ret_int, 0);
opt.use_agent = 0;

View File

@ -72,6 +72,7 @@ struct
int def_digest_algo;
int cert_digest_algo;
int def_compress_algo;
int bz2_decompress_lowmem;
const char *def_secret_key;
char *def_recipient;
int def_recipient_self;