diff options
author | Karel Zak | 2014-03-18 11:22:39 +0100 |
---|---|---|
committer | Karel Zak | 2014-04-03 12:29:16 +0200 |
commit | 1577b2592e2e31e52ed5d8cbed8fe90868891f8f (patch) | |
tree | ec98e5ad79f91624a7c714fc86be60b72bf08ac4 /libsmartcols/src/smartcolsP.h | |
parent | libsmartcols: add cells (diff) | |
download | kernel-qcow2-util-linux-1577b2592e2e31e52ed5d8cbed8fe90868891f8f.tar.gz kernel-qcow2-util-linux-1577b2592e2e31e52ed5d8cbed8fe90868891f8f.tar.xz kernel-qcow2-util-linux-1577b2592e2e31e52ed5d8cbed8fe90868891f8f.zip |
libsmartcols: add columns
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'libsmartcols/src/smartcolsP.h')
-rw-r--r-- | libsmartcols/src/smartcolsP.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/libsmartcols/src/smartcolsP.h b/libsmartcols/src/smartcolsP.h index 6cb712a46..4ee2216bf 100644 --- a/libsmartcols/src/smartcolsP.h +++ b/libsmartcols/src/smartcolsP.h @@ -50,4 +50,27 @@ struct libscols_cell { char *color; }; + +/* + * Table column + */ +struct libscols_column { + int refcount; /* reference counter */ + size_t seqnum; /* column index */ + + size_t width; /* real column width */ + size_t width_min; /* minimal width (usually header width) */ + size_t width_max; /* maximal width */ + size_t width_avg; /* average width, used to detect extreme fields */ + double width_hint; /* hint (N < 1 is in percent of termwidth) */ + + int flags; + int is_extreme; + char *color; /* default column color */ + + struct libscols_cell header; + struct list_head cl_columns; +}; + + #endif /* _LIBSMARTCOLS_PRIVATE_H */ |