summaryrefslogtreecommitdiff
path: root/cipher/elgamal.c
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2002-05-21 07:04:42 +0000
committerWerner Koch <wk@gnupg.org>2002-05-21 07:04:42 +0000
commitf31a64bc2eb45b2afa3828539c995f7b0c2f1730 (patch)
treeae292a19e3a4053bb5ce9cc3f2893af519d042b6 /cipher/elgamal.c
parent6fbd6bc96cb8d53effed8153b546ca350f9e389c (diff)
downloadlibgcrypt-f31a64bc2eb45b2afa3828539c995f7b0c2f1730.tar.gz
* gcrypt.h: Replaced the typedef for byte.
* global.c (gcry_set_progress_handler): New. * primegen.c, elgamal.c, dsa.c (progress): Do not print anything by default. Pass an extra identifying string to the callback and reserved 2 argumenst for current and total counters. Changed the register function prototype.
Diffstat (limited to 'cipher/elgamal.c')
-rw-r--r--cipher/elgamal.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/cipher/elgamal.c b/cipher/elgamal.c
index 67e03fa3..b56a3c9b 100644
--- a/cipher/elgamal.c
+++ b/cipher/elgamal.c
@@ -60,7 +60,8 @@ static void (*progress_cb) ( void *, int );
static void *progress_cb_data;
void
-_gcry_register_pk_elg_progress ( void (*cb)( void *, int), void *cb_data )
+_gcry_register_pk_elg_progress ( void (*cb)( void *,const char*, int,int,int),
+ void *cb_data )
{
progress_cb = cb;
progress_cb_data = cb_data;
@@ -70,10 +71,8 @@ _gcry_register_pk_elg_progress ( void (*cb)( void *, int), void *cb_data )
static void
progress( int c )
{
- if ( progress_cb )
- progress_cb ( progress_cb_data, c );
- else
- fputc( c, stderr );
+ if (progress_cb)
+ progress_cb (progress_cb_data, "pk_elg", c, 0, 0);
}