static void snd_entry (char *b, ssize_t blen, MUTTMENU * menu, int num) {
- int w = MIN(COLS-SW, blen);
-
- m_strformat(b, w, AttachFormat, mutt_attach_fmt,
+ m_strformat(b, blen, COLS - SW, AttachFormat, mutt_attach_fmt,
((ATTACHPTR **)menu->data)[num],
M_FORMAT_STAT_FILE | (option(OPTARROWCURSOR) ? M_FORMAT_ARROWCURSOR : 0));
}
break;
}
- if (optional)
- compose_status_line (buf, buflen, menu, ifstr);
- else if (flags & M_FORMAT_OPTIONAL)
- compose_status_line (buf, buflen, menu, elstr);
+ if (flags & M_FORMAT_OPTIONAL)
+ compose_status_line(buf, buflen, menu, optional ? ifstr : elstr);
return (src);
}
static void compose_status_line (char *buf, ssize_t buflen, MUTTMENU * menu,
const char *p)
{
- int w = MIN(COLS - SW, buflen);
- m_strformat(buf, w, p, compose_format_str, menu, 0);
+ m_strformat(buf, buflen, COLS - SW, p, compose_format_str, menu, 0);
}
/* return values: