X-Git-Url: http://git.madism.org/?a=blobdiff_plain;ds=sidebyside;f=compose.c;h=a0eb9acd6b3f028a12761e570bc55d7b5fae81ef;hb=c6b9d35ed9361e4defab9762a7480d5126405ae9;hp=f5d6d2b730abd16d6f4ae734eb5e89e070aa5518;hpb=7f7a0be369840b290248e5b0302beb447fa1b3cd;p=apps%2Fmadmutt.git diff --git a/compose.c b/compose.c index f5d6d2b..a0eb9ac 100644 --- a/compose.c +++ b/compose.c @@ -18,6 +18,7 @@ #include #include #include +#include #include "mutt.h" #include "enter.h" @@ -479,7 +480,7 @@ static const char *compose_format_str (char *buf, size_t buflen, char op, break; case 'v': - strncpy (buf, mutt_make_version (0), buflen); + m_strcpy(buf, buflen, mutt_make_version (0)); break; case 0: @@ -696,7 +697,7 @@ int mutt_compose_menu (HEADER * msg, /* structure for new message */ 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); @@ -706,10 +707,11 @@ int mutt_compose_menu (HEADER * msg, /* structure for new message */ } /* 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,