top: add variable width data display without scrolling <=== port of newlib fb32021e

______________________________ original newlib message

There are times when one might want to see some task's
particular variable width data. However, prior to this
commit, the only way was to first turn on a field then
scroll through it via repeated right arrow keystrokes.

[ this also required that field to be displayed last ]

Needless to say, given the potential length of some of
that variable data this could be extremely cumbersome.

Now with this patch, a Ctrl keystroke combination will
create a separate window at the bottom of the terminal
screen where such variable width data is seen in full.

[ the targeted task is the 1st task displayed, which ]
[ is a convention employed in some existing commands ]

[ the targeted data was determined by these Ctrl key ]
[ combinations: CtrlG = ctrl group; CtrlK = cmdline; ]
[ CtrlU = supplementary groups; plus CtrlV = environ ]

Signed-off-by: Jim Warner <james.warner@comcast.net>
This commit is contained in:
Jim Warner
2022-06-15 00:00:00 -05:00
committed by Craig Small
parent 673fe994f9
commit 49bb9f9ae4
3 changed files with 150 additions and 16 deletions

View File

@@ -61,6 +61,7 @@
//#define SCROLLVAR_NO /* disable intra-column horizontal scrolls */
//#define SCROLLV_BY_1 /* when scrolling left/right do not move 8 */
//#define STRINGCASENO /* case insenstive compare/locate versions */
//#define TAG_CMD_MUST /* CtrlK (cmdline) needs proper 'c' toggle */
//#define TERMIOS_ONLY /* use native input only (just limp along) */
//#define TOG4_NOFORCE /* no force 2 abreast mode with '4' toggle */
//#define TOG4_NOTRUNC /* ensure no truncation for 2 abreast mode */
@@ -182,8 +183,12 @@ char *strcasestr(const char *haystack, const char *needle);
#define kbd_BKSP 137
#define kbd_INS 138
#define kbd_DEL 139
#define kbd_CtrlO '\017'
#define kbd_CtrlE '\005'
#define kbd_CtrlG '\007'
#define kbd_CtrlK '\013'
#define kbd_CtrlO '\017'
#define kbd_CtrlU '\025'
#define kbd_CtrlV '\026'
/* Special value in Pseudo_row to force an additional procs refresh
-- used at startup and for task/thread mode transitions */
@@ -805,6 +810,8 @@ typedef struct WIN_t {
//atic void wins_reflag (int what, int flg);
//atic void wins_stage_1 (void);
//atic void wins_stage_2 (void);
//atic void wins_tag_cmdline (void);
//atic void wins_tag_generic (void);
//atic inline int wins_usrselect (const WIN_t *q, const int idx);
/*------ Forest View support -------------------------------------------*/
//atic void forest_adds (const int self, int level);