import VCD into the T

This commit is contained in:
Cedric Roux
2016-05-20 15:27:14 +02:00
parent 131b1bda23
commit f38476aee4
10 changed files with 844 additions and 1 deletions
+3 -1
View File
@@ -10,7 +10,7 @@
enum format_item_type {
INSTRING,
INT, STRING, BUFFER };
INT, ULONG, STRING, BUFFER };
struct format_item {
enum format_item_type type;
@@ -56,6 +56,7 @@ static void _event(void *p, event e)
switch(l->f[i].type) {
case INSTRING: PUTS(&l->o, l->f[i].s); break;
case INT: PUTI(&l->o, e.e[l->f[i].event_arg].i); break;
case ULONG: PUTUL(&l->o, e.e[l->f[i].event_arg].ul); break;
case STRING: PUTS_CLEAN(&l->o, e.e[l->f[i].event_arg].s); break;
case BUFFER:
PUTS(&l->o, "{buffer size:");
@@ -86,6 +87,7 @@ static int find_argument(char *name, database_event_format f,
if (i == f.count) return 0;
*event_arg = i;
if (!strcmp(f.type[i], "int")) *it = INT;
else if (!strcmp(f.type[i], "ulong")) *it = ULONG;
else if (!strcmp(f.type[i], "string")) *it = STRING;
else if (!strcmp(f.type[i], "buffer")) *it = BUFFER;
else return 0;