aboutsummaryrefslogtreecommitdiffstats
path: root/g10/plaintext.c
diff options
context:
space:
mode:
authorDavid Shaw <[email protected]>2004-02-26 02:03:27 +0000
committerDavid Shaw <[email protected]>2004-02-26 02:03:27 +0000
commitf2148f03c55bf5a814aeb61b7d853ba12b6132b3 (patch)
treedc4e1c8fe2bf64930ca4ed53e7faa2908cf50bb9 /g10/plaintext.c
parent* gpgkeys_ldap.c (send_key): List pgpCertID as one of the deleted (diff)
downloadgnupg-f2148f03c55bf5a814aeb61b7d853ba12b6132b3.tar.gz
gnupg-f2148f03c55bf5a814aeb61b7d853ba12b6132b3.zip
* 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.
Diffstat (limited to 'g10/plaintext.c')
-rw-r--r--g10/plaintext.c9
1 files changed, 4 insertions, 5 deletions
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");