1
0
Fork 0

add some debugig logic

This commit is contained in:
ehofman 2009-06-21 11:09:32 +00:00 committed by Tim Moore
parent b03ac3497b
commit 755f4f12f4

View file

@ -99,14 +99,19 @@ void print_binary_protocol(void *id, char *filename, char *dir)
size = 4; size = 4;
} else if (!strcasecmp(type, "double")) { } else if (!strcasecmp(type, "double")) {
size = 8; size = 8;
} else { /* defaults to integer */ } else if (!strcasecmp(type, "int")) {
size = 4; size = 4;
} else {
printf("Unsupported type sepcified: '%s'\n\n", type);
free(type);
free(xid);
return;
} }
xmlNodeCopyString(xid, "factor", (char *)factor, 10); xmlNodeCopyString(xid, "factor", (char *)&factor, 10);
name = xmlNodeGetString(xid, "name"); name = xmlNodeGetString(xid, "name");
printf("%4i | %4i | %6s | %10s | %s\n", pos, size, type, factor?factor:"", name); printf("%4i | %4i | %6s | %10s | %s\n", pos, size, type, factor, name);
pos += size; pos += size;
free(type); free(type);