Lines Matching refs:dec
114 declaration dec; in def_struct() local
125 get_declaration(&dec, DEF_STRUCT); in def_struct()
127 decls->decl = dec; in def_struct()
141 declaration dec; in def_program() local
182 get_prog_declaration(&dec, DEF_PROGRAM, num_args); in def_program()
183 if (streq(dec.type, "void")) in def_program()
187 decls->decl = dec; in def_program()
192 get_prog_declaration(&dec, DEF_STRUCT, in def_program()
195 decls->decl = dec; in def_program()
197 if (streq(dec.type, "void")) in def_program()
289 declaration dec; in def_union() local
298 get_declaration(&dec, DEF_UNION); in def_union()
299 defp->def.un.enum_decl = dec; in def_union()
323 get_declaration(&dec, DEF_UNION); in def_union()
324 cases->case_decl = dec; in def_union()
335 get_declaration(&dec, DEF_UNION); in def_union()
337 *defp->def.un.default_decl = dec; in def_union()
404 declaration dec; in def_typedef() local
407 get_declaration(&dec, DEF_TYPEDEF); in def_typedef()
408 defp->def_name = dec.name; in def_typedef()
409 check_type_name(dec.name, 1); in def_typedef()
410 defp->def.ty.old_prefix = dec.prefix; in def_typedef()
411 defp->def.ty.old_type = dec.type; in def_typedef()
412 defp->def.ty.rel = dec.rel; in def_typedef()
413 defp->def.ty.array_max = dec.array_max; in def_typedef()
417 get_declaration(declaration *dec, defkind dkind) in get_declaration() argument
421 get_type(&dec->prefix, &dec->type, dkind); in get_declaration()
422 dec->rel = REL_ALIAS; in get_declaration()
423 if (streq(dec->type, "void")) { in get_declaration()
427 check_type_name(dec->type, 0); in get_declaration()
430 dec->rel = REL_POINTER; in get_declaration()
433 dec->name = tok.str; in get_declaration()
435 if (dec->rel == REL_POINTER) { in get_declaration()
438 dec->rel = REL_VECTOR; in get_declaration()
440 dec->array_max = tok.str; in get_declaration()
443 if (dec->rel == REL_POINTER) { in get_declaration()
446 dec->rel = REL_ARRAY; in get_declaration()
448 dec->array_max = "~0"; /* unspecified size, use max */ in get_declaration()
451 dec->array_max = tok.str; in get_declaration()
455 if (streq(dec->type, "opaque")) { in get_declaration()
456 if (dec->rel != REL_ARRAY && dec->rel != REL_VECTOR) { in get_declaration()
459 } else if (streq(dec->type, "string")) { in get_declaration()
460 if (dec->rel != REL_ARRAY) { in get_declaration()
468 get_prog_declaration(declaration *dec, defkind dkind, int num) in get_prog_declaration() argument
476 dec->rel = REL_ALIAS; in get_prog_declaration()
477 dec->type = "void"; in get_prog_declaration()
478 dec->prefix = NULL; in get_prog_declaration()
479 dec->name = NULL; in get_prog_declaration()
483 get_type(&dec->prefix, &dec->type, dkind); in get_prog_declaration()
484 dec->rel = REL_ALIAS; in get_prog_declaration()
491 dec->name = (char *) xstrdup(name); in get_prog_declaration()
492 if (streq(dec->type, "void")) { in get_prog_declaration()
496 if (streq(dec->type, "opaque")) { in get_prog_declaration()
500 if (streq(dec->type, "string")) { in get_prog_declaration()
503 dec->rel = REL_POINTER; in get_prog_declaration()
506 dec->name = xstrdup(tok.str); in get_prog_declaration()
510 if (!streq(dec->type, "string")) { in get_prog_declaration()
513 dec->rel = REL_ARRAY; in get_prog_declaration()
515 dec->array_max = "~0"; in get_prog_declaration()
519 dec->array_max = tok.str; in get_prog_declaration()
523 if (streq(dec->type, "string")) { in get_prog_declaration()
524 if (dec->rel != REL_ARRAY) { in get_prog_declaration()
530 dec->rel = REL_ARRAY; in get_prog_declaration()
531 dec->array_max = "~0"; /* unspecified size, use max */ in get_prog_declaration()