summaryrefslogtreecommitdiffstats
path: root/libsmartcols/src/table.c
diff options
context:
space:
mode:
authorKarel Zak2017-04-07 14:21:19 +0200
committerKarel Zak2017-04-07 14:34:11 +0200
commit14cd0a67a3e273db5b28ef786698320bab0962d2 (patch)
tree07632b69ebbed7d2007bd9c8c1b2550fb67e2711 /libsmartcols/src/table.c
parentlibsmartcols: column width reduction refactoring (diff)
downloadkernel-qcow2-util-linux-14cd0a67a3e273db5b28ef786698320bab0962d2.tar.gz
kernel-qcow2-util-linux-14cd0a67a3e273db5b28ef786698320bab0962d2.tar.xz
kernel-qcow2-util-linux-14cd0a67a3e273db5b28ef786698320bab0962d2.zip
libsmartcols: fix relative width interpretation
The non-defined width hint (=0) should not be interpreted as relative width. Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'libsmartcols/src/table.c')
-rw-r--r--libsmartcols/src/table.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libsmartcols/src/table.c b/libsmartcols/src/table.c
index 066a1e9a7..a67028d43 100644
--- a/libsmartcols/src/table.c
+++ b/libsmartcols/src/table.c
@@ -306,7 +306,7 @@ int scols_table_move_column(struct libscols_table *tb,
* scols_table_new_column:
* @tb: table
* @name: column header
- * @whint: column width hint (absolute width: N > 1; relative width: N < 1)
+ * @whint: column width hint (absolute width: N > 1; relative width: 0 < N < 1)
* @flags: flags integer
*
* This is shortcut for
@@ -317,9 +317,9 @@ int scols_table_move_column(struct libscols_table *tb,
*
* The column width is possible to define by:
*
- * @whint = 0..1 : relative width, percent of terminal width
+ * @whint: 0 < N < 1 : relative width, percent of terminal width
*
- * @whint = 1..N : absolute width, empty column will be truncated to
+ * @whint: N >= 1 : absolute width, empty column will be truncated to
* the column header width if no specified STRICTWIDTH flag
*
* Note that if table has disabled "maxout" flag (disabled by default) than