diff options
author | Ondrej Oprala | 2014-03-24 16:44:33 +0100 |
---|---|---|
committer | Karel Zak | 2014-04-03 12:29:17 +0200 |
commit | 8b992cb5719e7632dd8bc904cb5bfb3720207739 (patch) | |
tree | 00d81f77373bdeac1394dec7a3f8dabbbf9cf923 /libsmartcols/src/table.c | |
parent | libsmartcols: colors may now be specified as human-readable strings (diff) | |
download | kernel-qcow2-util-linux-8b992cb5719e7632dd8bc904cb5bfb3720207739.tar.gz kernel-qcow2-util-linux-8b992cb5719e7632dd8bc904cb5bfb3720207739.tar.xz kernel-qcow2-util-linux-8b992cb5719e7632dd8bc904cb5bfb3720207739.zip |
libsmartcols: revert the column flags API
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
Diffstat (limited to 'libsmartcols/src/table.c')
-rw-r--r-- | libsmartcols/src/table.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/libsmartcols/src/table.c b/libsmartcols/src/table.c index cb48ce4cb..bbbd5a59d 100644 --- a/libsmartcols/src/table.c +++ b/libsmartcols/src/table.c @@ -159,7 +159,8 @@ int scols_table_remove_columns(struct libscols_table *tb) */ struct libscols_column *scols_table_new_column(struct libscols_table *tb, const char *name, - double whint) + double whint, + int flags) { struct libscols_column *cl; struct libscols_cell *hr; @@ -179,6 +180,10 @@ struct libscols_column *scols_table_new_column(struct libscols_table *tb, goto err; scols_column_set_whint(cl, whint); + scols_column_set_flags(cl, flags); + + if (flags & SCOLS_FL_TREE) + scols_table_set_tree(tb, 1); if (scols_table_add_column(tb, cl)) /* this increments column ref-counter */ goto err; |