top: reduce minimum terminal width with 2 abreast mode

For the original implementation of the '4' toggle, the
minimum width was set at 165 columns. This was done to
avoid truncations when detailed cpu statistics (versus
graphs) were being displayed. Those can not be scaled.

Upon reflection, it seems more appropriate to give the
user the choice of whether or not to truncate. And, by
reducing that minimum width requirement to 80 columns,
we'll vastly expand potential use of two abreast mode.

[ we'll keep that original as '#define TOG4_NOTRUNC' ]

The patch also updates the man document appropriately.
Along the way, we will trade the potentially confusing
word 'adjacent' for the more natural 'additional' when
detailing the '!' toggle in 4b. Summary-Area-Commands.

Reference(s):
https://gitlab.com/procps-ng/procps/-/issues/172
https://www.freelists.org/post/procps/two-major-changes-to-top

Signed-off-by: Jim Warner <james.warner@comcast.net>
This commit is contained in:
Jim Warner
2020-05-28 00:00:00 -05:00
committed by Craig Small
parent 4c0b69f385
commit be3dcaa842
3 changed files with 18 additions and 9 deletions

View File

@@ -48,6 +48,7 @@
//#define STRINGCASENO /* case insenstive compare/locate versions */
//#define TERMIOS_ONLY /* just limp along with native input only */
//#define TOG4_NOFORCE /* no force 2 abreast mode with '4' toggle */
//#define TOG4_NOTRUNC /* ensure no truncation in 2 abreast mode */
//#define TREE_NORESET /* sort keys do NOT force forest view OFF */
//#define TREE_SCANALL /* rescan array w/ forest view, avoid sort */
//#define TREE_VALTMRK /* use an indented '+' with collapsed pids */
@@ -357,7 +358,7 @@ typedef struct WIN_t {
char *findstr; // window's current/active search string
int findlen; // above's strlen, without call overhead
int double_up; // show individual cpus 2 abreast
int combine_cpus; // keep combining adjacent cpus
int combine_cpus; // keep combining additional cpus
struct pids_stack **ppt; // this window's stacks ptr array
struct WIN_t *next, // next window in window stack
*prev; // prior window in window stack