#include "rfc2047.h"
#include "keymap.h"
#include "mime.h"
-#include "mailbox.h"
#include "copy.h"
#include "mx.h"
#include "mutt_crypt.h"
#include "mutt_idna.h"
#include "url.h"
+#include "lib/mem.h"
+#include "lib/intl.h"
+#include "lib/str.h"
+#include "lib/debug.h"
+
#include <ctype.h>
#include <stdlib.h>
#include <unistd.h>
return (-1);
}
- mutt_str_replace (&en->subject, buf);
+ str_replace (&en->subject, buf);
return 0;
}
env->reply_to = rfc822_parse_adrlist (env->reply_to, uh->data + 9);
}
else if (ascii_strncasecmp ("message-id:", uh->data, 11) == 0)
- mutt_str_replace (&env->message_id, uh->data + 11);
+ str_replace (&env->message_id, uh->data + 11);
else if (ascii_strncasecmp ("to:", uh->data, 3) != 0 &&
ascii_strncasecmp ("cc:", uh->data, 3) != 0 &&
ascii_strncasecmp ("bcc:", uh->data, 4) != 0 &&
/* set the default subject for the message. */
mutt_make_string (buffer, sizeof (buffer), NONULL (ForwFmt), ctx, cur);
- mutt_str_replace (&env->subject, buffer);
+ str_replace (&env->subject, buffer);
}
void mutt_make_misc_reply_headers (ENVELOPE * env, CONTEXT * ctx,
if ((flags & SENDNEWS)) {
/* in case followup set Newsgroups: with Followup-To: if it present */
if (!env->newsgroups && curenv &&
- mutt_strcasecmp (curenv->followup_to, "poster"))
+ safe_strcasecmp (curenv->followup_to, "poster"))
env->newsgroups = safe_strdup (curenv->followup_to);
}
else
}
if (!tempfp) {
- dprint (1,
- (debugfile,
- "newsend_message: can't create tempfile %s (errno=%d)\n",
- msg->content->filename, errno));
+ debug_print (1, ("can't create tempfile %s (errno=%d)\n",
+ msg->content->filename, errno));
mutt_perror (msg->content->filename);
goto cleanup;
}
*/
#ifdef USE_IMAP
- if ((flags & SENDBATCH) && fcc[0] && mx_is_imap (fcc))
+ if ((flags & SENDBATCH) && fcc[0] && mx_get_magic (fcc) == M_IMAP)
fcc[0] = '\0';
#endif