return (0);
hdr = mutt_new_header ();
- mutt_read_rfc822_header (f, hdr);
+ mutt_read_rfc822_header (f, hdr, 0);
if (!(hdr->read || hdr->old))
result = 1;
mutt_free_header (&hdr);
/* Read the temp file back in */
ifp = fopen (path, "r");
ofp = safe_fopen (body, "w");
- n = mutt_read_rfc822_header (ifp, NULL);
+ n = mutt_read_rfc822_header (ifp, NULL, 1);
while ((i = fread (buffer, 1, sizeof (buffer), ifp)) > 0)
fwrite (buffer, 1, i, ofp);
fclose (ofp);
ctx->hdrs[ctx->msgcount] = mutt_new_header ();
ctx->hdrs[ctx->msgcount]->index = ctx->msgcount;
- ctx->hdrs[msgno]->env = mutt_read_rfc822_header (fp, ctx->hdrs[msgno]);
+ ctx->hdrs[msgno]->env = mutt_read_rfc822_header (fp, ctx->hdrs[msgno], 0);
ploc=ftell(fp);
ctx->hdrs[msgno]->read = h->read;
ctx->hdrs[msgno]->old = h->old;
tempfile = safe_strdup (buf);
if (draftFile)
- msg->env = mutt_read_rfc822_header (fin, NULL);
+ msg->env = mutt_read_rfc822_header (fin, NULL, 1);
if (tempfile)
{
else
hdr->received = t + tz;
- hdr->env = mutt_read_rfc822_header (ctx->fp, hdr);
+ hdr->env = mutt_read_rfc822_header (ctx->fp, hdr, 0);
loc = ftell (ctx->fp);
curhdr->offset = loc;
curhdr->index = ctx->msgcount;
- curhdr->env = mutt_read_rfc822_header (ctx->fp, curhdr);
+ curhdr->env = mutt_read_rfc822_header (ctx->fp, curhdr, 0);
/* if we know how long this message is, either just skip over the body,
* or if we don't know how many lines there are, count them now (this will
if ((f = fopen (fname, "r")) != NULL)
{
h = mutt_new_header();
- h->env = mutt_read_rfc822_header (f, h);
+ h->env = mutt_read_rfc822_header (f, h, 0);
fstat (fileno (f), &st);
fclose (f);
parent->hdr = mutt_new_header ();
parent->hdr->offset = ftell (fp);
- parent->hdr->env = mutt_read_rfc822_header (fp, parent->hdr);
+ parent->hdr->env = mutt_read_rfc822_header (fp, parent->hdr, 0);
msg = parent->hdr->content;
/* ignore the length given in the content-length since it could be wrong
*
* f stream to read from
*
- * hdr header structure of current message (optional). If hdr is
- * NULL, then we are reading a postponed message, or called
- * from mutt_edit_headers() so we should keep a list of the
- * user-defined headers.
+ * hdr header structure of current message (optional).
+ *
+ * user_hdrs If set, store user headers. Used for edit-message and
+ * postpone modes.
+ *
*/
-ENVELOPE *mutt_read_rfc822_header (FILE *f, HEADER *hdr)
+ENVELOPE *mutt_read_rfc822_header (FILE *f, HEADER *hdr, short user_hdrs)
{
ENVELOPE *e = mutt_new_envelope();
LIST *last = NULL;
}
/* Keep track of the user-defined headers */
- if (!matched)
+ if (!matched && user_hdrs)
{
if (last)
{
/* $Id$ */
+
+/* XXX this file duplicates content from protos.h */
+
BODY *mutt_parse_multipart (FILE *, const char *, long, int);
BODY *mutt_parse_messageRFC822 (FILE *, BODY *);
BODY *mutt_read_mime_header (FILE *, int);
-ENVELOPE *mutt_read_rfc822_header (FILE *, HEADER *);
+ENVELOPE *mutt_read_rfc822_header (FILE *, HEADER *, short);
time_t is_from (const char *, char *, size_t);
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
-"POT-Creation-Date: 1998-10-15 00:54+0200\n"
+"POT-Creation-Date: 1998-10-15 03:08+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
msgid "Could not open %s"
msgstr ""
-#: sendlib.c:1694
+#: sendlib.c:1695
#, c-format
msgid "Error sending message, child exited %d (%s).\n"
msgstr ""
-#: sendlib.c:1696
+#: sendlib.c:1697
#, c-format
msgid "Saved output of child process to %s.\n"
msgstr ""
-#: sendlib.c:1700
+#: sendlib.c:1701
msgid "Error sending message."
msgstr ""
return (-1);
fseek (msg->fp, hdr->offset, 0);
- newhdr->env = mutt_read_rfc822_header (msg->fp, newhdr);
+ newhdr->env = mutt_read_rfc822_header (msg->fp, newhdr, 1);
if (hdr->content->type == TYPEMESSAGE || hdr->content->type == TYPEMULTIPART)
{
BODY *mutt_parse_messageRFC822 (FILE *, BODY *);
BODY *mutt_read_mime_header (FILE *, int);
-ENVELOPE *mutt_read_rfc822_header (FILE *, HEADER *);
+ENVELOPE *mutt_read_rfc822_header (FILE *, HEADER *, short);
HEADER *mutt_dup_header (HEADER *);
ATTACHPTR **mutt_gen_attach_list (BODY *, ATTACHPTR **, short *, short *, int, int);
body->hdr = mutt_new_header();
body->hdr->offset = 0;
- body->hdr->env = mutt_read_rfc822_header(fp, body->hdr);
+ /* we don't need the user headers here */
+ body->hdr->env = mutt_read_rfc822_header(fp, body->hdr, 0);
#ifdef _PGPPATH
body->hdr->pgp = pgp;
#endif /* _PGPPATH */