Lines Matching refs:dec

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