2 * UCW Library -- Table printer
4 * (c) 2014 Robert Kessl <robert.kessl@economia.cz>
7 #ifndef _UCW_TABLE_TYPES_H
8 #define _UCW_TABLE_TYPES_H
10 #include <ucw/table.h>
12 #ifdef CONFIG_UCW_CLEAN_ABI
13 #define table_col_size ucw_table_col_size
14 #define table_col_timestamp ucw_table_col_timestamp
15 #define xt_size ucw_xt_size
16 #define xt_timestamp ucw_xt_timestamp
28 #define TIMESTAMP_EPOCH XTYPE_FMT_RAW
29 #define TIMESTAMP_DATETIME XTYPE_FMT_PRETTY
31 #define SIZE_UNITS_FIXED 0x40000000
33 extern const struct xtype xt_size;
34 extern const struct xtype xt_timestamp;
36 #define TBL_COL_SIZE(_name, _width) { .name = _name, .width = _width, .fmt = XTYPE_FMT_DEFAULT, .type_def = &xt_size, .set_col_opt = table_set_col_opt }
37 #define TBL_COL_TIMESTAMP(_name, _width) { .name = _name, .width = _width, .fmt = XTYPE_FMT_DEFAULT, .type_def = &xt_timestamp, .set_col_opt = table_set_col_opt }
39 #define TBL_COL_SIZE_FMT(_name, _width, _units) { .name = _name, .width = _width, .fmt = XTYPE_FMT_DEFAULT, .type_def = &xt_size, .set_col_opt = table_set_col_opt }
40 #define TBL_COL_TIMESTAMP_FMT(_name, _width, _fmt) { .name = _name, .width = _width, .fmt = XTYPE_FMT_DEFAULT, .type_def = &xt_timestamp, .set_col_opt = table_set_col_opt}
42 TABLE_COL_PROTO(size, u64)
43 TABLE_COL_PROTO(timestamp, u64)