]> granicus.if.org Git - procps-ng/commit
top: 'X' command offers auto option
authorJim Warner <james.warner@comcast.net>
Wed, 3 Oct 2012 18:13:13 +0000 (13:13 -0500)
committerCraig Small <csmall@enc.com.au>
Thu, 11 Oct 2012 10:13:13 +0000 (21:13 +1100)
commit35cd340002daea1ffb224940738797fd3c2b5d8a
tree11f13aefdec7509b99023d7e66d2b797356c4a7a
parent21237356ab9619c60641726eb0613dd985c72b9b
top: 'X' command offers auto option

The recent introduction of a column widths override
(the 'X' command) provided for a user input amount
to be added to default field size which ranged from
5 to 10 bytes.

While that approach could prevent truncated data, the
different default sizes would almost certainly mean
some precious screen real estate was waisted.

This commit introduces the concept of dynamic widths
where top will add only enough to a field default to
prevent truncation for that specific field.

Now users have a choice between their explicit width
override or a width chosen by top to exactly match
display needs.  The former is immediate but likely
wastes some horizontal space while the latter is
iterative but will be sized precisely.

Original 'X' Command:
commit 384afa494a56d0460bc81576c18ae44978530de3
commit 47e1d063ac4256fd9c1b4efed5168d2c1670e065

Extensions to 'X' Command:
commit bbf8e44fb48e4aa4756cfa3b4405b27a791b8386
commit 7557f3f75463a720b1bd176e19afe3f9c590d5f6

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