mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
See ChangeLog: Thu May 27 09:40:55 CEST 1999 Werner Koch
This commit is contained in:
parent
d5fd04e0ce
commit
a6a548ab56
12 changed files with 225 additions and 65 deletions
26
g10/status.c
26
g10/status.c
|
@ -358,3 +358,29 @@ cpr_get_answer_is_yes( const char *keyword, const char *prompt )
|
|||
}
|
||||
}
|
||||
|
||||
int
|
||||
cpr_get_answer_yes_no_quit( 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
|
||||
for(;;) {
|
||||
p = tty_get( prompt );
|
||||
trim_spaces(p); /* it is okay to do this here */
|
||||
if( *p == '?' && !p[1] ) {
|
||||
m_free(p);
|
||||
display_online_help( keyword );
|
||||
}
|
||||
else {
|
||||
tty_kill_prompt();
|
||||
yes = answer_is_yes_no_quit(p);
|
||||
m_free(p);
|
||||
return yes;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue