Lines Matching refs:dec

116 	declaration dec;  in def_struct()  local
127 get_declaration(&dec, DEF_STRUCT); in def_struct()
129 decls->decl = dec; in def_struct()
143 declaration dec; in def_program() local
184 get_prog_declaration(&dec, DEF_PROGRAM, num_args); in def_program()
185 if (streq(dec.type, "void")) in def_program()
189 decls->decl = dec; in def_program()
194 get_prog_declaration(&dec, DEF_STRUCT, in def_program()
197 decls->decl = dec; in def_program()
199 if (streq(dec.type, "void")) in def_program()
291 declaration dec; in def_union() local
300 get_declaration(&dec, DEF_UNION); in def_union()
301 defp->def.un.enum_decl = dec; in def_union()
325 get_declaration(&dec, DEF_UNION); in def_union()
326 cases->case_decl = dec; in def_union()
337 get_declaration(&dec, DEF_UNION); in def_union()
339 *defp->def.un.default_decl = dec; in def_union()
406 declaration dec; in def_typedef() local
409 get_declaration(&dec, DEF_TYPEDEF); in def_typedef()
410 defp->def_name = dec.name; in def_typedef()
411 check_type_name(dec.name, 1); in def_typedef()
412 defp->def.ty.old_prefix = dec.prefix; in def_typedef()
413 defp->def.ty.old_type = dec.type; in def_typedef()
414 defp->def.ty.rel = dec.rel; in def_typedef()
415 defp->def.ty.array_max = dec.array_max; in def_typedef()
419 get_declaration(declaration *dec, defkind dkind) in get_declaration() argument
423 get_type(&dec->prefix, &dec->type, dkind); in get_declaration()
424 dec->rel = REL_ALIAS; in get_declaration()
425 if (streq(dec->type, "void")) { in get_declaration()
429 check_type_name(dec->type, 0); in get_declaration()
432 dec->rel = REL_POINTER; in get_declaration()
435 dec->name = tok.str; in get_declaration()
437 if (dec->rel == REL_POINTER) { in get_declaration()
440 dec->rel = REL_VECTOR; in get_declaration()
442 dec->array_max = tok.str; in get_declaration()
445 if (dec->rel == REL_POINTER) { in get_declaration()
448 dec->rel = REL_ARRAY; in get_declaration()
450 dec->array_max = "~0"; /* unspecified size, use max */ in get_declaration()
453 dec->array_max = tok.str; in get_declaration()
457 if (streq(dec->type, "opaque")) { in get_declaration()
458 if (dec->rel != REL_ARRAY && dec->rel != REL_VECTOR) { in get_declaration()
461 } else if (streq(dec->type, "string")) { in get_declaration()
462 if (dec->rel != REL_ARRAY) { in get_declaration()
470 get_prog_declaration(declaration *dec, defkind dkind, int num) in get_prog_declaration() argument
478 dec->rel = REL_ALIAS; in get_prog_declaration()
479 dec->type = "void"; in get_prog_declaration()
480 dec->prefix = NULL; in get_prog_declaration()
481 dec->name = NULL; in get_prog_declaration()
485 get_type(&dec->prefix, &dec->type, dkind); in get_prog_declaration()
486 dec->rel = REL_ALIAS; in get_prog_declaration()
493 dec->name = (char *) xstrdup(name); in get_prog_declaration()
494 if (streq(dec->type, "void")) { in get_prog_declaration()
498 if (streq(dec->type, "opaque")) { in get_prog_declaration()
502 if (streq(dec->type, "string")) { in get_prog_declaration()
505 dec->rel = REL_POINTER; in get_prog_declaration()
508 dec->name = xstrdup(tok.str); in get_prog_declaration()
512 if (!streq(dec->type, "string")) { in get_prog_declaration()
515 dec->rel = REL_ARRAY; in get_prog_declaration()
517 dec->array_max = "~0"; in get_prog_declaration()
521 dec->array_max = tok.str; in get_prog_declaration()
525 if (streq(dec->type, "string")) { in get_prog_declaration()
526 if (dec->rel != REL_ARRAY) { in get_prog_declaration()
532 dec->rel = REL_ARRAY; in get_prog_declaration()
533 dec->array_max = "~0"; /* unspecified size, use max */ in get_prog_declaration()