]> git.ipfire.org Git - thirdparty/util-linux.git/commit
libsmartcols: introduce column type
authorKarel Zak <kzak@redhat.com>
Wed, 27 Sep 2023 12:00:38 +0000 (14:00 +0200)
committerKarel Zak <kzak@redhat.com>
Mon, 20 Nov 2023 21:25:46 +0000 (22:25 +0100)
commit98c12238b3194cadd6eb0df5704f32903f611cdc
tree451a9b111aacb1cf1be841fb7491a65319f8b0af
parentba1caa68a0eafefe8656c6acb7c57decef8575fd
libsmartcols: introduce column type

Now the column can define JSON-type, this commit introduces data-type.
This type is hint for filters and counters how to convert strings from
cells to raw data.

If the conversion from string is not possible, then application can
define callback for this purpose (aka. "datafunc"), this function has
to return the raw data as a void pointer.

This solution allows to use human readable things in cells (e.g.
"123MiB"), but filters and counters can still use the original data.

Signed-off-by: Karel Zak <kzak@redhat.com>
libsmartcols/src/column.c
libsmartcols/src/filter-param.c
libsmartcols/src/libsmartcols.h.in
libsmartcols/src/libsmartcols.sym
libsmartcols/src/smartcolsP.h