if (msg->content->next)
msg->content = mutt_make_multipart(msg->content);
- if (mutt_write_fcc(fname, msg, NULL, 0, NULL, NULL) < 0)
+ if (mutt_write_fcc(fname, msg, NULL, false, NULL, NULL) < 0)
msg->content = mutt_remove_multipart(msg->content);
else
mutt_message(_("Message written."));
if (!Postponed || mutt_write_fcc(NONULL(Postponed), msg,
(cur && (flags & SEND_REPLY)) ? cur->env->message_id : NULL,
- 1, fcc, NULL) < 0)
+ true, fcc, NULL) < 0)
{
msg->content = mutt_remove_multipart(msg->content);
decode_descriptions(msg->content);
* message was first postponed.
*/
msg->received = time(NULL);
- if (mutt_write_multiple_fcc(fcc, msg, NULL, 0, NULL, &finalpath) == -1)
+ if (mutt_write_multiple_fcc(fcc, msg, NULL, false, NULL, &finalpath) == -1)
{
/* Error writing FCC, we should abort sending. */
fcc_error = true;
* @retval -1 Failure
*/
int mutt_write_multiple_fcc(const char *path, struct Header *hdr, const char *msgid,
- int post, char *fcc, char **finalpath)
+ bool post, char *fcc, char **finalpath)
{
char fcc_tok[PATH_MAX];
char fcc_expanded[PATH_MAX];
* @retval -1 Failure
*/
int mutt_write_fcc(const char *path, struct Header *hdr, const char *msgid,
- int post, char *fcc, char **finalpath)
+ bool post, char *fcc, char **finalpath)
{
struct Context f;
struct Message *msg = NULL;
/* post == 1 => postpone message. Set mode = -1 in mutt_rfc822_write_header()
* post == 0 => Normal mode. Set mode = 0 in mutt_rfc822_write_header()
- * */
- mutt_rfc822_write_header(msg->fp, hdr->env, hdr->content, post ? -post : 0, false);
+ */
+ mutt_rfc822_write_header(msg->fp, hdr->env, hdr->content, post ? -1 : 0, false);
/* (postponement) if this was a reply of some sort, <msgid> contains the
* Message-ID: of message replied to. Save it using a special X-Mutt-
void mutt_unprepare_envelope(struct Envelope *env);
void mutt_update_encoding(struct Body *a);
void mutt_write_address_list(struct Address *addr, FILE *fp, int linelen, bool display);
-int mutt_write_fcc(const char *path, struct Header *hdr, const char *msgid, int post, char *fcc, char **finalpath);
+int mutt_write_fcc(const char *path, struct Header *hdr, const char *msgid, bool post, char *fcc, char **finalpath);
int mutt_write_mime_body(struct Body *a, FILE *f);
int mutt_write_mime_header(struct Body *a, FILE *f);
-int mutt_write_multiple_fcc(const char *path, struct Header *hdr, const char *msgid, int post, char *fcc, char **finalpath);
+int mutt_write_multiple_fcc(const char *path, struct Header *hdr, const char *msgid, bool post, char *fcc, char **finalpath);
int mutt_write_one_header(FILE *fp, const char *tag, const char *value, const char *pfx, int wraplen, int flags);
void mutt_write_references(const struct ListHead *r, FILE *f, size_t trim);