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>
This commit is contained in:
Jim Warner 2022-09-12 00:00:00 -05:00 committed by Craig Small
parent 6fb0844f12
commit f1862cde1c
4 changed files with 4 additions and 13 deletions

View File

@ -277,11 +277,7 @@ static char Double_sp[] = " ";
static char Double_sp[] = " ~1 ~6 "; static char Double_sp[] = " ~1 ~6 ";
#define DOUBLE_space (sizeof(Double_sp) - 5) // 1 for null, 4 unprintable #define DOUBLE_space (sizeof(Double_sp) - 5) // 1 for null, 4 unprintable
#endif #endif
#ifdef TOG4_NOTRUNC #define DOUBLE_limit (int)( 80 )
#define DOUBLE_limit (int)( 160 + DOUBLE_space )
#else
#define DOUBLE_limit (int)( 80 )
#endif
/*###### Sort callbacks ################################################*/ /*###### Sort callbacks ################################################*/
@ -5841,11 +5837,8 @@ static void keys_summary (int ch) {
break; break;
case '4': case '4':
w->rc.double_up = !w->rc.double_up; w->rc.double_up = !w->rc.double_up;
if (w->rc.double_up && Screen_cols < DOUBLE_limit) { if (w->rc.double_up && Screen_cols < DOUBLE_limit)
show_msg(N_txt(XTRA_size2up_txt));
w->rc.double_up = 0; w->rc.double_up = 0;
break;
}
if (w->rc.double_up) if (w->rc.double_up)
OFFw(w, (View_CPUSUM | View_CPUNOD)); OFFw(w, (View_CPUSUM | View_CPUNOD));
break; break;

View File

@ -65,7 +65,6 @@
//#define SCROLLV_BY_1 /* when scrolling left/right do not move 8 */ //#define SCROLLV_BY_1 /* when scrolling left/right do not move 8 */
//#define STRINGCASENO /* case insenstive compare/locate versions */ //#define STRINGCASENO /* case insenstive compare/locate versions */
//#define TERMIOS_ONLY /* use native input only (just limp along) */ //#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_MEM /* don't show two abreast memory statistic */
//#define TOG4_OFF_SEP /* don't show two abreast visual separator */ //#define TOG4_OFF_SEP /* don't show two abreast visual separator */
//#define TREE_NORESET /* sort keys should not force 'V' view off */ //#define TREE_NORESET /* sort keys should not force 'V' view off */

View File

@ -521,7 +521,6 @@ static void build_norm_nlstab (void) {
Norm_nlstab[WORD_abv_swp_txt] = _("Swap"); Norm_nlstab[WORD_abv_swp_txt] = _("Swap");
Norm_nlstab[BAD_memscale_fmt] = _("bad memory scaling arg '%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_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_modebad_txt] = _("wrong mode, command inactive");
Norm_nlstab[XTRA_warnold_txt] = _("saving prevents older top from reading, save anyway?"); 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"); Norm_nlstab[X_BOT_cmdlin_fmt] = _("command line for pid %d, %s");

View File

@ -82,8 +82,8 @@ enum norm_nls {
WORD_abv_mem_txt, WORD_abv_swp_txt, WORD_allcpus_txt, WORD_another_txt, 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_eachcpu_fmt, WORD_exclude_txt, WORD_include_txt, WORD_noneone_txt,
WORD_process_txt, WORD_threads_txt, WRITE_rcfile_fmt, WRONG_switch_fmt, 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_badflds_fmt, XTRA_fixwide_fmt, XTRA_modebad_txt, XTRA_vforest_fmt,
XTRA_vforest_fmt, XTRA_warncfg_txt, XTRA_warnold_txt, XTRA_winsize_txt, 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_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_BOT_namesp_fmt, X_BOT_nodata_txt, X_BOT_supgrp_fmt,
YINSP_demo01_txt, YINSP_demo02_txt, YINSP_demo03_txt, YINSP_deqfmt_txt, YINSP_demo01_txt, YINSP_demo02_txt, YINSP_demo03_txt, YINSP_deqfmt_txt,