]> git.ipfire.org Git - thirdparty/util-linux.git/commit
libsmartcols: (filter) add ability to cast data
authorKarel Zak <kzak@redhat.com>
Tue, 12 Sep 2023 12:22:40 +0000 (14:22 +0200)
committerKarel Zak <kzak@redhat.com>
Mon, 20 Nov 2023 21:25:46 +0000 (22:25 +0100)
commitea36de1223698ea16f1f5f70fba77eff63a39312
tree1b0be4888ca9a045182ebf2c99ca984a431555c6
parenta57de0efc19ac813aa7c3fff753b0acf3eb0eacc
libsmartcols: (filter) add ability to cast data

* add FLOAT type for JSON

  JSON standard does not care and everything is number, but for libsmartcols
  it would be better to differentiate between the types.

* add functions to cast data in the filter param

* cast data from scols rows

* cast data in the filter expression if necessary

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