if (!p)
continue;
- switch (mime_which_token(uh->data, p - uh->data)) {
+ switch (mime_which_token(uh->data, p++ - uh->data)) {
case MIME_TO:
env->to = rfc822_parse_adrlist(env->to, p);
break;
for (uh = UserHeader; uh; uh = uh->next) {
const char *p = strchr(uh->data, ':');
+ if (!p)
+ continue;
- switch (mime_which_token(uh->data, (p ?: uh->data) - uh->data)) {
+ switch (mime_which_token(uh->data, p++ - uh->data)) {
case MIME_FROM:
/* User has specified a default From: address. Remove default address */
address_list_wipe(&env->from);
else if (option (OPTUSEDOMAIN)) {
const char *fqdn = mutt_fqdn (1);
adr = address_new();
- adr->mailbox = p_new(char, m_strlen(Username) + m_strlen(fqdn) + 2);
- sprintf(adr->mailbox, "%s@%s", NONULL(Username), NONULL(fqdn));
+ adr->mailbox = p_new(char, m_strlen(MCore.username) + m_strlen(fqdn) + 2);
+ sprintf(adr->mailbox, "%s@%s", NONULL(MCore.username), NONULL(fqdn));
} else {
adr = address_new ();
- adr->mailbox = m_strdup(NONULL(Username));
+ adr->mailbox = m_strdup(NONULL(MCore.username));
}
return (adr);
int i;
/* Write out the message in MIME form. */
- tempfp = m_tempfile(tempfile, sizeof(tempfile), NONULL(Tempdir), NULL);
+ tempfp = m_tempfile(tempfile, sizeof(tempfile), NONULL(MCore.tmpdir), NULL);
if (!tempfp)
return -1;
if (!tempfile) {
char buffer[_POSIX_PATH_MAX];
- tempfp = m_tempfile(buffer, sizeof(buffer), NONULL(Tempdir), NULL);
+ tempfp = m_tempfile(buffer, sizeof(buffer), NONULL(MCore.tmpdir), NULL);
msg->content->filename = m_strdup(buffer);
} else {
tempfp = safe_fopen(tempfile, "a+");
process_user_header (msg->env);
- if (option (OPTSIGONTOP) && (!(flags & SENDKEY) && Editor))
+ if (option (OPTSIGONTOP) && (!(flags & SENDKEY)))
append_signature (tempfp);
/* include replies/forwarded messages, unless we are given a template */
&& generate_body (tempfp, msg, flags, ctx, cur) == -1)
goto cleanup;
- if (!option (OPTSIGONTOP) && (!(flags & SENDKEY) && Editor))
+ if (!option (OPTSIGONTOP) && (!(flags & SENDKEY)))
append_signature (tempfp);
/*
goto cleanup;
} else if (option (OPTEDITHDRS)) {
mutt_env_to_local (msg->env);
- mutt_edit_headers (Editor, msg->content->filename, msg, fcc,
- sizeof (fcc));
+ mutt_edit_headers(msg->content->filename, msg, fcc, sizeof (fcc));
mutt_env_to_idna (msg->env, NULL, NULL);
}
else {
- mutt_edit_file (Editor, msg->content->filename);
+ mutt_edit_file(msg->content->filename);
if (stat (msg->content->filename, &st) == 0) {
if (mtime != st.st_mtime)