]> mj.ucw.cz Git - libucw.git/commitdiff
Merge remote-tracking branch 'origin/master'
authorRobert Kessl <kesslr@centrum.cz>
Mon, 16 Jun 2014 06:36:09 +0000 (08:36 +0200)
committerRobert Kessl <kesslr@centrum.cz>
Mon, 16 Jun 2014 06:36:09 +0000 (08:36 +0200)
ucw/table.c
ucw/table.h

index 0e3f9ae81ea88d719059707e03e160618cc30036..02076ec4ea42efa259c055287c47f177bbf38843 100644 (file)
@@ -231,6 +231,7 @@ TABLE_COL_BODIES(double, double, COL_TYPE_DOUBLE)
 TABLE_COL_BODIES(str, const char *, COL_TYPE_STR)
 TABLE_COL_BODIES(intmax, intmax_t, COL_TYPE_INTMAX)
 TABLE_COL_BODIES(uintmax, uintmax_t, COL_TYPE_UINTMAX)
+TABLE_COL_BODIES(s64, s64, COL_TYPE_S64)
 TABLE_COL_BODIES(u64, u64, COL_TYPE_U64)
 #undef TABLE_COL
 #undef TABLE_COL_FMT
index f6f04db818a0c7998e40d6d4a3b3554ddf03d8a1..bf62a58781e149ce075fa5ed3fcb5c1150c5f82a 100644 (file)
@@ -53,7 +53,7 @@
 enum column_type {
   COL_TYPE_STR,
   COL_TYPE_INT,
-  COL_TYPE_INT64,
+  COL_TYPE_S64,
   COL_TYPE_INTMAX,
   COL_TYPE_UINT,
   COL_TYPE_U64,
@@ -79,7 +79,7 @@ enum column_type {
 
 #define TBL_COL_STR(_name, _width)            { .name = _name, .width = _width, .fmt = "%s", .type = COL_TYPE_STR }
 #define TBL_COL_INT(_name, _width)            { .name = _name, .width = _width, .fmt = "%d", .type = COL_TYPE_INT }
-#define TBL_COL_INT64(_name, _width)          { .name = _name, .width = _width, .fmt = "%lld", .type = COL_TYPE_INT64 }
+#define TBL_COL_S64(_name, _width)            { .name = _name, .width = _width, .fmt = "%lld", .type = COL_TYPE_S64 }
 #define TBL_COL_UINT(_name, _width)           { .name = _name, .width = _width, .fmt = "%u", .type = COL_TYPE_UINT }
 #define TBL_COL_U64(_name, _width)            { .name = _name, .width = _width, .fmt = "%llu", .type = COL_TYPE_U64 }
 #define TBL_COL_INTMAX(_name, _width)         { .name = _name, .width = _width, .fmt = "%jd", .type = COL_TYPE_INTMAX }
@@ -91,7 +91,7 @@ enum column_type {
 
 #define TBL_COL_STR_FMT(_name, _width, _fmt)            { .name = _name, .width = _width, .fmt = _fmt, .type = COL_TYPE_STR }
 #define TBL_COL_INT_FMT(_name, _width, _fmt)            { .name = _name, .width = _width, .fmt = _fmt, .type = COL_TYPE_INT }
-#define TBL_COL_INT64_FMT(_name, _width, _fmt)          { .name = _name, .width = _width, .fmt = _fmt, .type = COL_TYPE_INT64 }
+#define TBL_COL_S64_FMT(_name, _width, _fmt)            { .name = _name, .width = _width, .fmt = _fmt, .type = COL_TYPE_S64 }
 #define TBL_COL_UINT_FMT(_name, _width, _fmt)           { .name = _name, .width = _width, .fmt = _fmt, .type = COL_TYPE_UINT }
 #define TBL_COL_U64_FMT(_name, _width, _fmt)            { .name = _name, .width = _width, .fmt = _fmt, .type = COL_TYPE_U64 }
 #define TBL_COL_INTMAX_FMT(_name, _width, _fmt)         { .name = _name, .width = _width, .fmt = _fmt, .type = COL_TYPE_INTMAX }
@@ -339,6 +339,7 @@ TABLE_COL_PROTO(double, double);
 TABLE_COL_PROTO(str, const char *);
 TABLE_COL_PROTO(intmax, intmax_t);
 TABLE_COL_PROTO(uintmax, uintmax_t);
+TABLE_COL_PROTO(s64, s64);
 TABLE_COL_PROTO(u64, u64);
 
 void table_col_bool(struct table *tbl, int col, uint val);
@@ -353,6 +354,7 @@ TABLE_APPEND_PROTO(double, double);
 TABLE_APPEND_PROTO(str, const char *);
 TABLE_APPEND_PROTO(intmax, intmax_t);
 TABLE_APPEND_PROTO(uintmax, uintmax_t);
+TABLE_APPEND_PROTO(s64, s64);
 TABLE_APPEND_PROTO(u64, u64);
 void table_append_bool(struct table *tbl, int val);
 #undef TABLE_APPEND_PROTO