#endif
#include <lib-lib/mem.h>
+#include <lib-lib/str.h>
+#include <lib-lib/macros.h>
+#include <lib-lib/file.h>
#include "mutt.h"
#include "enter.h"
#include "nntp.h"
#endif
-#include "lib/intl.h"
-#include "lib/str.h"
#include <errno.h>
#include <string.h>
if (t && t[0] == '0' && t[1] == '\0')
t = "<random>";
- if (c + str_len (t) + 2 >= COLS - SW)
+ if (c + m_strlen(t) + 2 >= COLS - SW)
break;
addstr (NONULL (t));
if (chain->next)
addstr (", ");
- c += str_len (t) + 2;
+ c += m_strlen(t) + 2;
}
}
#endif /* MIXMASTER */
&& buf[0]) {
p_delete(&msg->env->newsgroups);
str_skip_trailws (buf);
- msg->env->newsgroups = str_dup (str_skip_initws (buf));
+ msg->env->newsgroups = m_strdup(str_skip_initws (buf));
move (HDR_TO, HDR_XOFFSET);
clrtoeol ();
if (msg->env->newsgroups)
&& buf[0]) {
p_delete(&msg->env->followup_to);
str_skip_trailws (buf);
- msg->env->followup_to = str_dup (str_skip_initws (buf));
+ msg->env->followup_to = m_strdup(str_skip_initws (buf));
move (HDR_CC, HDR_XOFFSET);
clrtoeol ();
if (msg->env->followup_to)
if (mutt_get_field ("X-Comment-To: ", buf, sizeof (buf), 0) == 0
&& buf[0]) {
p_delete(&msg->env->x_comment_to);
- msg->env->x_comment_to = str_dup (buf);
+ msg->env->x_comment_to = m_strdup(buf);
move (HDR_BCC, HDR_XOFFSET);
clrtoeol ();
if (msg->env->x_comment_to)
mutt_message_hook (NULL, msg, M_SEND2HOOK);
break;
case OP_COMPOSE_EDIT_MESSAGE:
- if (Editor && (str_cmp ("builtin", Editor) != 0)
+ if (Editor && (m_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 (str_cmp ("builtin", Editor) != 0 &&
+ if (m_strcmp("builtin", Editor) != 0 &&
(op == OP_COMPOSE_EDIT_HEADERS ||
(op == OP_COMPOSE_EDIT_MESSAGE && option (OPTEDITHDRS)))) {
- const char *tag = NULL, *err = NULL;
+ const char *tag = NULL;
+ char *err = NULL;
mutt_env_to_local (msg->env);
mutt_edit_headers (NONULL (Editor), msg->content->filename, msg,