*/
static size_t add_index_color(char *buf, size_t buflen, enum FormatFlag flags, char color)
{
- size_t len;
-
/* only add color markers if we are operating on main index entries. */
if (!(flags & MUTT_FORMAT_INDEX))
return 0;
if (color == MT_COLOR_INDEX)
{ /* buf might be uninitialized other cases */
- len = mutt_str_strlen(buf);
+ const size_t len = mutt_str_strlen(buf);
buf += len;
buflen -= len;
}
struct Context *ctx = NULL;
char fmt[SHORT_STRING], tmp[LONG_STRING], *p, *tags = NULL;
char *wch = NULL;
- int do_locales, i;
+ int i;
int optional = (flags & MUTT_FORMAT_OPTIONAL);
int threads = ((Sort & SORT_MASK) == SORT_THREADS);
int is_index = (flags & MUTT_FORMAT_INDEX);
- size_t len;
size_t colorlen;
hdr = hfi->hdr;
const char *cp = NULL;
struct tm *tm = NULL;
time_t T;
- int j = 0, invert = 0;
+ int j = 0;
if (optional && ((op == '[') || (op == '(')))
{
T -= (op == '(') ? hdr->received : hdr->date_sent;
is = (char *) prec;
+ int invert = 0;
if (*is == '>')
{
invert = 1;
p = buf;
cp = (op == 'd' || op == 'D') ? (NONULL(DateFormat)) : src;
+ int do_locales;
if (*cp == '!')
{
do_locales = 0;
else
do_locales = 1;
- len = buflen - 1;
+ size_t len = buflen - 1;
while (len > 0 && (((op == 'd' || op == 'D') && *cp) ||
(op == '{' && *cp != '}') || (op == '[' && *cp != ']') ||
(op == '(' && *cp != ')') || (op == '<' && *cp != '>')))