aboutsummaryrefslogtreecommitdiffstats
path: root/g10/status.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--g10/status.c23
1 files changed, 14 insertions, 9 deletions
diff --git a/g10/status.c b/g10/status.c
index cc30db79b..32e59eef5 100644
--- a/g10/status.c
+++ b/g10/status.c
@@ -40,6 +40,8 @@
#include <sys/mman.h>
#endif
#endif
+
+#include "gpg.h"
#include "util.h"
#include "status.h"
#include "ttyio.h"
@@ -179,9 +181,12 @@ 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
}
int
@@ -453,7 +458,7 @@ do_shm_get( const char *keyword, int hidden, int bool )
if( bool )
return p[0]? "" : NULL;
- string = hidden? m_alloc_secure( n+1 ) : m_alloc( n+1 );
+ string = hidden? xmalloc_secure ( n+1 ) : xmalloc ( n+1 );
memcpy(string, p, n );
string[n] = 0; /* make sure it is a string */
if( hidden ) /* invalidate the memory */
@@ -508,7 +513,7 @@ do_get_from_fd( const char *keyword, int hidden, int bool )
if( i >= len-1 ) {
char *save = string;
len += 100;
- string = hidden? m_alloc_secure ( len ) : m_alloc ( len );
+ string = hidden? xmalloc_secure ( len ) : xmalloc ( len );
if( save )
memcpy(string, save, i );
else
@@ -579,7 +584,7 @@ cpr_get( const char *keyword, const char *prompt )
for(;;) {
p = tty_get( prompt );
if( *p=='?' && !p[1] && !(keyword && !*keyword)) {
- m_free(p);
+ xfree (p);
display_online_help( keyword );
}
else
@@ -595,7 +600,7 @@ cpr_get_utf8( const char *keyword, const char *prompt )
p = cpr_get( keyword, prompt );
if( p ) {
char *utf8 = native_to_utf8( p );
- m_free( p );
+ xfree ( p );
p = utf8;
}
return p;
@@ -615,7 +620,7 @@ cpr_get_hidden( const char *keyword, const char *prompt )
for(;;) {
p = tty_get_hidden( prompt );
if( *p == '?' && !p[1] ) {
- m_free(p);
+ xfree (p);
display_online_help( keyword );
}
else
@@ -652,13 +657,13 @@ cpr_get_answer_is_yes( const char *keyword, const char *prompt )
p = tty_get( prompt );
trim_spaces(p); /* it is okay to do this here */
if( *p == '?' && !p[1] ) {
- m_free(p);
+ xfree (p);
display_online_help( keyword );
}
else {
tty_kill_prompt();
yes = answer_is_yes(p);
- m_free(p);
+ xfree (p);
return yes;
}
}
@@ -680,13 +685,13 @@ cpr_get_answer_yes_no_quit( const char *keyword, const char *prompt )
p = tty_get( prompt );
trim_spaces(p); /* it is okay to do this here */
if( *p == '?' && !p[1] ) {
- m_free(p);
+ xfree (p);
display_online_help( keyword );
}
else {
tty_kill_prompt();
yes = answer_is_yes_no_quit(p);
- m_free(p);
+ xfree (p);
return yes;
}
}