/* * Print the C-version of an xdr definition */ void print_datadef(definition *def) { if (def->def_kind == DEF_PROGRAM) /* handle data only */ return; if (def->def_kind != DEF_CONST) { f_print(fout, "\n"); } switch (def->def_kind) { case DEF_STRUCT: pstructdef(def); break; case DEF_UNION: puniondef(def); break; case DEF_ENUM: penumdef(def); break; case DEF_TYPEDEF: ptypedef(def); break; case DEF_PROGRAM: pprogramdef(def); break; case DEF_CONST: pconstdef(def); break; } }
/* * Print the C-version of an xdr definition */ void print_datadef(definition *def) { if (def->def_kind == DEF_PROGRAM) /* handle data only */ return; if (def->def_kind != DEF_CONST) f_print(fout, "\n"); switch (def->def_kind) { case DEF_STRUCT: pstructdef(def); break; case DEF_UNION: puniondef(def); break; case DEF_ENUM: penumdef(def); break; case DEF_TYPEDEF: ptypedef(def); break; case DEF_PROGRAM: pprogramdef(def); break; case DEF_CONST: pconstdef(def); break; } if (def->def_kind != DEF_PROGRAM && def->def_kind != DEF_CONST) storexdrfuncdecl(def->def_name, def->def_kind != DEF_TYPEDEF || !isvectordef(def->def.ty.old_type, def->def.ty.rel)); }
void print_funcdef(definition *def) { switch (def->def_kind) { case DEF_PROGRAM: f_print(fout, "\n"); pprogramdef(def); break; } }
void print_funcdef(definition *def, int headeronly) { switch (def->def_kind) { case DEF_PROGRAM: f_print(fout, "\n"); pprogramdef(def, headeronly); break; default: break; } }
void print_funcdef(definition *def) { switch (def->def_kind) { case DEF_PROGRAM: f_print(fout, "\n"); pprogramdef(def); break; default: /* ?... shouldn't happen I guess */ ; } }
void print_progdef(definition *def) { switch (def->def_kind) { case DEF_PROGRAM: f_print(fout, "\n"); pprogramdef(def); break; case DEF_CONST: case DEF_TYPEDEF: case DEF_ENUM: case DEF_UNION: case DEF_STRUCT: break; } }
/* * Print the C-version of an xdr definition */ void print_datadef(definition * def) { if (Sflag) scan_print = 0; if ((def->def_kind != DEF_CONST) && (!IsRxgenDefinition(def))) { f_print(fout, "\n"); } switch (def->def_kind) { case DEF_CUSTOMIZED: case DEF_STRUCT: pstructdef(def); break; case DEF_UNION: puniondef(def); break; case DEF_ENUM: penumdef(def); break; case DEF_TYPEDEF: ptypedef(def); break; case DEF_PROGRAM: pprogramdef(def); break; case DEF_PROC: psprocdef(def); break; case DEF_CONST: pconstdef(def); break; default: break; } if (def->def_kind != DEF_PROGRAM && def->def_kind != DEF_CONST && (!IsRxgenDefinition(def))) { f_print(fout, "bool_t xdr_%s(XDR *xdrs, %s *objp);\n", def->def_name, def->def_name); } if (def->def_kind != DEF_CONST && (!IsRxgenDefinition(def))) { f_print(fout, "\n"); } if (Sflag) scan_print = 1; }