From: Thomas Roessler Date: Tue, 25 Feb 2003 22:00:38 +0000 (+0000) Subject: Fix some (too lazy and tired to do all) of the inconsistencies X-Git-Tag: mutt-1-5-4-rel~41 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6235726c080b7525e6c2f0a6426e5aac53da27fb;p=mutt Fix some (too lazy and tired to do all) of the inconsistencies between message and attachment bouncing. --- diff --git a/commands.c b/commands.c index c268ef4a..6b505a63 100644 --- a/commands.c +++ b/commands.c @@ -260,6 +260,8 @@ void ci_bounce_message (HEADER *h, int *redraw) /* * This is the printing width of "...? ([y=yes]/n=no): ?" plus 2 * for good measure. This is not ideal. FIXME. + * + * While you fix this, please go to recvcmd.c, and do the same thing there. */ snprintf (prompt, sizeof (prompt) - 4, (h ? _("Bounce message to %s") : _("Bounce messages to %s")), buf); diff --git a/recvcmd.c b/recvcmd.c index 18cd66d6..9a758add 100644 --- a/recvcmd.c +++ b/recvcmd.c @@ -146,14 +146,28 @@ void mutt_attach_bounce (FILE * fp, HEADER * hdr, || buf[0] == '\0') return; - adr = rfc822_parse_adrlist (adr, buf); + if (!(adr = rfc822_parse_adrlist (adr, buf))) + { + mutt_error _("Error parsing address!"); + return; + } + adr = mutt_expand_aliases (adr); buf[0] = 0; rfc822_write_address (buf, sizeof (buf), adr); - snprintf (prompt, sizeof (prompt), +#define extra_space (15+7+2) + /* + * See commands.c. + */ + snprintf (prompt, sizeof (prompt) - 4, cur ? _("Bounce message to %s...?") : _("Bounce messages to %s...?"), buf); + mutt_format_string (prompt, sizeof (prompt) - 4, + 0, COLS-extra_space, 0, 0, + prompt, sizeof (prompt), 0); + strcat (prompt, "...?"); /* __STRCAT_CHECKED__ */ + if (mutt_yesorno (prompt, M_YES) != M_YES) goto bail;