]> granicus.if.org Git - procps-ng/commit
top: reorganize some fields management logic
authorJim Warner <james.warner@comcast.net>
Thu, 9 Feb 2012 04:22:22 +0000 (22:22 -0600)
committerCraig Small <csmall@enc.com.au>
Sun, 12 Feb 2012 10:52:23 +0000 (21:52 +1100)
commitd0e16acf156b066d56415b1b7ccbfad4ae1526d8
treedbdd43acf0a3fee65e35d69ed8e8b475a555cb8a
parent270e8e7eeb66b47569940f537cdad4ab46cd36be
top: reorganize some fields management logic

The calibrate_fields function had grown too large and
was adversly impacting maintainence.  So half of the
logic was split out into a new function.

Now, maintainence of column headers and the required
library flags is organized as follows:

 . adj_geometry   (calibrate_fields helper)
     provides low-level support for sigwinch, memory

 . build_headers  (calibrate_fields helper)
     constructs the headers and library flags

 . calibrate_fields
     establishes which fields will be displayed

( note the alpha order mentioned in a prior commit )

Signed-off-by: Jim Warner <james.warner@comcast.net>
top/top.c
top/top.h