while (*s && *s < M_TREE_MAX) {
switch (*s) {
case M_TREE_LLCORNER:
- if (option (OPTASCIICHARS))
- addch ('`');
- else if (Charset_is_utf8)
- addstr ("\342\224\224"); /* WACS_LLCORNER */
- else
- addch (ACS_LLCORNER);
+ waddch (stdscr, ACS_LLCORNER);
break;
case M_TREE_ULCORNER:
- if (option (OPTASCIICHARS))
- addch (',');
- else if (Charset_is_utf8)
- addstr ("\342\224\214"); /* WACS_ULCORNER */
- else
- addch (ACS_ULCORNER);
+ waddch (stdscr, ACS_ULCORNER);
break;
case M_TREE_LTEE:
- if (option (OPTASCIICHARS))
- addch ('|');
- else if (Charset_is_utf8)
- addstr ("\342\224\234"); /* WACS_LTEE */
- else
- addch (ACS_LTEE);
+ waddch (stdscr, ACS_LTEE);
break;
case M_TREE_HLINE:
- if (option (OPTASCIICHARS))
- addch ('-');
- else if (Charset_is_utf8)
- addstr ("\342\224\200"); /* WACS_HLINE */
- else
- addch (ACS_HLINE);
+ waddch (stdscr, ACS_HLINE);
break;
case M_TREE_VLINE:
- if (option (OPTASCIICHARS))
- addch ('|');
- else if (Charset_is_utf8)
- addstr ("\342\224\202"); /* WACS_VLINE */
- else
- addch (ACS_VLINE);
+ waddch (stdscr, ACS_VLINE);
break;
case M_TREE_TTEE:
- if (option (OPTASCIICHARS))
- addch ('-');
- else if (Charset_is_utf8)
- addstr ("\342\224\254"); /* WACS_TTEE */
- else
- addch (ACS_TTEE);
+ waddch (stdscr, ACS_TTEE);
break;
case M_TREE_BTEE:
- if (option (OPTASCIICHARS))
- addch ('-');
- else if (Charset_is_utf8)
- addstr ("\342\224\264"); /* WACS_BTEE */
- else
- addch (ACS_BTEE);
+ waddch (stdscr, ACS_BTEE);
break;
case M_TREE_SPACE:
- addch (' ');
+ waddch (stdscr, ' ');
break;
case M_TREE_RARROW:
- addch ('>');
+ waddch (stdscr, '>');
break;
case M_TREE_STAR:
- addch ('*'); /* fake thread indicator */
+ waddch (stdscr, '*'); /* fake thread indicator */
break;
case M_TREE_HIDDEN:
- addch ('&');
+ waddch (stdscr, '&');
break;
case M_TREE_EQUALS:
- addch ('=');
+ waddch (stdscr, '=');
break;
case M_TREE_MISSING:
- addch ('?');
+ waddch (stdscr, '?');
break;
}
s++, n--;
}
if (do_color)
- attrset (attr);
+ wattrset (stdscr, attr);
}
else if ((k = mbrtowc (&wc, (char *) s, n, &mbstate)) != (size_t)-1) {
- addnstr ((char *) s, k);
+ waddnstr (stdscr, (char *) s, k);
s += k, n -= k;
}
else
void menu_redraw_full (MUTTMENU * menu)
{
SETCOLOR (MT_COLOR_NORMAL);
- /* clear() doesn't optimize screen redraws */
- move (0, 0);
- clrtobot ();
+ /* wclear(stdscr) doesn't optimize screen redraws */
+ wmove (stdscr, 0, 0);
+ wclrtobot (stdscr);
if (option (OPTHELP)) {
SETCOLOR (MT_COLOR_STATUS);
- move (option (OPTSTATUSONTOP) ? LINES - 2 : 0, SW);
+ wmove (stdscr, option (OPTSTATUSONTOP) ? LINES - 2 : 0, SW);
mutt_paddstr (COLS-SW, "");
SETCOLOR (MT_COLOR_NORMAL);
menu->offset = 1;
snprintf (buf, sizeof (buf), M_MODEFMT, menu->title);
SETCOLOR (MT_COLOR_STATUS);
- move (option (OPTSTATUSONTOP) ? 0 : LINES - 2, SW);
+ wmove (stdscr, option (OPTSTATUSONTOP) ? 0 : LINES - 2, SW);
mutt_paddstr (COLS-SW, buf);
SETCOLOR (MT_COLOR_NORMAL);
menu->redraw &= ~REDRAW_STATUS;
menu_make_entry (buf, sizeof (buf), menu, i);
menu_pad_string (buf, sizeof (buf));
- attrset (menu->color (i));
+ wattrset (stdscr, menu->color (i));
if (i == menu->current) {
ADDCOLOR (MT_COLOR_INDICATOR);
CLEARLINE_WIN (i - menu->top + menu->offset);
- move (i - menu->top + menu->offset, SW);
+ wmove (stdscr, i - menu->top + menu->offset, SW);
print_enriched_string (menu->color (i), (unsigned char *) buf,
i != menu->current);
SETCOLOR (MT_COLOR_NORMAL);
return;
}
- move (menu->oldcurrent + menu->offset - menu->top, SW);
+ wmove (stdscr, menu->oldcurrent + menu->offset - menu->top, SW);
SETCOLOR (MT_COLOR_NORMAL);
BKGDSET (MT_COLOR_NORMAL);
/* erase the current indicator */
- attrset (menu->color (menu->oldcurrent));
- clrtoeol ();
+ wattrset (stdscr, menu->color (menu->oldcurrent));
+ wclrtoeol (stdscr);
menu_make_entry (buf, sizeof (buf), menu, menu->oldcurrent);
menu_pad_string (buf, sizeof (buf));
print_enriched_string (menu->color (menu->oldcurrent),
/* now draw the new one to reflect the change */
menu_make_entry (buf, sizeof (buf), menu, menu->current);
menu_pad_string (buf, sizeof (buf));
- attrset (menu->color (menu->current));
+ wattrset (stdscr, menu->color (menu->current));
ADDCOLOR (MT_COLOR_INDICATOR);
BKGDSET (MT_COLOR_INDICATOR);
CLEARLINE_WIN (menu->current - menu->top + menu->offset);
- move (menu->current + menu->offset - menu->top, SW);
+ wmove (stdscr, menu->current + menu->offset - menu->top, SW);
print_enriched_string (menu->color (menu->current), (unsigned char *) buf,
0);
SETCOLOR (MT_COLOR_NORMAL);
{
char buf[STRING];
- move (menu->current + menu->offset - menu->top, SW);
+ wmove (stdscr, menu->current + menu->offset - menu->top, SW);
menu_make_entry (buf, sizeof (buf), menu, menu->current);
menu_pad_string (buf, sizeof (buf));
- attrset (menu->color (menu->current));
+ wattrset (stdscr, menu->color (menu->current));
ADDCOLOR (MT_COLOR_INDICATOR);
BKGDSET (MT_COLOR_INDICATOR);
- clrtoeol ();
+ wclrtoeol (stdscr);
print_enriched_string (menu->color (menu->current), (unsigned char *) buf,
0);
SETCOLOR (MT_COLOR_NORMAL);
mutt_clear_error ();
SETCOLOR (MT_COLOR_NORMAL);
- mvaddstr (LINES - 1, 0, menu->prompt);
- clrtoeol ();
+ mvwaddstr (stdscr, LINES - 1, 0, menu->prompt);
+ wclrtoeol (stdscr);
}
}
menu->oldcurrent = menu->current;
if (option (OPTBRAILLEFRIENDLY))
- move (menu->current - menu->top + menu->offset, SW);
+ wmove (stdscr, menu->current - menu->top + menu->offset, SW);
else
- move (menu->current - menu->top + menu->offset, COLS - 1);
+ wmove (stdscr, menu->current - menu->top + menu->offset, COLS - 1);
mutt_refresh ();
i = km_dokey (menu->menu);
if (i == OP_TAG_PREFIX || i == OP_TAG_PREFIX_COND) {
if (menu->tagged) {
- mvaddstr (LINES - 1, 0, "Tag-");
- clrtoeol ();
+ mvwaddstr (stdscr, LINES - 1, 0, "Tag-");
+ wclrtoeol (stdscr);
i = km_dokey (menu->menu);
menu->tagprefix = 1;
CLEARLINE (LINES - 1);