X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=ltt%2Fbranches%2Fpoly%2Fltt%2Fparser.c;h=795b3f96f4ba0d5a8be7be6ab666c293c5b2c16b;hb=0ce0410b124ac413dcb537dc523619910ee35791;hp=24ffa52123a31bfb09b16687e78f49f0339fcfe9;hpb=90699b2bad4ff49fcaf0ad8520d7cf41ffc6c393;p=lttv.git diff --git a/ltt/branches/poly/ltt/parser.c b/ltt/branches/poly/ltt/parser.c index 24ffa521..795b3f96 100644 --- a/ltt/branches/poly/ltt/parser.c +++ b/ltt/branches/poly/ltt/parser.c @@ -38,11 +38,24 @@ This program is distributed in the hope that it will be useful, #include #include #include - +#include #include "parser.h" +static char *intOutputTypes[] = { + "int8_t", "int16_t", "int32_t", "int64_t", "short int", "int", "long int" }; + +static char *uintOutputTypes[] = { + "uint8_t", "uint16_t", "uint32_t", "uint64_t", "unsigned short int", + "unsigned int", "unsigned long int" }; + +static char *floatOutputTypes[] = { + "undef", "undef", "float", "double", "undef", "float", "double" }; + + + + /* helper function */ void strupper(char *string) { @@ -173,7 +186,6 @@ char *allocAndCopy(char *str) void getTypeAttributes(parse_file_t *in, type_descriptor_t *t) { char * token; - char car; t->fmt = NULL; t->size = -1; @@ -465,7 +477,6 @@ void parseEvent(parse_file_t *in, event_t * ev, sequence_t * unnamed_types, table_t * named_types) { char *token; - type_descriptor_t *t; // getEventAttributes(in, ev); @@ -1188,12 +1199,12 @@ unsigned long getTypeChecksum(unsigned long aCrc, type_descriptor_t * type) flag = 1; break; case ARRAY: - sprintf(buf,"%d\0",type->size); + sprintf(buf,"%d",type->size); str = appendString("array ",buf); flag = 1; break; case SEQUENCE: - sprintf(buf,"%d\0",type->size); + sprintf(buf,"%d",type->size); str = appendString("sequence ",buf); flag = 1; break; @@ -1271,9 +1282,8 @@ void freeNamedType(table_t * t) void freeTypes(sequence_t *t) { - int pos, pos2; + int pos; type_descriptor_t *tp; - field_t *f; for(pos = 0 ; pos < t->position; pos++) { tp = (type_descriptor_t *)t->array[pos];