diff options
author | Karel Zak | 2016-09-15 12:22:12 +0200 |
---|---|---|
committer | Karel Zak | 2016-09-15 12:22:12 +0200 |
commit | 9aca40bbec08a15e71c56d33e7d78e6f7063ae6e (patch) | |
tree | 792189f470d7eef62788481471d7ee8f532a52ef /libsmartcols/src/table_print.c | |
parent | libsmartcols: add support for trees to the sample application (diff) | |
download | kernel-qcow2-util-linux-9aca40bbec08a15e71c56d33e7d78e6f7063ae6e.tar.gz kernel-qcow2-util-linux-9aca40bbec08a15e71c56d33e7d78e6f7063ae6e.tar.xz kernel-qcow2-util-linux-9aca40bbec08a15e71c56d33e7d78e6f7063ae6e.zip |
libsmartcols: fix tree padding
We cannot use cell-padding char with in tree ASCII art, because
tree uses two chars rather than one.
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'libsmartcols/src/table_print.c')
-rw-r--r-- | libsmartcols/src/table_print.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/libsmartcols/src/table_print.c b/libsmartcols/src/table_print.c index 2cc817c1c..4c9eaed65 100644 --- a/libsmartcols/src/table_print.c +++ b/libsmartcols/src/table_print.c @@ -37,13 +37,12 @@ */ #define titlepadding_symbol(tb) ((tb)->symbols->title_padding ? (tb)->symbols->title_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 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 { char *begin; /* begin of the buffer */ @@ -186,7 +185,7 @@ static int line_ascii_art_to_buffer(struct libscols_table *tb, return rc; if (list_entry_is_last(&ln->ln_children, &ln->parent->ln_branch)) - art = cellpadding_symbol(tb); + art = " "; else art = vertical_symbol(tb); |