From c19963fb7ad44ac4c5f908f3587e551c727c5be1 Mon Sep 17 00:00:00 2001 From: Marcus Brinkmann Date: Thu, 29 Aug 2002 10:24:08 +0000 Subject: 2002-08-29 Marcus Brinkmann * console-ncurses.c (main): Call endwin () before bailing out because of an error. (cons_vcons_write): Use getyx and wmove on stdscr instead getsyx and setsyx (which operate on newscr, and mess up the cursor anyway, probably because we don't commit the change immediately). Submitted by David Walter . --- utils/console-ncurses.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'utils/console-ncurses.c') diff --git a/utils/console-ncurses.c b/utils/console-ncurses.c index 4ec60d7d..1f12ff3c 100644 --- a/utils/console-ncurses.c +++ b/utils/console-ncurses.c @@ -518,9 +518,9 @@ cons_vcons_write (vcons_t vcons, conchar_t *str, size_t length, return; mutex_lock (&ncurses_lock); - getsyx (y, x); + getyx (stdscr, y, x); mvwputsn (str, length, col, row); - setsyx (y, x); + wmove (stdscr, y, x); mutex_unlock (&ncurses_lock); } @@ -574,7 +574,10 @@ main (int argc, char *argv[]) err = cons_init (); if (err) - error (5, err, "Console library initialization failed"); + { + endwin (); + error (5, err, "Console library initialization failed"); + } cons_server_loop (); -- cgit v1.2.3