aboutsummaryrefslogtreecommitdiffstats
path: root/g10/options.h
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2016-08-11 19:31:12 +0000
committerWerner Koch <[email protected]>2016-08-11 19:32:55 +0000
commit70b5d7c43a57a44dad60c2c700a263610748d8f4 (patch)
treed06377f79320f6fade30f50d252a0b29c491916c /g10/options.h
parentcommon: New function string_to_u64. (diff)
downloadgnupg-70b5d7c43a57a44dad60c2c700a263610748d8f4.tar.gz
gnupg-70b5d7c43a57a44dad60c2c700a263610748d8f4.zip
gpg: New option --input-size-hint.
* g10/options.h: Include stdint.h. (struct opt): Add field 'input_size_hint'. * g10/gpg.c (oInputSizeHint): New. (opts): Add --input-size-hint. (main): Set opt.input_size_hint. * g10/progress.c (write_status_progress): Use the hint. -- This is a prerequisite to fix GnuPG-bug-id: 2368 Signed-off-by: Werner Koch <[email protected]>
Diffstat (limited to 'g10/options.h')
-rw-r--r--g10/options.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/g10/options.h b/g10/options.h
index d1c363436..230c96af2 100644
--- a/g10/options.h
+++ b/g10/options.h
@@ -23,6 +23,7 @@
#include <sys/types.h>
#include <types.h>
+#include <stdint.h>
#include "main.h"
#include "packet.h"
#include "tofu.h"
@@ -54,6 +55,12 @@ struct
char *outfile;
estream_t outfp; /* Hack, sometimes used in place of outfile. */
off_t max_output;
+
+ /* If > 0 a hint with the expected number of input data bytes. This
+ * is not necessary an exact number but intended to be used for
+ * progress info and to decide on how to allocate buffers. */
+ uint64_t input_size_hint;
+
int dry_run;
int autostart;
int list_only;