WHERE char *Editor;
WHERE char *EscChar;
WHERE char *FolderFormat;
+WHERE char *ForwardAttrIntro;
+WHERE char *ForwardAttrTrailer;
WHERE char *ForwFmt;
WHERE char *Fqdn;
WHERE char *HdrFmt;
** .pp
** Also see the $$record variable.
*/
+ { "forward_attribution_intro", DT_STR, R_NONE, UL &ForwardAttrIntro, UL "----- Forwarded message from %f -----" },
+ /*
+ ** .pp
+ ** This is the string that will precede a message which has been forwarded
+ ** in the main body of a message (when $$mime_forward is unset).
+ ** For a full listing of defined \fCprintf(3)\fP-like sequences see
+ ** the section on $$index_format. See also $$attribution_locale.
+ */
+ { "forward_attribution_trailer", DT_STR, R_NONE, UL &ForwardAttrTrailer, UL "----- End forwarded message -----" },
+ /*
+ ** .pp
+ ** This is the string that will follow a message which has been forwarded
+ ** in the main body of a message (when $$mime_forward is unset).
+ ** For a full listing of defined \fCprintf(3)\fP-like sequences see
+ ** the section on $$index_format. See also $$attribution_locale.
+ */
{ "forward_decode", DT_BOOL, R_NONE, OPTFORWDECODE, 1 },
/*
** .pp
void mutt_format_string (char *, size_t, int, int, int, char, const char *, size_t, int);
void mutt_format_s (char *, size_t, const char *, const char *);
void mutt_format_s_tree (char *, size_t, const char *, const char *);
-void mutt_forward_intro (FILE *fp, HEADER *cur);
-void mutt_forward_trailer (FILE *fp);
+void mutt_forward_intro (CONTEXT *ctx, HEADER *cur, FILE *fp);
+void mutt_forward_trailer (CONTEXT *ctx, HEADER *cur, FILE *fp);
void mutt_free_alias (ALIAS **);
void mutt_free_body (BODY **);
void mutt_free_color (int fg, int bg);
return;
}
- mutt_forward_intro (tmpfp, parent);
+ mutt_forward_intro (Context, parent, tmpfp);
/* prepare the prefix here since we'll need it later. */
goto bail;
}
- mutt_forward_trailer (tmpfp);
+ mutt_forward_trailer (Context, parent, tmpfp);
safe_fclose (&tmpfp);
tmpfp = NULL;
if (cur)
{
/* mutt_message_hook (cur->hdr, MUTT_MESSAGEHOOK); */
- mutt_forward_intro (tmpfp, cur->hdr);
+ mutt_forward_intro (Context, cur->hdr, tmpfp);
_mutt_copy_message (tmpfp, fp, cur->hdr, cur->hdr->content, cmflags, chflags);
- mutt_forward_trailer (tmpfp);
+ mutt_forward_trailer (Context, cur->hdr, tmpfp);
}
else
{
if (idx[i]->content->tagged)
{
/* mutt_message_hook (idx[i]->content->hdr, MUTT_MESSAGEHOOK); */
- mutt_forward_intro (tmpfp, idx[i]->content->hdr);
+ mutt_forward_intro (Context, idx[i]->content->hdr, tmpfp);
_mutt_copy_message (tmpfp, fp, idx[i]->content->hdr,
idx[i]->content->hdr->content, cmflags, chflags);
- mutt_forward_trailer (tmpfp);
+ mutt_forward_trailer (Context, idx[i]->content->hdr, tmpfp);
}
}
}
}
}
-void mutt_forward_intro (FILE *fp, HEADER *cur)
+void mutt_forward_intro (CONTEXT *ctx, HEADER *cur, FILE *fp)
{
- char buffer[STRING];
-
- fputs ("----- Forwarded message from ", fp);
- buffer[0] = 0;
- rfc822_write_address (buffer, sizeof (buffer), cur->env->from, 1);
- fputs (buffer, fp);
- fputs (" -----\n\n", fp);
+ char buffer[LONG_STRING];
+
+ if (ForwardAttrIntro)
+ {
+ setlocale (LC_TIME, NONULL (AttributionLocale));
+ mutt_make_string (buffer, sizeof (buffer), ForwardAttrIntro, ctx, cur);
+ setlocale (LC_TIME, "");
+ fputs (buffer, fp);
+ fputs ("\n\n", fp);
+ }
}
-void mutt_forward_trailer (FILE *fp)
+void mutt_forward_trailer (CONTEXT *ctx, HEADER *cur, FILE *fp)
{
- fputs ("\n----- End forwarded message -----\n", fp);
+ char buffer[LONG_STRING];
+
+ if (ForwardAttrTrailer)
+ {
+ setlocale (LC_TIME, NONULL (AttributionLocale));
+ mutt_make_string (buffer, sizeof (buffer), ForwardAttrTrailer, ctx, cur);
+ setlocale (LC_TIME, "");
+ fputc ('\n', fp);
+ fputs (buffer, fp);
+ fputc ('\n', fp);
+ }
}
crypt_valid_passphrase (cur->security);
}
- mutt_forward_intro (out, cur);
+ mutt_forward_intro (ctx, cur, out);
if (option (OPTFORWDECODE))
{
chflags |= CH_DISPLAY;
mutt_copy_message (out, ctx, cur, cmflags, chflags);
- mutt_forward_trailer (out);
+ mutt_forward_trailer (ctx, cur, out);
return 0;
}