Page MenuHomeFreeBSD

ps(1): Move 'width' field from VAR to VARENT; Remove sizevars()
Needs ReviewPublic

Authored by olce on Tue, Apr 1, 1:38 PM.
Tags
None
Referenced Files
F113828127: D49610.id.diff
Fri, Apr 4, 5:11 AM
F113826446: D49610.id152970.diff
Fri, Apr 4, 4:33 AM
Unknown Object (File)
Thu, Apr 3, 1:44 PM
Subscribers

Details

Reviewers
emaste
pstef
kib
Summary

Some column's width depends not only on the information displayed but
also on the its header, which may have been customized. Consequently,
that width is a property of the actual column and should not be attached
to the keyword specifying which information to print.

This change fixes a bug where multiple columns displaying the same
information (same keyword) but with different headers would have the
same width, although they should not if they have long enough headers
that have different lengths (the width computed from the largest header
would be applied to all the corresponding keyword's columns).

Remove sizevars(), as the 'width' field is now initialized directly in
parsefmt(), which creates the VARENT structures.

While here, remove var[]'s sentinel line, and consequently adjust the
upper limit in showkey()'s loop and findvar()'s binary search.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 63252
Build 60136: arc lint + arc unit