diff options
author | Karel Zak | 2016-09-26 11:20:07 +0200 |
---|---|---|
committer | Karel Zak | 2016-09-26 11:20:07 +0200 |
commit | 949ea05f1af647834db24b9172ac006488d2e4f4 (patch) | |
tree | 0e735393ebe57f1f53cab8da3288b96fcc756f27 /libsmartcols/src/libsmartcols.sym | |
parent | libsmartcols: (docs) add missing functions (diff) | |
download | kernel-qcow2-util-linux-949ea05f1af647834db24b9172ac006488d2e4f4.tar.gz kernel-qcow2-util-linux-949ea05f1af647834db24b9172ac006488d2e4f4.tar.xz kernel-qcow2-util-linux-949ea05f1af647834db24b9172ac006488d2e4f4.zip |
libsmartcols: support custom wrap and remove SCOLS_FL_WRAPNL
This new API provides full control on multi-line cells, you can wrap
text by new lines (build-in support) or by another way (after words,
commas, etc.) Changes:
* new scols_column_set_wrapfunc() sets pointers to two callback functions
1/ chunksize() - returns largest data chunk size; used when we
calculate columns width
2/ nextchunk() - terminate the current chunk and returns pointer to
the next; used when we print data
* remove SCOLS_FL_WRAPNL and add new functions scols_wrapnl_chunksize()
and scols_wrapnl_nextchunk() to provide build-in functionality to
wrap cells on \n
* remove scols_column_is_wrapnl() add scols_column_is_customwrap()
(returns true if custom wrap functions are defined)
* add scols_column_set_safechars() and scols_column_get_safechars() to
allow to control output encoding, safe chars are not encoded by \xFOO
* modify "fromfile" test code to use build-in scols_wrapnl_* callbacks
for "wrapnl" tests
* add new function scols_column_get_table()
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'libsmartcols/src/libsmartcols.sym')
-rw-r--r-- | libsmartcols/src/libsmartcols.sym | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/libsmartcols/src/libsmartcols.sym b/libsmartcols/src/libsmartcols.sym index aca648b63..d5c3674b8 100644 --- a/libsmartcols/src/libsmartcols.sym +++ b/libsmartcols/src/libsmartcols.sym @@ -139,15 +139,21 @@ global: SMARTCOLS_2.29 { global: - scols_column_is_wrapnl; + scols_column_get_safechars; + scols_column_get_table; + scols_column_is_customwrap; + scols_column_set_safechars; + scols_column_set_wrapfunc; scols_symbols_set_cell_padding; + scols_table_get_name; scols_table_get_symbols; scols_table_get_termforce; scols_table_get_termwidth; + scols_table_is_nolinesep; + scols_table_is_nowrap; scols_table_set_default_symbols; scols_table_set_termforce; scols_table_set_termwidth; - scols_table_get_name; - scols_table_is_nowrap; - scols_table_is_nolinesep; + scols_wrapnl_chunksize; + scols_wrapnl_nextchunk; } SMARTCOLS_2.28; |