summaryrefslogtreecommitdiffstats
path: root/libsmartcols/src/table_print.c
diff options
context:
space:
mode:
authorKarel Zak2016-09-07 12:25:06 +0200
committerKarel Zak2016-09-07 12:25:06 +0200
commit37948503c995d2986e95819f6f5b2c3037dbc23d (patch)
tree18a516a5ff53c43d1cff6fed7bae5a97b823e2d5 /libsmartcols/src/table_print.c
parentlibsmartcols: add fallback for symbols (diff)
downloadkernel-qcow2-util-linux-37948503c995d2986e95819f6f5b2c3037dbc23d.tar.gz
kernel-qcow2-util-linux-37948503c995d2986e95819f6f5b2c3037dbc23d.tar.xz
kernel-qcow2-util-linux-37948503c995d2986e95819f6f5b2c3037dbc23d.zip
libsmartcols: support LIBSMARTCOLS_DEBUG_PADDING=on
This env.variable forces libsmartcols to use visible padding chars. The standard debug has to be enabled (to minimize overhead for non-debug execution). For example: $ LIBSMARTCOLS_DEBUG=all LIBSMARTCOLS_DEBUG_PADDING=on findmnt 2> ~/log Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'libsmartcols/src/table_print.c')
-rw-r--r--libsmartcols/src/table_print.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libsmartcols/src/table_print.c b/libsmartcols/src/table_print.c
index 910a9137a..bdac0b296 100644
--- a/libsmartcols/src/table_print.c
+++ b/libsmartcols/src/table_print.c
@@ -37,11 +37,13 @@
* fallback to be more robust and backwardly compatible.
*/
#define titlepadding_symbol(tb) ((tb)->symbols->title_padding ? (tb)->symbols->title_padding : " ")
-#define cellpadding_symbol(tb) ((tb)->symbols->cell_padding ? (tb)->symbols->cell_padding: " ")
#define branch_symbol(tb) ((tb)->symbols->branch ? (tb)->symbols->branch : "|-")
#define vertical_symbol(tb) ((tb)->symbols->vert ? (tb)->symbols->vert : "|")
#define right_symbol(tb) ((tb)->symbols->right ? (tb)->symbols->right : "-")
+#define cellpadding_symbol(tb) ((tb)->padding_debug ? "." : \
+ ((tb)->symbols->cell_padding ? (tb)->symbols->cell_padding: " "))
+
/* This is private struct to work with output data */
struct libscols_buffer {