diff options
author | Jim Warner <james.warner@comcast.net> | 2022-09-12 00:00:00 -0500 |
---|---|---|
committer | Craig Small <csmall@dropbear.xyz> | 2022-09-13 20:08:22 +1000 |
commit | f1862cde1c7cfa80cc18855c168a40cba4c797f0 (patch) | |
tree | 0f9a2ec0daa8f11f2154d380a14a4c429ab06fe8 | |
parent | 6fb0844f1286f753176a6de079db88ab19a4776b (diff) | |
download | procps-ng-f1862cde1c7cfa80cc18855c168a40cba4c797f0.tar.gz |
top: eliminate that 'TOG4_NOTRUNC' compile conditional <=== port of newlib 08d0f377
______________________________ original newlib message
----------------------------------- ( minus git hash )
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 ........................................
. May, 2020 - introduce 2 abreast display
commit ........................................
Signed-off-by: Jim Warner <james.warner@comcast.net>
-rw-r--r-- | top/top.c | 11 | ||||
-rw-r--r-- | top/top.h | 1 | ||||
-rw-r--r-- | top/top_nls.c | 1 | ||||
-rw-r--r-- | top/top_nls.h | 4 |
4 files changed, 4 insertions, 13 deletions
@@ -277,11 +277,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 ) /*###### Sort callbacks ################################################*/ @@ -5841,11 +5837,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; @@ -65,7 +65,6 @@ //#define SCROLLV_BY_1 /* when scrolling left/right do not move 8 */ //#define STRINGCASENO /* case insenstive compare/locate versions */ //#define TERMIOS_ONLY /* use native input only (just limp along) */ -//#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/top/top_nls.c b/top/top_nls.c index 533042e..65fe2c8 100644 --- a/top/top_nls.c +++ b/top/top_nls.c @@ -521,7 +521,6 @@ static void build_norm_nlstab (void) { Norm_nlstab[WORD_abv_swp_txt] = _("Swap"); 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_BOT_cmdlin_fmt] = _("command line for pid %d, %s"); diff --git a/top/top_nls.h b/top/top_nls.h index ae6d07f..e544529 100644 --- a/top/top_nls.h +++ b/top/top_nls.h @@ -82,8 +82,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, YINSP_demo01_txt, YINSP_demo02_txt, YINSP_demo03_txt, YINSP_deqfmt_txt, |