static void print_enriched_string (int attr, unsigned char *s, int do_color)
{
- wchar_t wc;
size_t k;
size_t n = mutt_strlen ((char *)s);
- mbstate_t mbstate;
- short f1, f2, b1, b2;
- memset (&mbstate, 0, sizeof (mbstate));
while (*s)
{
if (*s < M_TREE_MAX)
{
if (do_color)
- {
- pair_content(PAIR_NUMBER(ColorDefs[MT_COLOR_TREE]), &f1, &b1);
- pair_content(PAIR_NUMBER(attr), &f2, &b2);
- if (b1 == b2)
- SETCOLOR (MT_COLOR_TREE);
- }
+ SETCOLOR (MT_COLOR_TREE);
while (*s && *s < M_TREE_MAX)
{
switch (*s)
}
if (do_color) attrset(attr);
}
- else if ((k = mbrtowc (&wc, (char *)s, n, &mbstate)) > 0)
+ else if (*s > 0)
{
- addnstr ((char *)s, k);
- s += k, n-= k;
+ addnstr ((char *)s, 1);
+ s += 1, n-= 1;
}
else
break;
for (i=0; i < (*p)->max; i++)
FREE (&(*p)->dialog[i]);
- FREE ((*p)->dialog);
+ FREE (& (*p)->dialog);
}
FREE (p);