From 2960042a9f39c957be21037a5fb085e2b785ad6e Mon Sep 17 00:00:00 2001 From: PatR Date: Mon, 25 Mar 2019 12:04:14 -0700 Subject: [PATCH] curses msg_window:f Simplify. Support routine was already prepared to do what's wanted without jumping throuhg any hoops. --- win/curses/cursmesg.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/win/curses/cursmesg.c b/win/curses/cursmesg.c index 98723fcbe..96f91e60b 100644 --- a/win/curses/cursmesg.c +++ b/win/curses/cursmesg.c @@ -284,7 +284,7 @@ curses_teardown_messages(void) void curses_prev_mesg() { - int count, fifo_count; + int count; winid wid; long turn = 0; anything Id; @@ -296,9 +296,8 @@ curses_prev_mesg() curses_create_nhmenu(wid); Id = zeroany; - for (count = 0, fifo_count = num_messages - 1; count < num_messages; - ++count, --fifo_count) { - mesg = get_msg_line(TRUE, do_lifo ? count : fifo_count); + for (count = 0; count < num_messages; ++count) { + mesg = get_msg_line(do_lifo, count); if (turn != mesg->turn && count != 0) { curses_add_menu(wid, NO_GLYPH, &Id, 0, 0, A_NORMAL, "---", FALSE); } @@ -323,13 +322,13 @@ curses_prev_mesg() void curses_count_window(const char *count_text) { + static WINDOW *countwin = NULL; int startx, starty, winx, winy; int messageh, messagew; - static WINDOW *countwin = NULL; if (!count_text) { if (countwin) - delwin(countwin), countwin = NULL; + delwin(countwin), countwin = NULL; counting = FALSE; return; }