From f21aebc2097477ec8f0c32bca653057c4ef37896 Mon Sep 17 00:00:00 2001 From: Thomas Roessler Date: Mon, 25 Sep 2000 13:02:51 +0000 Subject: [PATCH] patch-1.3.9.bj.f-up-prompt.1 --- send.c | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/send.c b/send.c index 47666c82..01742523 100644 --- a/send.c +++ b/send.c @@ -428,18 +428,21 @@ static int include_reply (CONTEXT *ctx, HEADER *cur, FILE *out) static int default_to (ADDRESS **to, ENVELOPE *env, int flags) { char prompt[STRING]; - int i = 0; if (flags && env->mail_followup_to) { snprintf (prompt, sizeof (prompt), _("Follow-up to %s%s?"), env->mail_followup_to->mailbox, - env->mail_followup_to->next ? "..." : ""); + env->mail_followup_to->next ? ",..." : ""); - if (query_quadoption (OPT_MFUPTO, prompt) == M_YES) + switch (query_quadoption (OPT_MFUPTO, prompt)) { + case M_YES: rfc822_append (to, env->mail_followup_to); return 0; + + case -1: + return -1; /* abort */ } } @@ -484,12 +487,19 @@ static int default_to (ADDRESS **to, ENVELOPE *env, int flags) snprintf (prompt, sizeof (prompt), _("Reply to %s%s?"), env->reply_to->mailbox, env->reply_to->next?",...":""); - if ((i = query_quadoption (OPT_REPLYTO, prompt)) == M_YES) + switch (query_quadoption (OPT_REPLYTO, prompt)) + { + case M_YES: rfc822_append (to, env->reply_to); - else if (i == M_NO) + break; + + case M_NO: rfc822_append (to, env->from); - else + break; + + default: return (-1); /* abort */ + } } else rfc822_append (to, env->reply_to); -- 2.40.0