diff --git a/top/top.c b/top/top.c index 8978cd12..e2451f5b 100644 --- a/top/top.c +++ b/top/top.c @@ -72,9 +72,8 @@ static struct termios Tty_original, // our inherited terminal definition Tty_raw; // for unsolicited input static int Ttychanged = 0; - /* Last established cursor state/shape, and is re-position needed */ + /* Last established cursor state/shape */ static const char *Cursor_state = ""; -static int Cursor_repos; /* Program name used in error messages and local 'rc' file name */ static char *Myname; @@ -351,7 +350,7 @@ static void at_eoj (void) { if (Ttychanged) { tcsetattr(STDIN_FILENO, TCSAFLUSH, &Tty_original); if (keypad_local) putp(keypad_local); - if (Cursor_repos) putp(tg2(0, Screen_rows)); + putp(tg2(0, Screen_rows)); putp("\n"); #ifdef OFF_SCROLLBK if (exit_ca_mode) { @@ -602,7 +601,7 @@ static void sig_paused (int dont_care_sig) { if (-1 == tcsetattr(STDIN_FILENO, TCSAFLUSH, &Tty_original)) error_exit(fmtmk(N_fmt(FAIL_tty_set_fmt), strerror(errno))); if (keypad_local) putp(keypad_local); - if (Cursor_repos) putp(tg2(0, Screen_rows)); + putp(tg2(0, Screen_rows)); putp(Cap_curs_norm); #ifndef RMAN_IGNORED putp(Cap_smam); @@ -1081,14 +1080,12 @@ static char *ioline (const char *prompt) { static char buf[MEDBUFSIZ]; char *p; - Cursor_repos = 1; show_pmt(prompt); memset(buf, '\0', sizeof(buf)); ioch(1, buf, sizeof(buf)-1); if ((p = strpbrk(buf, ws))) *p = '\0'; // note: we DO produce a vaid 'string' - Cursor_repos = 0; return buf; } // end: ioline @@ -1119,7 +1116,6 @@ static char *ioline (const char *prompt) { }; static struct lin_s *anchor, *plin; - Cursor_repos = 1; if (!anchor) { anchor = alloc_c(sizeof(struct lin_s)); anchor->str = alloc_s(""); // top-of-stack == empty str @@ -1185,7 +1181,6 @@ static char *ioline (const char *prompt) { putp(tg2(beg+pos, Msg_row)); } while (key && key != kbd_ENTER && key != kbd_ESC); - Cursor_repos = 0; // weed out duplicates, including empty strings (top-of-stack)... for (i = 0, plin = anchor; ; i++) { #ifdef RECALL_FIXED @@ -2126,7 +2121,6 @@ static void fields_utility (void) { int i, key; FLG_t f; - Cursor_repos = 1; spewFI signify_that: putp(Cap_clr_scr); @@ -2187,7 +2181,6 @@ signify_that: break; } } while (key != 'q' && key != kbd_ESC); - Cursor_repos = 0; #undef unSCRL #undef swapEM #undef spewFI