Home | History | Annotate | Download | only in rpcgen

Lines Matching refs:def

80 emit(definition *def)
82 if (def->def_kind == DEF_CONST) {
85 if (def->def_kind == DEF_PROGRAM) {
86 emit_program(def);
89 if (def->def_kind == DEF_TYPEDEF) {
94 if (strcmp(def->def.ty.old_type, def->def_name) == 0)
98 print_header(def);
100 switch (def->def_kind) {
102 emit_union(def);
105 emit_enum(def);
108 emit_struct(def);
111 emit_typedef(def);
116 __FILE__, __LINE__, def->def_kind);
123 findtype(definition *def, const char *type)
126 if (def->def_kind == DEF_PROGRAM || def->def_kind == DEF_CONST) {
129 return (streq(def->def_name, type));
136 definition *def;
138 def = (definition *) FINDVAL(defined, type, findtype);
141 return (def == NULL);
158 print_header(definition *def)
160 print_generic_header(def->def_name,
161 def->def_kind != DEF_TYPEDEF ||
162 !isvectordef(def->def.ty.old_type, def->def.ty.rel));
298 emit_enum(definition *def)
308 f_print(fout, "*objp = (%s)et;\n", def->def_name);
314 emit_program(definition *def)
320 for (vlist = def->def.pr.versions; vlist != NULL; vlist = vlist->next)
335 emit_union(definition *def)
345 print_stat(1, &def->def.un.enum_decl);
346 f_print(fout, "\tswitch (objp->%s) {\n", def->def.un.enum_decl.name);
347 for (cl = def->def.un.cases; cl != NULL; cl = cl->next) {
353 object = alloc(strlen(def->def_name) + strlen(format) +
356 s_print(object, vecformat, def->def_name,
359 s_print(object, format, def->def_name,
368 dflt = def->def.un.default_decl;
372 object = alloc(strlen(def->def_name) + strlen(format) +
375 s_print(object, vecformat, def->def_name,
378 s_print(object, format, def->def_name,
394 emit_struct(definition *def)
408 for (dl = def->def.st.decls; dl != NULL; dl = dl->next)
414 for (dl = def->def.st.decls; dl != NULL; dl = dl->next)
437 for (dl = def->def.st.decls; dl != NULL; dl = dl->next)
452 for (dl = def->def.st.decls; dl != NULL; dl = dl->next) { /* xxx */
603 for (dl = def->def.st.decls; dl != NULL; dl = dl->next)
610 emit_typedef(definition *def)
612 const char *prefix = def->def.ty.old_prefix;
613 const char *type = def->def.ty.old_type;
614 const char *amax = def->def.ty.array_max;
615 relation rel = def->def.ty.rel;
618 print_ifstat(1, prefix, type, rel, amax, "objp", def->def_name);