top(1): remove special handling of load > 5
When the load is "high" (an arbitrary value) top(1) previously moved the cursor to the top-left of the screen as an acknowledgment. In practice, on modern machines, even relatively slow ones, it looked more like a glitch. Remove the logic.
This commit is contained in:
parent
df25a45659
commit
1cba05ee8f
@ -55,7 +55,7 @@ static struct termios new_settings;
|
|||||||
static char is_a_terminal = false;
|
static char is_a_terminal = false;
|
||||||
|
|
||||||
void
|
void
|
||||||
init_termcap(int interactive)
|
init_termcap(bool interactive)
|
||||||
{
|
{
|
||||||
char *bufptr;
|
char *bufptr;
|
||||||
char *PCptr;
|
char *PCptr;
|
||||||
@ -138,7 +138,7 @@ init_termcap(int interactive)
|
|||||||
/* get "ce", clear to end */
|
/* get "ce", clear to end */
|
||||||
if (!overstrike)
|
if (!overstrike)
|
||||||
{
|
{
|
||||||
clear_line = tgetstr("ce", &bufptr);
|
clear_line = tgetstr("ce", &bufptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* get necessary capabilities */
|
/* get necessary capabilities */
|
||||||
@ -313,12 +313,3 @@ clear_eol(int len)
|
|||||||
}
|
}
|
||||||
return(-1);
|
return(-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
go_home(void)
|
|
||||||
{
|
|
||||||
if (smart_terminal)
|
|
||||||
{
|
|
||||||
putcap(home);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
@ -28,10 +28,9 @@ extern int screen_width;
|
|||||||
int clear_eol(int len);
|
int clear_eol(int len);
|
||||||
void top_standout(const char *msg);
|
void top_standout(const char *msg);
|
||||||
void top_clear(void);
|
void top_clear(void);
|
||||||
void go_home(void);
|
|
||||||
void reinit_screen(void);
|
void reinit_screen(void);
|
||||||
void get_screensize(void);
|
void get_screensize(void);
|
||||||
void init_termcap(int interactive);
|
void init_termcap(bool interactive);
|
||||||
void end_screen(void);
|
void end_screen(void);
|
||||||
void init_screen(void);
|
void init_screen(void);
|
||||||
|
|
||||||
|
@ -852,13 +852,6 @@ main(int argc, char *argv[])
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case CMD_update: /* merely update display */
|
case CMD_update: /* merely update display */
|
||||||
/* is the load average high? */
|
|
||||||
if (system_info.load_avg[0] > LoadMax)
|
|
||||||
{
|
|
||||||
/* yes, go home for visual feedback */
|
|
||||||
go_home();
|
|
||||||
fflush(stdout);
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CMD_quit:
|
case CMD_quit:
|
||||||
|
Loading…
Reference in New Issue
Block a user