top: extend new 'X' command to include the TTY field

I have no idea what the maximum length of a terminal
name might be.  However, the library provides for up
to 128 characters (ouch).

So just to be safe, this commit extends the ability
to widen columns to embrace this field.

Signed-off-by: Jim Warner <james.warner@comcast.net>
This commit is contained in:
Jim Warner 2012-09-25 01:01:01 -05:00 committed by Craig Small
parent 47e1d063ac
commit bbf8e44fb4
2 changed files with 3 additions and 0 deletions

View File

@ -978,6 +978,7 @@ This \*(CI can be used to alter the widths for the following fields:
RUID 5 RUSER 8
SUID 5 SUSER 8
UID 5 USER 8
TTY 8
.Ed
You will be prompted for the amount to be added to the default

View File

@ -1899,6 +1899,8 @@ static void zap_fieldstab (void) {
Fieldstab[P_UEN].width = Fieldstab[P_URN].width
= Fieldstab[P_USN].width = Fieldstab[P_GRP].width
= Rc.fixed_widest ? 8 + Rc.fixed_widest : 8;
Fieldstab[P_TTY].width
= Rc.fixed_widest ? 8 + Rc.fixed_widest : 8;
// lastly, ensure we've got proper column headers...
calibrate_fields();