o = NULL;
} else {
new = p_new(char, n + m + 1);
- strcpy(new, o);
- strcpy(new + n, s);
+ m_strcpy(new, n + m + 1, o);
+ m_strcpy(new + n, m + 1, s);
}
}
* field, so we can attempt to convert the type to BODY here.
*/
switch (ct->type) {
- char buffer[SHORT_STRING];
+ char buffer[STRING];
case TYPETEXT:
ct->subtype = m_strdup("plain");
pc = parameter_getval(ct->parameter, "charset");
if (!pc) {
parameter_setval(&ct->parameter, "charset",
- charset_getfirst(AssumedCharset));
+ charset_getfirst(MCharset.assumed_charset));
}
}
}
if (b->subtype) {
fseeko(fp, b->offset, SEEK_SET);
- if (mutt_is_message_type(b->type, b->subtype)) {
+ if (mutt_is_message_type(b)) {
b->parts = mutt_parse_messageRFC822(fp, b);
} else
if (mime_which_token(b->subtype, -1) == MIME_EXTERNAL_BODY) {
time_t mutt_parse_date(const char *s, HEADER *h)
{
int zhours = 0, zminutes = 0, zoccident = 0;
- char scratch[SHORT_STRING];
+ char scratch[STRING];
struct tm tm;
int count = 0;
char *p;
p_clear(&tm, 1);
while ((p = strtok (p, " \t")) != NULL) {
- char tzstr[SHORT_STRING];
+ char tzstr[STRING];
const char *ptz;
switch (count) {
/* restore the original line */
line[m_strlen(line)] = ':';
- if (weed && option(OPTWEED) && mutt_matches_ignore(line, Ignore)
- && !mutt_matches_ignore(line, UnIgnore)) {
+ if (weed && string_list_contains(Ignore, line, "*")
+ && !string_list_contains(UnIgnore, line, "*")) {
break;
}
{
/* if spam tag already exists, figure out how to amend it */
if (e->spam && *buf) {
- if (SpamSep) {
- /* If SpamSep defined, append with separator */
- mutt_buffer_addstr(e->spam, SpamSep);
- mutt_buffer_addstr(e->spam, buf);
+ if (Mime.spam_separator) {
+ mutt_buffer_addstr(e->spam, Mime.spam_separator);
} else {
- /* else overwrite */
mutt_buffer_reset(e->spam);
- mutt_buffer_addstr(e->spam, buf);
}
+ mutt_buffer_addstr(e->spam, buf);
}
if (!e->spam) {
int mutt_count_body_parts(HEADER *hdr, int flags)
{
- if (!option(OPTCOUNTATTACH))
- return 0;
-
if (hdr->attach_valid && !(flags & M_PARTS_RECOUNT))
return hdr->attach_total;