diff options
author | Jim Warner <james.warner@comcast.net> | 2022-09-08 00:00:00 -0500 |
---|---|---|
committer | Craig Small <csmall@dropbear.xyz> | 2022-09-12 22:15:28 +1000 |
commit | 08d0f377a76fb1cb710208cbff3752f59f9fe945 (patch) | |
tree | 64060462cbf77cfa4c923eae43190a21f51482df | |
parent | d9c45988f7e724353a78ca14260016487b046158 (diff) | |
download | procps-ng-08d0f377a76fb1cb710208cbff3752f59f9fe945.tar.gz |
top: eliminate that 'TOG4_NOTRUNC' compile conditional
When 2 abreast cpu display was introduced, the minimum
screen width was 160 columns so as to avoid (minimize)
truncation. Later that was reduced to 80 columns while
keeping the original minimum as a compile conditional.
In preparation for (virtually) eliminating these width
restrictions in a future patch this #define's history.
Reference(s):
. May, 2020 - introduced #define TOG4_NOTRUNC
commit be3dcaa842cb64859e356d350c17de34932e5f1b
. May, 2020 - introduce 2 abreast display
commit 59f5a37a247184b3009af963706ca68198067185
Signed-off-by: Jim Warner <james.warner@comcast.net>
-rw-r--r-- | src/top/top.c | 11 | ||||
-rw-r--r-- | src/top/top.h | 1 | ||||
-rw-r--r-- | src/top/top_nls.c | 1 | ||||
-rw-r--r-- | src/top/top_nls.h | 4 |
4 files changed, 4 insertions, 13 deletions
diff --git a/src/top/top.c b/src/top/top.c index 7a4f9b3..061ef3c 100644 --- a/src/top/top.c +++ b/src/top/top.c @@ -248,11 +248,7 @@ static char Double_sp[] = " "; static char Double_sp[] = " ~1 ~6 "; #define DOUBLE_space (sizeof(Double_sp) - 5) // 1 for null, 4 unprintable #endif -#ifdef TOG4_NOTRUNC - #define DOUBLE_limit (int)( 160 + DOUBLE_space ) -#else - #define DOUBLE_limit (int)( 80 ) -#endif +#define DOUBLE_limit (int)( 80 ) /* Support for the new library API -- acquired (if necessary) at program startup and referenced throughout our lifetime. */ @@ -5708,11 +5704,8 @@ static void keys_summary (int ch) { break; case '4': w->rc.double_up = !w->rc.double_up; - if (w->rc.double_up && Screen_cols < DOUBLE_limit) { - show_msg(N_txt(XTRA_size2up_txt)); + if (w->rc.double_up && Screen_cols < DOUBLE_limit) w->rc.double_up = 0; - break; - } if (w->rc.double_up) OFFw(w, (View_CPUSUM | View_CPUNOD)); break; diff --git a/src/top/top.h b/src/top/top.h index aa0f7a8..b73027a 100644 --- a/src/top/top.h +++ b/src/top/top.h @@ -61,7 +61,6 @@ //#define THREADED_CPU /* separate background thread for cpu updt */ //#define THREADED_MEM /* separate background thread for mem updt */ //#define THREADED_TSK /* separate background thread for tsk updt */ -//#define TOG4_NOTRUNC /* ensure no truncation for 2 abreast mode */ //#define TOG4_OFF_MEM /* don't show two abreast memory statistic */ //#define TOG4_OFF_SEP /* don't show two abreast visual separator */ //#define TREE_NORESET /* sort keys should not force 'V' view off */ diff --git a/src/top/top_nls.c b/src/top/top_nls.c index 273b09a..8a34fab 100644 --- a/src/top/top_nls.c +++ b/src/top/top_nls.c @@ -581,7 +581,6 @@ static void build_norm_nlstab (void) { Norm_nlstab[LIB_errorpid_fmt] = _("library failed pids statistics, at %d: %s"); Norm_nlstab[BAD_memscale_fmt] = _("bad memory scaling arg '%s'"); Norm_nlstab[XTRA_vforest_fmt] = _("PID to collapse/expand [default pid = %d]"); - Norm_nlstab[XTRA_size2up_txt] = _("terminal is not wide enough"); Norm_nlstab[XTRA_modebad_txt] = _("wrong mode, command inactive"); Norm_nlstab[XTRA_warnold_txt] = _("saving prevents older top from reading, save anyway?"); Norm_nlstab[X_SEMAPHORES_fmt] = _("failed sem_init() at %d: %s"); diff --git a/src/top/top_nls.h b/src/top/top_nls.h index 22fffa9..a317ba2 100644 --- a/src/top/top_nls.h +++ b/src/top/top_nls.h @@ -83,8 +83,8 @@ enum norm_nls { WORD_abv_mem_txt, WORD_abv_swp_txt, WORD_allcpus_txt, WORD_another_txt, WORD_eachcpu_fmt, WORD_exclude_txt, WORD_include_txt, WORD_noneone_txt, WORD_process_txt, WORD_threads_txt, WRITE_rcfile_fmt, WRONG_switch_fmt, - XTRA_badflds_fmt, XTRA_fixwide_fmt, XTRA_modebad_txt, XTRA_size2up_txt, - XTRA_vforest_fmt, XTRA_warncfg_txt, XTRA_warnold_txt, XTRA_winsize_txt, + XTRA_badflds_fmt, XTRA_fixwide_fmt, XTRA_modebad_txt, XTRA_vforest_fmt, + XTRA_warncfg_txt, XTRA_warnold_txt, XTRA_winsize_txt, X_BOT_cmdlin_fmt, X_BOT_ctlgrp_fmt, X_BOT_envirn_fmt, X_BOT_msglog_txt, X_BOT_namesp_fmt, X_BOT_nodata_txt, X_BOT_supgrp_fmt, X_RESTRICTED_txt, X_SEMAPHORES_fmt, X_THREADINGS_fmt, |