mirror of
https://github.com/bobbimanners/emailler.git
synced 2024-07-06 19:28:56 +00:00
EMAIL: Added ESC as an option for prompt_okay()
This commit is contained in:
parent
56f6cda1d5
commit
cba881e184
@ -1432,14 +1432,16 @@ uint8_t write_email_headers(FILE *fp1, FILE *fp2, struct emailhdrs *h,
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* Prompt ok?
|
* Prompt ok?
|
||||||
|
* Returns 1 for yes
|
||||||
|
* 0 for no or ESC
|
||||||
*/
|
*/
|
||||||
char prompt_okay(char *msg) {
|
char prompt_okay(char *msg) {
|
||||||
char c;
|
char c;
|
||||||
goto_prompt_row();
|
goto_prompt_row();
|
||||||
printf("%sSure? (y/n)", msg);
|
printf("%sSure? (y/n/ESC)", msg);
|
||||||
while (1) {
|
while (1) {
|
||||||
c = cgetc();
|
c = cgetc();
|
||||||
if ((c == 'y') || (c == 'Y') || (c == 'n') || (c == 'N'))
|
if ((c == 'y') || (c == 'Y') || (c == 'n') || (c == 'N') || (c == ESC))
|
||||||
break;
|
break;
|
||||||
putchar(BELL);
|
putchar(BELL);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user