From f2148f03c55bf5a814aeb61b7d853ba12b6132b3 Mon Sep 17 00:00:00 2001 From: David Shaw Date: Thu, 26 Feb 2004 02:03:27 +0000 Subject: * delkey.c (do_delete_key): Allow deleting a public key with a secret present if --expert is set. * plaintext.c (handle_plaintext): Make bytecount static so it works with multiple literal packets inside a message. * encode.c, helptext.c (keygen.algo, keygen.algo.elg_se), keygen.c (ask_algo), sig-check.c (do_check_messages), skclist.c (build_sk_list): Rename "ElGamal" to "Elgamal" as that is the proper spelling nowadays. Suggested by Jon Callas. --- g10/plaintext.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'g10/plaintext.c') diff --git a/g10/plaintext.c b/g10/plaintext.c index e9b9918cb..43c0c4be1 100644 --- a/g10/plaintext.c +++ b/g10/plaintext.c @@ -41,7 +41,6 @@ #include "i18n.h" - /**************** * Handle a plaintext packet. If MFX is not NULL, update the MDs * Note: we should use the filter stuff here, but we have to add some @@ -54,7 +53,7 @@ handle_plaintext( PKT_plaintext *pt, md_filter_context_t *mfx, { char *fname = NULL; FILE *fp = NULL; - off_t count=0; + static off_t count=0; int rc = 0; int c; int convert = pt->mode == 't'; @@ -169,7 +168,7 @@ handle_plaintext( PKT_plaintext *pt, md_filter_context_t *mfx, #endif if( fp ) { - if(opt.max_output && (count++)>opt.max_output) + if(opt.max_output && (++count)>opt.max_output) { log_error("Error writing to `%s': %s\n", fname,"exceeded --max-output limit\n"); @@ -235,7 +234,7 @@ handle_plaintext( PKT_plaintext *pt, md_filter_context_t *mfx, #endif if( fp ) { - if(opt.max_output && (count++)>opt.max_output) + if(opt.max_output && (++count)>opt.max_output) { log_error("Error writing to `%s': %s\n", fname,"exceeded --max-output limit\n"); @@ -298,7 +297,7 @@ handle_plaintext( PKT_plaintext *pt, md_filter_context_t *mfx, while( (c = iobuf_get(pt->buf)) != -1 ) { if( fp ) { - if(opt.max_output && (count++)>opt.max_output) + if(opt.max_output && (++count)>opt.max_output) { log_error("Error writing to `%s': %s\n", fname,"exceeded --max-output limit\n"); -- cgit