aboutsummaryrefslogtreecommitdiffstats
path: root/g10/textfilter.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>1999-10-26 12:14:37 +0000
committerWerner Koch <[email protected]>1999-10-26 12:14:37 +0000
commitcf70ca8d68eb836b952f2c234f064b1afc205962 (patch)
treeaa33afbc79efd1f8538e5286b13d900321a8f14b /g10/textfilter.c
parentChanged the way it works - now needs an extra program to to most tasks. (diff)
downloadgnupg-cf70ca8d68eb836b952f2c234f064b1afc205962.tar.gz
gnupg-cf70ca8d68eb836b952f2c234f064b1afc205962.zip
See ChangeLog: Tue Oct 26 14:10:21 CEST 1999 Werner Koch
Diffstat (limited to 'g10/textfilter.c')
-rw-r--r--g10/textfilter.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/g10/textfilter.c b/g10/textfilter.c
index 3125925b6..3588156ad 100644
--- a/g10/textfilter.c
+++ b/g10/textfilter.c
@@ -25,6 +25,7 @@
#include <errno.h>
#include <assert.h>
+#include <gcrypt.h>
#include "errors.h"
#include "iobuf.h"
#include "memory.h"
@@ -141,7 +142,7 @@ text_filter( void *opaque, int control,
* md is updated as required by rfc2440
*/
int
-copy_clearsig_text( IOBUF out, IOBUF inp, MD_HANDLE md,
+copy_clearsig_text( IOBUF out, IOBUF inp, GCRY_MD_HD md,
int escape_dash, int escape_from, int pgp2mode )
{
unsigned maxlen;
@@ -166,15 +167,15 @@ copy_clearsig_text( IOBUF out, IOBUF inp, MD_HANDLE md,
/* update the message digest */
if( escape_dash ) {
if( pending_lf ) {
- md_putc( md, '\r' );
- md_putc( md, '\n' );
+ gcry_md_putc( md, '\r' );
+ gcry_md_putc( md, '\n' );
}
- md_write( md, buffer,
+ gcry_md_write( md, buffer,
len_without_trailing_chars( buffer, n,
pgp2mode? " \r\n":" \t\r\n"));
}
else
- md_write( md, buffer, n );
+ gcry_md_write( md, buffer, n );
pending_lf = buffer[n-1] == '\n';
/* write the output */
@@ -190,7 +191,7 @@ copy_clearsig_text( IOBUF out, IOBUF inp, MD_HANDLE md,
if( !pending_lf ) { /* make sure that the file ends with a LF */
iobuf_put( out, '\n');
if( !escape_dash )
- md_putc( md, '\n' );
+ gcry_md_putc( md, '\n' );
}
if( truncated )