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 e5ddd7ff55
commit 6db0d5eab6
3 changed files with 18 additions and 9 deletions

View File

@@ -237,7 +237,11 @@ static const char Osel_filterI_fmt[] = "\ttype=%d,\t" OSEL_FILTER "%*s\n";
/* Support for 2 abreast Cpu display (if terminal is wide enough) */
static char Double_sp[] = " ";
#define DOUBLE_space (sizeof(Double_sp) - 1)
#define DOUBLE_limit (160 + DOUBLE_space)
#ifdef TOG4_NOTRUNC
#define DOUBLE_limit (160 + DOUBLE_space)
#else
#define DOUBLE_limit ( 80 )
#endif
/*###### Sort callbacks ################################################*/