HomeFreeBSD

top(1): reimplement header formatting as sbuf

Description

top(1): reimplement header formatting as sbuf

The current header formatting is a giant format string that changes
global state during the format process.

Make the following changes:

  • use sbuf to build up the header rather than use the above

pseudo-dynamic one

  • Change name length to 10
  • Reduce size of RES and SIZE by making humanize more aggressive
  • Restore a version number line to the copyright. This may be required

by the copyright (and may not be; its unclear)

This is also a pre-req to implementing TOPCOLOR from newer versions of
top(1)

Discussed with: allanjude, rpolka, danfe, rgrimes
Differential Revision: https://reviews.freebsd.org/D15801

Details

Provenance
eadlerAuthored on
Differential Revision
D15801: top(1): reimplement header formatting as sbuf
Parents
rS335538: MFC r333212: amdsbwd: add suspend and resume methods
Branches
Unknown
Tags
Unknown