diff options
author | Karel Zak | 2017-10-12 12:01:25 +0200 |
---|---|---|
committer | Karel Zak | 2017-10-12 12:03:57 +0200 |
commit | f086478af427914e019251548d6457738661d92a (patch) | |
tree | d676d0e107a6b17497fe78cd3d8c3e3770dc4522 /libsmartcols/src | |
parent | libsmartcols: (docs) add note about line separators (diff) | |
download | kernel-qcow2-util-linux-f086478af427914e019251548d6457738661d92a.tar.gz kernel-qcow2-util-linux-f086478af427914e019251548d6457738661d92a.tar.xz kernel-qcow2-util-linux-f086478af427914e019251548d6457738661d92a.zip |
libsmartcols: (sample) cleanup line separator usage
* add comment to explain when nolinesep flag is necessary
* force to print \n before switch to the next line to support
./sample-scols-continuous > file
use case.
Addresses: https://github.com/ignatenkobrain/python-smartcols/issues/18
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'libsmartcols/src')
-rw-r--r-- | libsmartcols/src/table_print.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libsmartcols/src/table_print.c b/libsmartcols/src/table_print.c index 7a2c1a3dc..6acaf9b4e 100644 --- a/libsmartcols/src/table_print.c +++ b/libsmartcols/src/table_print.c @@ -901,6 +901,7 @@ static int print_range( struct libscols_table *tb, struct libscols_line *ln; assert(tb); + DBG(TAB, ul_debugobj(tb, "printing range")); while (rc == 0 && scols_table_next_line(tb, itr, &ln) == 0) { @@ -1524,7 +1525,7 @@ int scols_table_print_range( struct libscols_table *tb, if (scols_table_is_tree(tb)) return -EINVAL; - DBG(TAB, ul_debugobj(tb, "printing range")); + DBG(TAB, ul_debugobj(tb, "printing range from API")); rc = initialize_printing(tb, &buf); if (rc) |