top: exploit new items for displaying autogroup values

Ordinarily, whenever a new field is added to top, that
RCF_VERSION_ID should be bumped which then prevents an
older version of top from reading the expanded rcfile.

With this change, however, we'll keep the existing 'k'
version since we've yet to release the newlib version.

Signed-off-by: Jim Warner <james.warner@comcast.net>
This commit is contained in:
Jim Warner 2021-08-05 00:00:00 -05:00 committed by Craig Small
parent 631e5d91f3
commit b789b46f84
3 changed files with 13 additions and 2 deletions

View File

@ -1692,8 +1692,10 @@ static struct {
{ 6, -1, A_right, PIDS_IO_READ_BYTES }, // ul_int EU_IRB
{ 5, -1, A_right, PIDS_IO_READ_OPS }, // ul_int EU_IRO
{ 6, -1, A_right, PIDS_IO_WRITE_BYTES }, // ul_int EU_IWB
{ 5, -1, A_right, PIDS_IO_WRITE_OPS } // ul_int EU_IWO
#define eu_LAST EU_IWO
{ 5, -1, A_right, PIDS_IO_WRITE_OPS }, // ul_int EU_IWO
{ 5, -1, A_right, PIDS_AUTOGRP_ID }, // s_int EU_AGI
{ 4, -1, A_right, PIDS_AUTOGRP_NICE } // s_int EU_AGN
#define eu_LAST EU_AGN
// xtra Fieldstab 'pseudo pflag' entries for the newlib interface . . . . . . .
#define eu_CMDLINE eu_LAST +1
#define eu_TICS_ALL_C eu_LAST +2
@ -5894,6 +5896,7 @@ static const char *task_show (const WIN_t *q, int idx) {
cp = make_num(rSv(EU_LID, s_int), W, Jn, EU_LID, 0);
break;
/* s_int, make_num without auto width */
case EU_AGI: // PIDS_AUTOGRP_ID
case EU_NMA: // PIDS_PROCESSOR_NODE
case EU_PGD: // PIDS_ID_PGRP
case EU_PID: // PIDS_ID_PID
@ -5905,6 +5908,7 @@ static const char *task_show (const WIN_t *q, int idx) {
cp = make_num(rSv(i, s_int), W, Jn, AUTOX_NO, 0);
break;
/* s_int, make_num without auto width, but with zero supression */
case EU_AGN: // PIDS_AUTOGRP_NICE
case EU_NCE: // PIDS_NICE
case EU_OOA: // PIDS_OOM_ADJ
case EU_OOM: // PIDS_OOM_SCORE

View File

@ -195,6 +195,7 @@ enum pflag {
EU_EXE,
EU_RSS, EU_PSS, EU_PZA, EU_PZF, EU_PZS, EU_USS,
EU_IRB, EU_IRO, EU_IWB, EU_IWO,
EU_AGI, EU_AGN,
#ifdef USE_X_COLHDR
// not really pflags, used with tbl indexing
EU_MAXPFLGS

View File

@ -344,6 +344,12 @@ static void build_two_nlstabs (void) {
/* Translation Hint: maximum 'ioWop' = 5 */
Head_nlstab[EU_IWO] = _("ioWop");
Desc_nlstab[EU_IWO] = _("I/O Write Operations");
/* Translation Hint: maximum 'AGID' = 5 */
Head_nlstab[EU_AGI] = _("AGID");
Desc_nlstab[EU_AGI] = _("Autogroup Identifier");
/* Translation Hint: maximum 'AGNI' = 4 */
Head_nlstab[EU_AGN] = _("AGNI");
Desc_nlstab[EU_AGN] = _("Autogroup Nice Value");
}