Lines Matching refs:dec
248 declaration dec; in def_struct() local
260 get_declaration(&dec, DEF_STRUCT); in def_struct()
262 decls->decl = dec; in def_struct()
287 declaration dec; in def_program() local
328 get_prog_declaration(&dec, DEF_PROGRAM, num_args); in def_program()
329 if (streq(dec.type, "void")) in def_program()
333 decls->decl = dec; in def_program()
338 get_prog_declaration(&dec, DEF_STRUCT, in def_program()
341 decls->decl = dec; in def_program()
343 if (streq(dec.type, "void")) in def_program()
434 declaration dec; in def_union() local
444 get_declaration(&dec, DEF_UNION); in def_union()
445 defp->def.un.enum_decl = dec; in def_union()
474 get_declaration(&dec, DEF_UNION); in def_union()
475 cases->case_decl = dec; in def_union()
486 get_declaration(&dec, DEF_UNION); in def_union()
488 *defp->def.un.default_decl = dec; in def_union()
553 declaration dec; in def_typedef() local
556 get_declaration(&dec, DEF_TYPEDEF); in def_typedef()
557 defp->def_name = dec.name; in def_typedef()
558 check_type_name(dec.name, 1); in def_typedef()
559 defp->def.ty.old_prefix = dec.prefix; in def_typedef()
560 defp->def.ty.old_type = dec.type; in def_typedef()
561 defp->def.ty.rel = dec.rel; in def_typedef()
562 defp->def.ty.array_max = dec.array_max; in def_typedef()
566 get_declaration(declaration *dec, defkind dkind) in get_declaration() argument
570 get_type(&dec->prefix, &dec->type, dkind); in get_declaration()
571 dec->rel = REL_ALIAS; in get_declaration()
572 if (streq(dec->type, "void")) in get_declaration()
575 check_type_name(dec->type, 0); in get_declaration()
578 dec->rel = REL_POINTER; in get_declaration()
581 dec->name = tok.str; in get_declaration()
583 if (dec->rel == REL_POINTER) in get_declaration()
586 dec->rel = REL_VECTOR; in get_declaration()
588 dec->array_max = tok.str; in get_declaration()
591 if (dec->rel == REL_POINTER) in get_declaration()
594 dec->rel = REL_ARRAY; in get_declaration()
596 dec->array_max = "~0"; /* unspecified size, use max */ in get_declaration()
599 dec->array_max = tok.str; in get_declaration()
603 if (streq(dec->type, "opaque")) { in get_declaration()
604 if (dec->rel != REL_ARRAY && dec->rel != REL_VECTOR) { in get_declaration()
607 } else if (streq(dec->type, "string")) { in get_declaration()
608 if (dec->rel != REL_ARRAY) { in get_declaration()
615 get_prog_declaration(declaration *dec, defkind dkind, int num) in get_prog_declaration() argument
623 dec->rel = REL_ALIAS; in get_prog_declaration()
624 dec->type = "void"; in get_prog_declaration()
625 dec->prefix = NULL; in get_prog_declaration()
626 dec->name = NULL; in get_prog_declaration()
630 get_type(&dec->prefix, &dec->type, dkind); in get_prog_declaration()
631 dec->rel = REL_ALIAS; in get_prog_declaration()
633 dec->name = strdup(tok.str); in get_prog_declaration()
637 dec->name = strdup(name); in get_prog_declaration()
639 if (dec->name == NULL) in get_prog_declaration()
642 if (streq(dec->type, "void")) in get_prog_declaration()
645 if (streq(dec->type, "opaque")) in get_prog_declaration()
648 if (streq(dec->type, "string")) { in get_prog_declaration()
652 dec->rel = REL_POINTER; in get_prog_declaration()
655 dec->name = strdup(tok.str); in get_prog_declaration()
658 if (!streq(dec->type, "string")) { in get_prog_declaration()
662 dec->rel = REL_ARRAY; in get_prog_declaration()
664 dec->array_max = "~0"; in get_prog_declaration()
668 dec->array_max = tok.str; in get_prog_declaration()
672 if (streq(dec->type, "string")) { in get_prog_declaration()
673 if (dec->rel != REL_ARRAY) { in get_prog_declaration()
679 dec->rel = REL_ARRAY; in get_prog_declaration()
680 dec->array_max = "~0"; /* unspecified size, use max */ in get_prog_declaration()