Lines Matching defs:dec
123 declaration dec;
134 get_declaration(&dec, DEF_STRUCT);
136 decls->decl = dec;
150 declaration dec;
189 get_prog_declaration(&dec, DEF_PROGRAM, num_args);
190 if (streq(dec.type, "void"))
194 decls->decl = dec;
199 get_prog_declaration(&dec, DEF_STRUCT,
202 decls->decl = dec;
204 if (streq(dec.type, "void"))
296 declaration dec;
305 get_declaration(&dec, DEF_UNION);
306 defp->def.un.enum_decl = dec;
331 get_declaration(&dec, DEF_UNION);
332 cases->case_decl = dec;
343 get_declaration(&dec, DEF_UNION);
345 *defp->def.un.default_decl = dec;
398 declaration dec;
401 get_declaration(&dec, DEF_TYPEDEF);
402 defp->def_name = dec.name;
403 check_type_name(dec.name, 1);
404 defp->def.ty.old_prefix = dec.prefix;
405 defp->def.ty.old_type = dec.type;
406 defp->def.ty.rel = dec.rel;
407 defp->def.ty.array_max = dec.array_max;
411 get_declaration(declaration *dec, defkind dkind)
415 get_type(&dec->prefix, &dec->type, dkind);
416 dec->rel = REL_ALIAS;
417 if (streq(dec->type, "void")) {
420 check_type_name(dec->type, 0);
424 dec->rel = REL_POINTER;
427 dec->name = tok.str;
429 if (dec->rel == REL_POINTER) {
432 dec->rel = REL_VECTOR;
434 dec->array_max = tok.str;
438 if (dec->rel == REL_POINTER) {
441 dec->rel = REL_ARRAY;
443 dec->array_max = "(unsigned int)~0";
447 dec->array_max = tok.str;
451 if (streq(dec->type, "opaque")) {
452 if (dec->rel != REL_ARRAY && dec->rel != REL_VECTOR) {
456 if (streq(dec->type, "string")) {
457 if (dec->rel != REL_ARRAY) {
464 get_prog_declaration(declaration *dec, defkind dkind, int num /* arg number */)
472 dec->rel = REL_ALIAS;
473 dec->type = "void";
474 dec->prefix = NULL;
475 dec->name = NULL;
479 get_type(&dec->prefix, &dec->type, dkind);
480 dec->rel = REL_ALIAS;
487 dec->name = strdup(name);
489 if (streq(dec->type, "void")) {
492 if (streq(dec->type, "opaque")) {
496 if (streq(dec->type, "string")) {
499 dec->rel = REL_POINTER;
501 dec->name = strdup(tok.str);
504 if (!streq(dec->type, "string")) {
507 dec->rel = REL_ARRAY;
509 dec->array_max = "(unsigned int)~0";
513 dec->array_max = tok.str;
517 if (streq(dec->type, "string")) {
518 if (dec->rel != REL_ARRAY) { /* .x specifies just string as
521 dec->rel = REL_ARRAY;
522 dec->array_max = "(unsigned int)~0";