summaryrefslogtreecommitdiff
path: root/cipher/primegen.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/primegen.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/primegen.c')
-rw-r--r--cipher/primegen.c8
1 files changed, 3 insertions, 5 deletions
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 );
}