Lines Matching full:dec
106 declaration dec; in def_struct() local
117 get_declaration(&dec, DEF_STRUCT); in def_struct()
119 decls->decl = dec; in def_struct()
133 declaration dec; in def_program() local
174 get_prog_declaration(&dec, DEF_PROGRAM, num_args); in def_program()
175 if (streq(dec.type, "void")) in def_program()
179 decls->decl = dec; in def_program()
184 get_prog_declaration(&dec, DEF_STRUCT, in def_program()
187 decls->decl = dec; in def_program()
189 if (streq(dec.type, "void")) in def_program()
281 declaration dec; in def_union() local
290 get_declaration(&dec, DEF_UNION); in def_union()
291 defp->def.un.enum_decl = dec; in def_union()
315 get_declaration(&dec, DEF_UNION); in def_union()
316 cases->case_decl = dec; in def_union()
327 get_declaration(&dec, DEF_UNION); in def_union()
329 *defp->def.un.default_decl = dec; in def_union()
396 declaration dec; in def_typedef() local
399 get_declaration(&dec, DEF_TYPEDEF); in def_typedef()
400 defp->def_name = dec.name; in def_typedef()
401 check_type_name(dec.name, 1); in def_typedef()
402 defp->def.ty.old_prefix = dec.prefix; in def_typedef()
403 defp->def.ty.old_type = dec.type; in def_typedef()
404 defp->def.ty.rel = dec.rel; in def_typedef()
405 defp->def.ty.array_max = dec.array_max; in def_typedef()
409 get_declaration(declaration *dec, defkind dkind) in get_declaration() argument
413 get_type(&dec->prefix, &dec->type, dkind); in get_declaration()
414 dec->rel = REL_ALIAS; in get_declaration()
415 if (streq(dec->type, "void")) { in get_declaration()
419 check_type_name(dec->type, 0); in get_declaration()
422 dec->rel = REL_POINTER; in get_declaration()
425 dec->name = tok.str; in get_declaration()
427 if (dec->rel == REL_POINTER) { in get_declaration()
430 dec->rel = REL_VECTOR; in get_declaration()
432 dec->array_max = tok.str; in get_declaration()
435 if (dec->rel == REL_POINTER) { in get_declaration()
438 dec->rel = REL_ARRAY; in get_declaration()
440 dec->array_max = "~0"; /* unspecified size, use max */ in get_declaration()
443 dec->array_max = tok.str; in get_declaration()
447 if (streq(dec->type, "opaque")) { in get_declaration()
448 if (dec->rel != REL_ARRAY && dec->rel != REL_VECTOR) { in get_declaration()
451 } else if (streq(dec->type, "string")) { in get_declaration()
452 if (dec->rel != REL_ARRAY) { in get_declaration()
460 get_prog_declaration(declaration *dec, defkind dkind, int num) in get_prog_declaration() argument
468 dec->rel = REL_ALIAS; in get_prog_declaration()
469 dec->type = "void"; in get_prog_declaration()
470 dec->prefix = NULL; in get_prog_declaration()
471 dec->name = NULL; in get_prog_declaration()
475 get_type(&dec->prefix, &dec->type, dkind); in get_prog_declaration()
476 dec->rel = REL_ALIAS; in get_prog_declaration()
483 dec->name = (char *) xstrdup(name); in get_prog_declaration()
484 if (streq(dec->type, "void")) { in get_prog_declaration()
488 if (streq(dec->type, "opaque")) { in get_prog_declaration()
492 if (streq(dec->type, "string")) { in get_prog_declaration()
495 dec->rel = REL_POINTER; in get_prog_declaration()
498 dec->name = xstrdup(tok.str); in get_prog_declaration()
502 if (!streq(dec->type, "string")) { in get_prog_declaration()
505 dec->rel = REL_ARRAY; in get_prog_declaration()
507 dec->array_max = "~0"; in get_prog_declaration()
511 dec->array_max = tok.str; in get_prog_declaration()
515 if (streq(dec->type, "string")) { in get_prog_declaration()
516 if (dec->rel != REL_ARRAY) { in get_prog_declaration()
522 dec->rel = REL_ARRAY; in get_prog_declaration()
523 dec->array_max = "~0"; /* unspecified size, use max */ in get_prog_declaration()