summaryrefslogtreecommitdiffstats
path: root/libsmartcols/src/table.c
diff options
context:
space:
mode:
authorKarel Zak2014-03-19 17:20:57 +0100
committerKarel Zak2014-04-03 12:29:16 +0200
commite906be066ec378843e81a22ad49e92c3e412b928 (patch)
treebb7c2384daf5bbc82c6cc58dd178b0e2fdb46a4e /libsmartcols/src/table.c
parentlibsmartcols: add SCOLS_FL_MAX (diff)
downloadkernel-qcow2-util-linux-e906be066ec378843e81a22ad49e92c3e412b928.tar.gz
kernel-qcow2-util-linux-e906be066ec378843e81a22ad49e92c3e412b928.tar.xz
kernel-qcow2-util-linux-e906be066ec378843e81a22ad49e92c3e412b928.zip
libsmartcols: add reduce term width functionality
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'libsmartcols/src/table.c')
-rw-r--r--libsmartcols/src/table.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/libsmartcols/src/table.c b/libsmartcols/src/table.c
index 5c45aeeeb..770aaccc2 100644
--- a/libsmartcols/src/table.c
+++ b/libsmartcols/src/table.c
@@ -270,6 +270,16 @@ FILE *scols_table_get_stream(struct libscols_table *tb)
return tb ? tb->out: NULL;
}
+int scols_table_reduce_termwidth(struct libscols_table *tb, size_t reduce)
+{
+ assert(tb);
+ if (!tb)
+ return -EINVAL;
+
+ tb->termreduce = reduce;
+ return 0;
+}
+
/*
* @tb: table
* @: number of column (0..N)