t->fmt = NULL;
t->size = 0;
- t->alignment = 0;
while(1) {
token = getToken(in);
} else if(!strcmp("size",token)) {
getEqual(in);
t->size = getSize(in);
- } else if(!strcmp("align",token)) {
- getEqual(in);
- t->alignment = getNumber(in);
}
}
}
t->already_printed = 0;
getTypeAttributes(in, t, unnamed_types, named_types);
//if(t->size == 0) in->error(in, "Sequence has empty size");
- //Mathieu : we fix enum size to 4 bytes. GCC is always like this.
+ //Mathieu : we fix enum size to target int size. GCC is always like this.
//fox copy optimisation.
- if(t->size != 0) in->error(in, "Enum has fixed size of 4.");
- t->size = 4;
+ if(t->size != 0) in->error(in, "Enum has fixed size of target int.");
+ t->size = 0;
getRAnglebracket(in);
//<label name=label1 value=n/>
unsigned long crc ;
int pos;
event_t * ev;
+ unsigned int i;
crc = crc32(facName);
for(pos = 0; pos < events->position; pos++){
ev = (event_t *)(events->array[pos]);
crc = partial_crc32(ev->name, crc);
- for(unsigned int i = 0; i < ev->fields.position; i++) {
+ for(i = 0; i < ev->fields.position; i++) {
field_t *f = (field_t*)ev->fields.array[i];
crc = partial_crc32(f->name, crc);
crc = getTypeChecksum(crc, f->type);
sequence_t labels_values; // for enumeration
sequence_t labels_description;
int already_printed;
- sequence_t fields; // for structure, array and sequence
- int alignment;
+ sequence_t fields; // for structure, array and sequence (field_t type)
} type_descriptor_t;