diff options
Diffstat (limited to 'g10/status.c')
-rw-r--r-- | g10/status.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/g10/status.c b/g10/status.c index 6eb074909..3c22c0d1c 100644 --- a/g10/status.c +++ b/g10/status.c @@ -286,10 +286,26 @@ cpr_kill_prompt(void) int cpr_get_answer_is_yes( const char *keyword, const char *prompt ) { + int yes; + char *p; + #ifdef USE_SHM_COPROCESSING if( opt.shm_coprocess ) return !!do_shm_get( keyword, 0, 1 ); #endif - return tty_get_answer_is_yes( prompt ); + for(;;) { + p = tty_get( prompt ); + trim_spaces(p); /* it is okay to do this here */ + if( *p == '?' && !p[1] ) { + m_free(p); + display_help( keyword ); + } + else { + tty_kill_prompt(); + yes = answer_is_yes(p); + m_free(p); + return yes; + } + } } |