diff options
| author | Werner Koch <[email protected]> | 2003-07-29 08:53:19 +0000 |
|---|---|---|
| committer | Werner Koch <[email protected]> | 2003-07-29 08:53:19 +0000 |
| commit | 6f7ed0590060cc013946e192f725545445e6c39f (patch) | |
| tree | 4b3b9288bf43e704dd81d5507bb80debfe52f558 /g10/status.c | |
| parent | Adjusted for use with current libgcrypt (1.1.42). (diff) | |
| download | gnupg-6f7ed0590060cc013946e192f725545445e6c39f.tar.gz gnupg-6f7ed0590060cc013946e192f725545445e6c39f.zip | |
* gpgsm.c (main): Add secmem features and set the random seed file.
(gpgsm_exit): Update the random seed file and enable debug output.
* g10.c (main): Add secmem features and set the random seed file.
(g10_exit): Update the random seed file.
* parse-packet.c (parse_signature,read_protected_v3_mpi)
(parse_key): Fixed use of mpi_set_opaque.
* keygen.c (gen_card_key): Ditto.
Diffstat (limited to 'g10/status.c')
| -rw-r--r-- | g10/status.c | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/g10/status.c b/g10/status.c index 32e59eef5..432ec575c 100644 --- a/g10/status.c +++ b/g10/status.c @@ -65,15 +65,15 @@ static FILE *statusfp; static void -progress_cb ( void *ctx, int c ) +progress_cb (void *ctx, const char *what, int printchar, int current, int total) { - char buf[50]; - - if ( c == '\n' ) - sprintf ( buf, "%.20s X 100 100", (char*)ctx ); - else - sprintf ( buf, "%.20s %c 0 0", (char*)ctx, c ); - write_status_text ( STATUS_PROGRESS, buf ); + char buf[150]; + + if (printchar == '\n') + printchar = 'X'; + + sprintf (buf, "%.20s %c %d %d", what, printchar, current, total); + write_status_text (STATUS_PROGRESS, buf); } static const char * @@ -181,12 +181,7 @@ set_status_fd ( int fd ) fd, strerror(errno)); } last_fd = fd; -#warning fixme: register progress CBs -#if 0 - register_primegen_progress ( progress_cb, "primegen" ); - register_pk_dsa_progress ( progress_cb, "pk_dsa" ); - register_pk_elg_progress ( progress_cb, "pk_elg" ); -#endif + gcry_set_progress_handler (progress_cb, NULL); } int |
