typedef struct s_type_modifier {
short is_long;
- int is_unsigned:1;
- int is_short:1;
+ unsigned is_unsigned:1;
+ unsigned is_short:1;
- int is_struct:1;
- int is_union:1;
- int is_enum:1;
+ unsigned is_struct:1;
+ unsigned is_union:1;
+ unsigned is_enum:1;
- int is_ref:1;
+ unsigned is_ref:1;
int is_dynar:2;
int is_matrix:2;
/* local functions */
static void parse_type_modifier(type_modifier_t type_modifier)
{
- XBT_IN("");
+ XBT_IN();
do {
if (xbt_ddt_parse_tok_num == XBT_DDT_PARSE_TOKEN_STAR) {
/* This only used when parsing 'short *' since this function returns when int, float, double,... is encountered */
{
int i;
- XBT_IN("");
+ XBT_IN();
if (tm.is_unsigned)
printf("(unsigned) ");
if (tm.is_short)
s_identifier_t former, array;
memset(&array, 0, sizeof(array));
- XBT_IN("");
+ XBT_IN();
xbt_dynar_pop(dynar, &former);
array.type_name = (char *) xbt_malloc(strlen(former.type->name) + 48);
XBT_DEBUG("Array specification (size=%ld, elm='%s'), change pushed type",
s_identifier_t former, ref;
memset(&ref, 0, sizeof(ref));
- XBT_IN("");
+ XBT_IN();
xbt_dynar_pop(dynar, &former);
ref.type_name = (char *) xbt_malloc(strlen(former.type->name) + 2);
XBT_DEBUG("Ref specification (elm='%s'), change pushed type",
s_identifier_t former, ref;
memset(&ref, 0, sizeof(ref));
- XBT_IN("");
+ XBT_IN();
xbt_dynar_pop(dynar, &former);
ref.type = xbt_datadesc_ref_pop_arr(former.type); /* redeclaration are ignored */
ref.type_name = (char *) strdup(ref.type->name);
s_identifier_t former, ref;
memset(&ref, 0, sizeof(ref));
- XBT_IN("");
+ XBT_IN();
xbt_dynar_pop(dynar, &former);
ref.type = xbt_datadesc_dynar(subtype, NULL); /* redeclaration are ignored */
ref.type_name = (char *) strdup(ref.type->name);
s_identifier_t former, ref;
memset(&ref, 0, sizeof(ref));
- XBT_IN("");
+ XBT_IN();
xbt_dynar_pop(dynar, &former);
ref.type = xbt_datadesc_matrix(subtype, NULL); /* redeclaration are ignored */
ref.type_name = (char *) strdup(ref.type->name);
s_identifier_t former, ref;
memset(&ref, 0, sizeof(ref));
- XBT_IN("");
+ XBT_IN();
xbt_dynar_pop(dynar, &former);
- memcpy(former.type->extra, free_f, sizeof(free_f));
+ memcpy(former.type->extra, &free_f, sizeof(free_f));
xbt_dynar_push(dynar, &former);
XBT_OUT();
}
int expect_id_separator = 0;
- XBT_IN("");
+ XBT_IN();
memset(&identifier, 0, sizeof(identifier));
xbt_ddt_parse_tok_num = xbt_ddt_parse_lex_n_dump();
volatile xbt_datadesc_type_t struct_type;
- XBT_IN("");
+ XBT_IN();
identifiers = xbt_dynar_new(sizeof(s_identifier_t), NULL);
fields_to_push = xbt_dynar_new(sizeof(char *), NULL);
if (field.tm.is_ref)
PARSE_ERROR
("Not enough XBT_ANNOTATE to deal with all dereferencing levels of %s (%d '*' left)",
- field.name, field.tm.is_ref);
+ field.name, (int)field.tm.is_ref);
XBT_VERB("Append field '%s' to %p", field.name, (void *) struct_type);
xbt_datadesc_struct_append(struct_type, field.name, field.type);
xbt_datadesc_type_t typedef_desc = NULL;
- XBT_IN("");
+ XBT_IN();
memset(&tm, 0, sizeof(tm));
/* get the aliased type */
int semicolon_count = 0;
int def_count, C_count;
- XBT_IN("");
+ XBT_IN();
/* reput the \n in place for debug */
for (C_count = 0; C_statement[C_count] != '\0'; C_count++)
if (C_statement[C_count] == ';' || C_statement[C_count] == '{')