df: fix alignment of columns
commit99679fff629f4a624f4fe7a67335c6e90533afc2
authorPádraig Brady <P@draigBrady.com>
Mon, 19 Apr 2010 07:41:50 +0000 (19 08:41 +0100)
committerPádraig Brady <P@draigBrady.com>
Wed, 23 Mar 2011 16:44:49 +0000 (23 16:44 +0000)
tree6791dc322532103ccb56d284f2aeac6ca4d9876b
parent437fcf713c237f45f9504bb8bdc6041f65663b36
df: fix alignment of columns

* src/df.c (alloc_table_row): A new function to allocate storage
for a row of strings.
(print_table): A new function to interate over all stored strings in
the table, and apply alignment honoring the max width of each column.
(get_header): Renamed from print_header, and adjusted accordingly.
(get_dev): Renamed from show_dev.  Also we no longer wrap longer
device names over two lines, which can be an unexpected issue for
scripts parsing the output from df.
(get_disk): s/show_/get_/
(get_point): Likewise.
(get_entry): Likewise.
(get_all_entries): Likewise.
* NEWS: Mention the change.
NEWS
src/df.c