From 3e451589d5eaecfa8ddff46877f94ad79bc010f0 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Thu, 18 Nov 2010 21:04:13 +0100 Subject: lib: [tt] add TT_FL_RIGHT, add columns list parser Signed-off-by: Karel Zak --- include/tt.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'include/tt.h') diff --git a/include/tt.h b/include/tt.h index bf24d550c..e6a63ed37 100644 --- a/include/tt.h +++ b/include/tt.h @@ -12,11 +12,12 @@ #include "list.h" enum { - TT_FL_TRUNCATE = (1 << 1), + TT_FL_TRUNC = (1 << 1), TT_FL_TREE = (1 << 2), TT_FL_RAW = (1 << 3), TT_FL_ASCII = (1 << 4), - TT_FL_NOHEADINGS = (1 << 5) + TT_FL_NOHEADINGS = (1 << 5), + TT_FL_RIGHT = (1 << 6), }; struct tt { @@ -68,4 +69,7 @@ extern struct tt_line *tt_add_line(struct tt *tb, struct tt_line *parent); extern int tt_line_set_data(struct tt_line *ln, int colnum, const char *data); +extern int tt_parse_columns_list(const char *list, int cols[], int *ncols, + int (name2id)(const char *, size_t)); + #endif /* UTIL_LINUX_TT_H */ -- cgit v1.2.3-55-g7522