diff options
author | Werner Koch <wk@gnupg.org> | 2002-05-21 07:04:42 +0000 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2002-05-21 07:04:42 +0000 |
commit | f31a64bc2eb45b2afa3828539c995f7b0c2f1730 (patch) | |
tree | ae292a19e3a4053bb5ce9cc3f2893af519d042b6 /cipher | |
parent | 6fbd6bc96cb8d53effed8153b546ca350f9e389c (diff) | |
download | libgcrypt-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')
-rw-r--r-- | cipher/ChangeLog | 7 | ||||
-rw-r--r-- | cipher/dsa.c | 9 | ||||
-rw-r--r-- | cipher/elgamal.c | 9 | ||||
-rw-r--r-- | cipher/primegen.c | 8 |
4 files changed, 18 insertions, 15 deletions
diff --git a/cipher/ChangeLog b/cipher/ChangeLog index 648a4299..19fbd288 100644 --- a/cipher/ChangeLog +++ b/cipher/ChangeLog @@ -1,3 +1,10 @@ +2002-05-21 Werner Koch <wk@gnupg.org> + + * 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. + 2002-05-17 Werner Koch <wk@gnupg.org> * rndegd.c (rndegd_constructor): Fixed name of register function diff --git a/cipher/dsa.c b/cipher/dsa.c index c5be63d1..2c2dd944 100644 --- a/cipher/dsa.c +++ b/cipher/dsa.c @@ -57,7 +57,8 @@ static void (*progress_cb) ( void *, int ); static void *progress_cb_data; void -_gcry_register_pk_dsa_progress ( void (*cb)( void *, int), void *cb_data ) +_gcry_register_pk_dsa_progress ( void (*cb)( void *,const char *, int,int,int), + void *cb_data ) { progress_cb = cb; progress_cb_data = cb_data; @@ -67,10 +68,8 @@ _gcry_register_pk_dsa_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_dsa", c, 0, 0); } 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); } diff --git a/cipher/primegen.c b/cipher/primegen.c index 96addd71..5ad9231b 100644 --- a/cipher/primegen.c +++ b/cipher/primegen.c @@ -128,7 +128,7 @@ static ushort small_prime_numbers[] = { void -_gcry_register_primegen_progress ( void (*cb)( void *, int), void *cb_data ) +_gcry_register_primegen_progress ( void (*cb)(void *,const char*,int,int,int), void *cb_data ) { progress_cb = cb; progress_cb_data = cb_data; @@ -138,10 +138,8 @@ _gcry_register_primegen_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, "primegen", c, 0, 0 ); } |