summaryrefslogtreecommitdiff
path: root/include/tt.h
diff options
context:
space:
mode:
authorRichard Maw <richard.maw@codethink.co.uk>2014-06-12 12:04:01 +0100
committerRichard Maw <richard.maw@codethink.co.uk>2014-06-12 12:04:01 +0100
commitc5c1033c5c7deda8abe3448ec81bbb33c72219e0 (patch)
tree6e5cef29b85161eea8a7488a029f5a32f982c6ab /include/tt.h
parent462008f79be9e195670b202cb43827b8aeb1e60b (diff)
parent2fb567c080e1762ec6a2147564f03068f55d4f14 (diff)
downloadutil-linux-baserock/morph.tar.gz
Merge branch 'baserock/richardmaw/yakshave/util-linux-blkid' into baserock/morphbaserock/morph
Reviewed-by: Lars Wirzenius Reviewed-by: Sam Thursfield
Diffstat (limited to 'include/tt.h')
-rw-r--r--include/tt.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/include/tt.h b/include/tt.h
index 603844f66..0a16c2075 100644
--- a/include/tt.h
+++ b/include/tt.h
@@ -27,7 +27,9 @@ enum {
TT_FL_TREE = (1 << 6), /* use tree "ascii art" */
TT_FL_RIGHT = (1 << 7), /* align to the right */
TT_FL_STRICTWIDTH = (1 << 8), /* don't reduce width if column is empty */
- TT_FL_NOEXTREMES = (1 << 9) /* ignore extreme fields when count column width*/
+ TT_FL_NOEXTREMES = (1 << 9), /* ignore extreme fields when count column width*/
+
+ TT_FL_FREEDATA = (1 << 10), /* free() data in tt_free_table() */
};
struct tt {
@@ -61,7 +63,7 @@ struct tt_column {
struct tt_line {
struct tt *table;
- char const **data;
+ char **data;
void *userdata;
size_t data_sz; /* strlen of all data */
@@ -85,7 +87,7 @@ extern struct tt_column *tt_get_column(struct tt *tb, size_t colnum);
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_line_set_data(struct tt_line *ln, int colnum, char *data);
extern int tt_line_set_userdata(struct tt_line *ln, void *data);
extern void tt_fputs_quoted(const char *data, FILE *out);