curses lint

This commit is contained in:
PatR
2018-12-26 01:45:17 -08:00
parent cae50298b6
commit ceb446eaea
4 changed files with 44 additions and 40 deletions

View File

@@ -143,8 +143,7 @@ curses_block(boolean noscroll)
{
int height, width, ret = 0;
WINDOW *win = curses_get_nhwin(MESSAGE_WIN);
char *resp = " \r\n\033"; /* space, enter, esc */
const char *resp = " \r\n\033"; /* space, enter, esc */
curses_get_window_size(MESSAGE_WIN, &height, &width);
curses_toggle_color_attr(win, MORECOLOR, NONE, ON);
@@ -154,7 +153,8 @@ curses_block(boolean noscroll)
/* msgtype=stop should require space/enter rather than
* just any key, as we want to prevent YASD from
* riding direction keys. */
while ((ret = wgetch(win)) && !index(resp,(char)ret));
while ((ret = wgetch(win)) != 0 && !index(resp, (char) ret))
continue;
if (height == 1) {
curses_clear_unhighlight_message_window();
} else {