X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=recvcmd.c;h=d3059fffaf6b9d9a3e563b2553e788dae290c0d8;hp=71fc95b8988ed27215ea8ca76cd0f246c4f6c702;hb=8b89861e79d1b2e8ddcc54ea4d89957d6d10ebe6;hpb=008170b67979fad71bc48537eeb879f51610275a diff --git a/recvcmd.c b/recvcmd.c index 71fc95b..d3059ff 100644 --- a/recvcmd.c +++ b/recvcmd.c @@ -11,7 +11,7 @@ #include -#include +#include #include #include #include @@ -155,7 +155,6 @@ void mutt_attach_bounce (FILE * fp, HEADER * hdr __attribute__ ((unused)), buf[0] = 0; rfc822_addrcat(buf, sizeof(buf), adr, 1); -#define extra_space (15+7+2) /* * See commands.c. */ @@ -163,23 +162,25 @@ void mutt_attach_bounce (FILE * fp, HEADER * hdr __attribute__ ((unused)), (p ? _("Bounce message to %s") : _("Bounce messages to %s")), buf); - if (m_strwidth(prompt) > COLS - extra_space) { - mutt_format_string (prompt, sizeof (prompt) - 4, - 0, COLS - extra_space, 0, 0, +#define extra_space (15+7+2) + if (m_strwidth(prompt) > getmaxx(main_w) - extra_space) { + mutt_format_string (prompt, sizeof (prompt) - 4, 0, + getmaxx(main_w) - extra_space, 0, 0, prompt, sizeof (prompt), 0); m_strcat(prompt, sizeof(prompt), "...?"); } else { m_strcat(prompt, sizeof(prompt), "?"); } +#undef extra_space if (query_quadoption (OPT_BOUNCE, prompt) != M_YES) { address_list_wipe(&adr); - CLEARLINE (LINES - 1); + CLEARLINE(main_w, LINES - 1); mutt_message (p ? _("Message not bounced.") : _("Messages not bounced.")); return; } - CLEARLINE (LINES - 1); + CLEARLINE(main_w, LINES - 1); if (cur) ret = mutt_bounce_message (fp, cur->hdr, adr); @@ -440,7 +441,7 @@ static void attach_forward_bodies (FILE * fp, HEADER * hdr, tmphdr->env = envelope_new(); mutt_make_forward_subject (tmphdr->env, Context, parent); - tmpfp = m_tempfile(tmpbody, sizeof(tmpbody), NONULL(MCore.tmpdir), NULL); + tmpfp = m_tempfile(tmpbody, sizeof(tmpbody), NONULL(mod_core.tmpdir), NULL); if (!tmpfp) { mutt_error(_("Could not create temporary file")); return; @@ -602,7 +603,7 @@ static void attach_forward_msgs (FILE * fp, HEADER * hdr __attribute__ ((unused) /* no MIME encapsulation */ - tmpfp = m_tempfile(tmpbody, sizeof(tmpbody), NONULL(MCore.tmpdir), NULL); + tmpfp = m_tempfile(tmpbody, sizeof(tmpbody), NONULL(mod_core.tmpdir), NULL); if (!tmpfp) { mutt_error(_("Could not create temporary file")); header_delete(&tmphdr); @@ -849,7 +850,7 @@ void mutt_attach_reply (FILE * fp, HEADER * hdr, return; } - tmpfp = m_tempfile(tmpbody, sizeof(tmpbody), NONULL(MCore.tmpdir), NULL); + tmpfp = m_tempfile(tmpbody, sizeof(tmpbody), NONULL(mod_core.tmpdir), NULL); if (!tmpfp) { mutt_error(_("Could not create temporary file")); header_delete(&tmphdr);