From owner-svn-src-all@freebsd.org Fri Jun 22 09:45:19 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4900810150B7; Fri, 22 Jun 2018 09:45:19 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id F31BF888BA; Fri, 22 Jun 2018 09:45:18 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D431C1F0A3; Fri, 22 Jun 2018 09:45:18 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5M9jIdp044407; Fri, 22 Jun 2018 09:45:18 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5M9jI5H044405; Fri, 22 Jun 2018 09:45:18 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201806220945.w5M9jI5H044405@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Fri, 22 Jun 2018 09:45:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335547 - head/usr.bin/top X-SVN-Group: head X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: head/usr.bin/top X-SVN-Commit-Revision: 335547 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Jun 2018 09:45:19 -0000 Author: eadler Date: Fri Jun 22 09:45:18 2018 New Revision: 335547 URL: https://svnweb.freebsd.org/changeset/base/335547 Log: 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. Modified: head/usr.bin/top/screen.c head/usr.bin/top/screen.h head/usr.bin/top/top.c Modified: head/usr.bin/top/screen.c ============================================================================== --- head/usr.bin/top/screen.c Fri Jun 22 09:41:13 2018 (r335546) +++ head/usr.bin/top/screen.c Fri Jun 22 09:45:18 2018 (r335547) @@ -55,7 +55,7 @@ static struct termios new_settings; static char is_a_terminal = false; void -init_termcap(int interactive) +init_termcap(bool interactive) { char *bufptr; char *PCptr; @@ -138,7 +138,7 @@ init_termcap(int interactive) /* get "ce", clear to end */ if (!overstrike) { - clear_line = tgetstr("ce", &bufptr); + clear_line = tgetstr("ce", &bufptr); } /* get necessary capabilities */ @@ -312,13 +312,4 @@ clear_eol(int len) } } return(-1); -} - -void -go_home(void) -{ - if (smart_terminal) - { - putcap(home); - } } Modified: head/usr.bin/top/screen.h ============================================================================== --- head/usr.bin/top/screen.h Fri Jun 22 09:41:13 2018 (r335546) +++ head/usr.bin/top/screen.h Fri Jun 22 09:45:18 2018 (r335547) @@ -28,10 +28,9 @@ extern int screen_width; int clear_eol(int len); void top_standout(const char *msg); void top_clear(void); -void go_home(void); void reinit_screen(void); void get_screensize(void); -void init_termcap(int interactive); +void init_termcap(bool interactive); void end_screen(void); void init_screen(void); Modified: head/usr.bin/top/top.c ============================================================================== --- head/usr.bin/top/top.c Fri Jun 22 09:41:13 2018 (r335546) +++ head/usr.bin/top/top.c Fri Jun 22 09:45:18 2018 (r335547) @@ -852,13 +852,6 @@ restart: break; 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; case CMD_quit: