f_print(fout, "\t\t(void)svc_sendreply(%s, xdr_void, (char *)NULL);\n", TRANSP); f_print(fout, "\t\treturn;\n\n");
f_print(fout, Cflag ? "\t\t(void) svc_sendreply(%s, (xdrproc_t) xdr_void, (char *)NULL);\n" : "\t\t(void) svc_sendreply(%s, xdr_void, (char *)NULL);\n", TRANSP); print_return("\t\t"); f_print(fout, "\n");
write_program(def, storage)	definition *def;	char *storage;{	version_list *vp;	proc_list *proc;	int filled;	for (vp = def->def.pr.versions; vp != NULL; vp = vp->next) {		f_print(fout, "\n");		if (storage != NULL) {			f_print(fout, "%s ", storage);		}		f_print(fout, "void\n");		pvname(def->def_name, vp->vers_num);		f_print(fout, "(%s, %s)\n", RQSTP, TRANSP);		f_print(fout, "	struct svc_req *%s;\n", RQSTP);		f_print(fout, "	SVCXPRT *%s;\n", TRANSP);		f_print(fout, "{\n");		filled = 0;		f_print(fout, "\tunion {\n");		for (proc = vp->procs; proc != NULL; proc = proc->next) {			if (streq(proc->arg_type, "void")) {				continue;			}			filled = 1;			f_print(fout, "\t\t");			ptype(proc->arg_prefix, proc->arg_type, 0);			pvname(proc->proc_name, vp->vers_num);			f_print(fout, "_arg;\n");		}		if (!filled) {			f_print(fout, "\t\tint fill;\n");		}		f_print(fout, "\t} %s;\n", ARG);		f_print(fout, "\tchar *%s;\n", RESULT);		f_print(fout, "\tbool_t (*xdr_%s)(), (*xdr_%s)();\n", ARG, RESULT);		f_print(fout, "\tchar *(*%s)();\n", ROUTINE);		f_print(fout, "\n");		f_print(fout, "\tswitch (%s->rq_proc) {\n", RQSTP);		if (!nullproc(vp->procs)) {			f_print(fout, "\tcase NULLPROC:\n"); 			f_print(fout, "\t\t(void)svc_sendreply(%s, xdr_void, (char *)NULL);\n", TRANSP);			f_print(fout, "\t\treturn;\n\n");		}		for (proc = vp->procs; proc != NULL; proc = proc->next) {			f_print(fout, "\tcase %s:\n", proc->proc_name);			f_print(fout, "\t\txdr_%s = xdr_%s;\n", ARG, 				stringfix(proc->arg_type));			f_print(fout, "\t\txdr_%s = xdr_%s;\n", RESULT, 				stringfix(proc->res_type));			f_print(fout, "\t\t%s = (char *(*)()) ", ROUTINE);			pvname(proc->proc_name, vp->vers_num);			f_print(fout, ";\n");			f_print(fout, "\t\tbreak;\n\n");		}		f_print(fout, "\tdefault:\n");		printerr("noproc", TRANSP);		f_print(fout, "\t\treturn;\n");		f_print(fout, "\t}\n"); 		f_print(fout, "\tbzero((char *)&%s, sizeof(%s));\n", ARG, ARG);		printif("getargs", TRANSP, "&", ARG);		printerr("decode", TRANSP);		f_print(fout, "\t\treturn;\n");		f_print(fout, "\t}\n");		f_print(fout, "\t%s = (*%s)(&%s, %s);\n", RESULT, ROUTINE, ARG,			RQSTP);		f_print(fout, 			"\tif (%s != NULL && !svc_sendreply(%s, xdr_%s, %s)) {\n",			RESULT, TRANSP, RESULT, RESULT);		printerr("systemerr", TRANSP);		f_print(fout, "\t}\n");		printif("freeargs", TRANSP, "&", ARG); 		f_print(fout, "\t\t(void)fprintf(stderr, \"unable to free arguments\\n\");\n");		f_print(fout, "\t\texit(1);\n");		f_print(fout, "\t}\n");		f_print(fout, "}\n\n");	}}