1 #ifndef _UCW_TABLE_TYPES_H
2 #define _UCW_TABLE_TYPES_H
15 enum timestamp_format {
20 #define COL_TYPE_SIZE COL_TYPE_CUSTOM
21 #define COL_TYPE_TIMESTAMP (COL_TYPE_CUSTOM+1)
23 extern struct table_user_type table_type_timestamp;
24 extern struct table_user_type table_type_size;
26 #define TBL_COL_SIZE(_name, _width) { .name = _name, .width = _width, .fmt = "%llu", .type = COL_TYPE_SIZE, .type_def = &table_type_size }
27 #define TBL_COL_TIMESTAMP(_name, _width) { .name = _name, .width = _width, .fmt = "%lld", .type = COL_TYPE_TIMESTAMP, .type_def = &table_type_timestamp }
29 #define TBL_COL_SIZE_FMT(_name, _width, _units) { .name = _name, .width = _width, .fmt = "%llu", .type = COL_TYPE_SIZE, .type_def = &table_type_size }
30 #define TBL_COL_TIMESTAMP_FMT(_name, _width, _fmt) { .name = _name, .width = _width, .fmt = "%lld", .type = COL_TYPE_TIMESTAMP, .type_def = &table_type_timestamp }
32 void table_col_size_name(struct table *tbl, const char *col_name, u64 val);
33 void table_col_timestamp_name(struct table *tbl, const char * col_name, u64 val);
35 void table_col_size(struct table *tbl, int col, u64 val);
36 void table_col_timestamp(struct table *tbl, int col, u64 val);