Lines Matching refs:dec

115 	declaration dec;  local
126 get_declaration(&dec, DEF_STRUCT);
128 decls->decl = dec;
143 declaration dec; local
183 get_prog_declaration(&dec, DEF_PROGRAM, num_args);
184 if (streq(dec.type, "void"))
188 decls->decl = dec;
193 get_prog_declaration(&dec, DEF_STRUCT,
196 decls->decl = dec;
198 if (streq(dec.type, "void"))
293 declaration dec; local
303 get_declaration(&dec, DEF_UNION);
304 defp->def.un.enum_decl = dec;
331 get_declaration(&dec, DEF_UNION);
332 cases->case_decl = dec;
344 get_declaration(&dec, DEF_UNION);
346 *defp->def.un.default_decl = dec;
407 declaration dec; local
410 get_declaration(&dec, DEF_TYPEDEF);
411 defp->def_name = dec.name;
412 check_type_name(dec.name, 1);
413 defp->def.ty.old_prefix = dec.prefix;
414 defp->def.ty.old_type = dec.type;
415 defp->def.ty.rel = dec.rel;
416 defp->def.ty.array_max = dec.array_max;
420 get_declaration(dec, dkind) in get_declaration() argument
421 declaration *dec; in get_declaration()
426 get_type(&dec->prefix, &dec->type, dkind);
427 dec->rel = REL_ALIAS;
428 if (streq(dec->type, "void")) {
432 check_type_name(dec->type, 0);
436 dec->rel = REL_POINTER;
439 dec->name = tok.str;
441 if (dec->rel == REL_POINTER) {
444 dec->rel = REL_VECTOR;
446 dec->array_max = tok.str;
449 if (dec->rel == REL_POINTER) {
452 dec->rel = REL_ARRAY;
454 dec->array_max = "~0"; /* unspecified size, use max */
457 dec->array_max = tok.str;
461 if (streq(dec->type, "opaque")) {
462 if (dec->rel != REL_ARRAY && dec->rel != REL_VECTOR) {
465 } else if (streq(dec->type, "string")) {
466 if (dec->rel != REL_ARRAY) {
473 get_prog_declaration(dec, dkind, num) in get_prog_declaration() argument
474 declaration *dec; in get_prog_declaration()
483 dec->rel = REL_ALIAS;
484 dec->type = "void";
485 dec->prefix = NULL;
486 dec->name = NULL;
490 get_type(&dec->prefix, &dec->type, dkind);
491 dec->rel = REL_ALIAS;
493 dec->name = (char *)strdup(tok.str);
494 if (dec->name == NULL)
498 if (asprintf(&dec->name, "%s%d", ARGNAME, num) == -1)
502 if (streq(dec->type, "void"))
505 if (streq(dec->type, "opaque"))
509 if (streq(dec->type, "string"))
512 dec->rel = REL_POINTER;
514 dec->name = (char *)strdup(tok.str);
515 if (dec->name == NULL)
520 if (!streq(dec->type, "string"))
523 dec->rel = REL_ARRAY;
525 dec->array_max = "~0";/* unspecified size, use max */
528 dec->array_max = tok.str;
532 if (streq(dec->type, "string")) {
537 if (dec->rel != REL_ARRAY) {
538 dec->rel = REL_ARRAY;
539 dec->array_max = "~0";/* unspecified size, use max */