The current header formatting is a giant format string that
- changes global state during the format process
- selects one of 4 different format strings and then does further conditional logic on them
- for one value uses an argument, for others, uses global variables.
- makes it hard to understand what the header will actually look like.
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
This is also a pre-req to implementing TOPCOLOR from newer versions of top(1)