top: tweak some stuff relating to non-displayed fields
In the commit referenced below, in addition to several
tweaks to comments, 3 fields were no longer assured of
being present in the results stacks. However, 2 of the
3 fields might, in fact, be required even if they were
not currently being displayed in any of the 4 windows.
The PIDS_CMD is used in two separate 'Inspect' headers
('Y' command) and the PIDS_ID_EUID is required if that
'User Filter' ('u' or 'U' command) was being employed.
That latter field's inclusion will be made conditional
but the former field must be unconditionally included.
( for old top, PIDS_CMD would have always been there )
Reference(s):
commit 4e4debda9b
Signed-off-by: Jim Warner <james.warner@comcast.net>
This commit is contained in:
parent
66c4024d75
commit
f0064ac18f
@ -1704,6 +1704,7 @@ static void build_headers (void) {
|
|||||||
Fieldstab[i].erel = -1;
|
Fieldstab[i].erel = -1;
|
||||||
ckITEM(EU_PID); // these 2 fields may not display,
|
ckITEM(EU_PID); // these 2 fields may not display,
|
||||||
ckITEM(EU_STA); // yet we'll always need them both
|
ckITEM(EU_STA); // yet we'll always need them both
|
||||||
|
ckITEM(EU_CMD); // this is used with 'Y' (inspect)
|
||||||
|
|
||||||
do {
|
do {
|
||||||
if (VIZISw(w)) {
|
if (VIZISw(w)) {
|
||||||
@ -1747,7 +1748,7 @@ static void build_headers (void) {
|
|||||||
if (Fieldstab[EU_TME].erel > -1 && CHKw(w, Show_CTIMES)) ckITEM(eu_TICS_ALL_C);
|
if (Fieldstab[EU_TME].erel > -1 && CHKw(w, Show_CTIMES)) ckITEM(eu_TICS_ALL_C);
|
||||||
if (Fieldstab[EU_TM2].erel > -1 && CHKw(w, Show_CTIMES)) ckITEM(eu_TICS_ALL_C);
|
if (Fieldstab[EU_TM2].erel > -1 && CHKw(w, Show_CTIMES)) ckITEM(eu_TICS_ALL_C);
|
||||||
// for 'u/U' filtering we need these too (old top forgot that, oops)
|
// for 'u/U' filtering we need these too (old top forgot that, oops)
|
||||||
if (w->usrseltyp) { ckITEM(EU_URD); ckITEM(EU_USD); ckITEM(eu_ID_FUID); }
|
if (w->usrseltyp) { ckITEM(EU_UED); ckITEM(EU_URD); ckITEM(EU_USD); ckITEM(eu_ID_FUID); }
|
||||||
|
|
||||||
// we must also accommodate an out of view sort field...
|
// we must also accommodate an out of view sort field...
|
||||||
f = w->rc.sortindx;
|
f = w->rc.sortindx;
|
||||||
|
Loading…
Reference in New Issue
Block a user