f_print (fout, "\tchar *(*%s)(char *, struct svc_req *);\n", ROUTINE);
if (mtflag) f_print(fout, "\tbool_t (*%s)(char *, void *, struct svc_req *);\n", ROUTINE); else f_print (fout, "\tchar *(*%s)(char *, struct svc_req *);\n", ROUTINE);
write_program (const definition * def, const 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);      if (Cflag)	{	  f_print (fout, "(struct svc_req *%s, ", RQSTP);	  f_print (fout, "register SVCXPRT *%s)\n", TRANSP);	}      else	{	  f_print (fout, "(%s, %s)\n", RQSTP, TRANSP);	  f_print (fout, "	struct svc_req *%s;\n", RQSTP);	  f_print (fout, "	register 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 (proc->arg_num < 2)	    {			/* single argument */	      if (streq (proc->args.decls->decl.type,			 "void"))		{		  continue;		}	      filled = 1;	      f_print (fout, "\t\t");	      ptype (proc->args.decls->decl.prefix,		     proc->args.decls->decl.type, 0);	      pvname (proc->proc_name, vp->vers_num);	      f_print (fout, "_arg;\n");	    }	  else	    {	      filled = 1;	      f_print (fout, "\t\t%s", proc->args.argname);	      f_print (fout, " ");	      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);      if (Cflag)	{	  f_print (fout, "\txdrproc_t xdr_%s, xdr_%s;\n", ARG, RESULT);	  f_print (fout,		   "\tchar *(*%s)(char *, struct svc_req *);\n",		   ROUTINE);	}      else	{	  f_print (fout, "\tbool_t (*xdr_%s)(), (*xdr_%s)();\n", ARG, RESULT);	  f_print (fout, "\tchar *(*%s)();\n", ROUTINE);	}      f_print (fout, "\n");      if (timerflag)	f_print (fout, "\t_rpcsvcdirty = 1;\n");      f_print (fout, "\tswitch (%s->rq_proc) {\n", RQSTP);      if (!nullproc (vp->procs))	{	  f_print (fout, "\tcase NULLPROC:\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");	}      for (proc = vp->procs; proc != NULL; proc = proc->next)	{	  f_print (fout, "\tcase %s:\n", proc->proc_name);	  if (proc->arg_num < 2)	    {			/* single argument */	      p_xdrfunc (ARG, proc->args.decls->decl.type);	    }	  else	    {	      p_xdrfunc (ARG, proc->args.argname);	    }	  p_xdrfunc (RESULT, proc->res_type);	  if (Cflag)	    f_print (fout,		     "\t\t%s = (char *(*)(char *, struct svc_req *)) ",		     ROUTINE);	  else	    f_print (fout, "\t\t%s = (char *(*)()) ", ROUTINE);	  if (newstyle)	    {			/* new style: calls internal routine */	      f_print (fout, "_");	    }	  if (Cflag && !newstyle)	    pvname_svc (proc->proc_name, vp->vers_num);	  else	    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);      print_return ("\t\t");      f_print (fout, "\t}\n");      f_print (fout, "\t(void) memset((char *)&%s, 0, sizeof (%s));\n", ARG, ARG);      if (Cflag)	printif ("getargs", TRANSP, "(caddr_t) &", ARG);      else	printif ("getargs", TRANSP, "&", ARG);      printerr ("decode", TRANSP);      print_return ("\t\t");      f_print (fout, "\t}\n");      if (Cflag)	f_print (fout, "\t%s = (*%s)((char *)&%s, %s);\n",		 RESULT, ROUTINE, ARG, RQSTP);      else	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");      if (Cflag)	printif ("freeargs", TRANSP, "(caddr_t) &", ARG);      else	printif ("freeargs", TRANSP, "&", ARG);      (void) sprintf (_errbuf, "unable to free arguments");      print_err_message ("\t\t");      f_print (fout, "\t\texit(1);\n");      f_print (fout, "\t}\n");      print_return ("\t");      f_print (fout, "}\n");    }}