#include "mime.h"
#include "attach.h"
#include "mapping.h"
-#include "mailbox.h"
#include "sort.h"
#include "charset.h"
#include "mx.h"
+#include "buffy.h"
#include "compose.h"
#ifdef MIXMASTER
if (t && t[0] == '0' && t[1] == '\0')
t = "<random>";
- if (c + safe_strlen (t) + 2 >= COLS - SidebarWidth)
+ if (c + mutt_strlen (t) + 2 >= COLS - SidebarWidth)
break;
addstr (NONULL (t));
if (chain->next)
addstr (", ");
- c += safe_strlen (t) + 2;
+ c += mutt_strlen (t) + 2;
}
}
#endif /* MIXMASTER */
ComposeHelp);
if (option (OPTMBOXPANE))
- mutt_buffy_check (1);
+ buffy_check (1);
while (loop) {
#ifdef USE_NNTP
unset_option (OPTNEWS); /* for any case */
if (mutt_get_field ("Newsgroups: ", buf, sizeof (buf), 0) == 0
&& buf[0]) {
FREE (&msg->env->newsgroups);
- mutt_remove_trailing_ws (buf);
- msg->env->newsgroups = safe_strdup (mutt_skip_whitespace (buf));
+ str_skip_trailws (buf);
+ msg->env->newsgroups = safe_strdup (str_skip_initws (buf));
move (HDR_TO, HDR_XOFFSET);
clrtoeol ();
if (msg->env->newsgroups)
if (mutt_get_field ("Followup-To: ", buf, sizeof (buf), 0) == 0
&& buf[0]) {
FREE (&msg->env->followup_to);
- mutt_remove_trailing_ws (buf);
- msg->env->followup_to = safe_strdup (mutt_skip_whitespace (buf));
+ str_skip_trailws (buf);
+ msg->env->followup_to = safe_strdup (str_skip_initws (buf));
move (HDR_CC, HDR_XOFFSET);
clrtoeol ();
if (msg->env->followup_to)
mutt_message_hook (NULL, msg, M_SEND2HOOK);
break;
case OP_COMPOSE_EDIT_MESSAGE:
- if (Editor && (safe_strcmp ("builtin", Editor) != 0)
+ if (Editor && (mutt_strcmp ("builtin", Editor) != 0)
&& !option (OPTEDITHDRS)) {
mutt_edit_file (Editor, msg->content->filename);
mutt_update_encoding (msg->content);
}
/* fall through */
case OP_COMPOSE_EDIT_HEADERS:
- if (safe_strcmp ("builtin", Editor) != 0 &&
+ if (mutt_strcmp ("builtin", Editor) != 0 &&
(op == OP_COMPOSE_EDIT_HEADERS ||
(op == OP_COMPOSE_EDIT_MESSAGE && option (OPTEDITHDRS)))) {
char *tag = NULL, *err = NULL;
#endif
mutt_expand_path (fname, sizeof (fname));
#ifdef USE_IMAP
- if (!mx_is_imap (fname))
+ if (mx_get_magic (fname) != M_IMAP)
#endif
#ifdef USE_POP
- if (!mx_is_pop (fname))
+ if (mx_get_magic (fname) != M_POP)
#endif
#ifdef USE_NNTP
- if (!mx_is_nntp (fname) && !option (OPTNEWS))
+ if (mx_get_magic (fname) != M_NNTP && !option (OPTNEWS))
#endif
/* check to make sure the file exists and is readable */
if (access (fname, R_OK) == -1) {