diff options
author | Igor Gnatenko | 2016-01-21 10:02:31 +0100 |
---|---|---|
committer | Igor Gnatenko | 2016-01-21 16:41:12 +0100 |
commit | b3256efff24c57f92a4f0357396fc47fa044e1f7 (patch) | |
tree | faf0c2a75614624552d06f41a7536a8d053bb491 /libsmartcols/src/smartcolsP.h | |
parent | chrt: use sched_getattr() (diff) | |
download | kernel-qcow2-util-linux-b3256efff24c57f92a4f0357396fc47fa044e1f7.tar.gz kernel-qcow2-util-linux-b3256efff24c57f92a4f0357396fc47fa044e1f7.tar.xz kernel-qcow2-util-linux-b3256efff24c57f92a4f0357396fc47fa044e1f7.zip |
libsmartcols: implement title of table
Reference: https://github.com/karelzak/util-linux/issues/258
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
Diffstat (limited to 'libsmartcols/src/smartcolsP.h')
-rw-r--r-- | libsmartcols/src/smartcolsP.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libsmartcols/src/smartcolsP.h b/libsmartcols/src/smartcolsP.h index 9f63c3ad1..2e6673aa0 100644 --- a/libsmartcols/src/smartcolsP.h +++ b/libsmartcols/src/smartcolsP.h @@ -125,7 +125,8 @@ enum { */ struct libscols_table { int refcount; - char *name; /* optional table table */ + char *name; /* optional table name (for JSON) */ + char *title; /* optional table title (for humans) */ size_t ncols; /* number of columns */ size_t ntreecols; /* number of columns with SCOLS_FL_TREE */ size_t nlines; /* number of lines */ @@ -151,6 +152,8 @@ struct libscols_table { maxout :1, /* maximalize output */ no_headings :1, /* don't print header */ no_wrap :1; /* never wrap lines */ + unsigned int title_pos; /* title position */ + char *title_color; /* title color */ }; #define IS_ITER_FORWARD(_i) ((_i)->direction == SCOLS_ITER_FORWARD) |