]> granicus.if.org Git - mutt/commitdiff
Fix some (too lazy and tired to do all) of the inconsistencies
authorThomas Roessler <roessler@does-not-exist.org>
Tue, 25 Feb 2003 22:00:38 +0000 (22:00 +0000)
committerThomas Roessler <roessler@does-not-exist.org>
Tue, 25 Feb 2003 22:00:38 +0000 (22:00 +0000)
between message and attachment bouncing.

commands.c
recvcmd.c

index c268ef4a70ab87c0352da730159e6f0076c74ced..6b505a632979c9d0d0cc2e950d8271ee81573e37 100644 (file)
@@ -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);
index 18cd66d61f812130ab5522a53bc9689c26fab071..9a758add57c7d00fa308cc31852513afd993ef82 100644 (file)
--- 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;