summaryrefslogtreecommitdiffstats
path: root/libsmartcols/src/table.c
diff options
context:
space:
mode:
authorKarel Zak2016-02-24 12:34:37 +0100
committerKarel Zak2016-02-24 12:34:37 +0100
commitcbe3e495357308177ca12e07996217ea663cbf78 (patch)
tree67cfbe292d18cf4d65a69693a20f12968c9830a1 /libsmartcols/src/table.c
parentfindmnt: use scols_table_print_range() for --poll (diff)
downloadkernel-qcow2-util-linux-cbe3e495357308177ca12e07996217ea663cbf78.tar.gz
kernel-qcow2-util-linux-cbe3e495357308177ca12e07996217ea663cbf78.tar.xz
kernel-qcow2-util-linux-cbe3e495357308177ca12e07996217ea663cbf78.zip
libsmartcols: fix relative column width for maxout
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'libsmartcols/src/table.c')
-rw-r--r--libsmartcols/src/table.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/libsmartcols/src/table.c b/libsmartcols/src/table.c
index cc19e4ab2..d4261c067 100644
--- a/libsmartcols/src/table.c
+++ b/libsmartcols/src/table.c
@@ -233,17 +233,19 @@ int scols_table_remove_columns(struct libscols_table *tb)
* scols_column_set_....(cl, ...);
* scols_table_add_column(tb, cl);
*
- * The column width is possible to define by three ways:
+ * The column width is possible to define by:
*
* @whint = 0..1 : relative width, percent of terminal width
*
* @whint = 1..N : absolute width, empty column will be truncated to
- * the column header width
+ * the column header width if no specified STRICTWIDTH flag
*
- * @whint = 1..N
+ * Note that if table has disabled "maxout" flag (disabled by default) than
+ * relative width is used as a hint only. It's possible that column will be
+ * narrow if the specified size is too large for column data.
*
- * The column is necessary to address by
- * sequential number. The first defined column has the colnum = 0. For example:
+ * The column is necessary to address by sequential number. The first defined
+ * column has the colnum = 0. For example:
*
* scols_table_new_column(tab, "FOO", 0.5, 0); // colnum = 0
* scols_table_new_column(tab, "BAR", 0.5, 0); // colnum = 1