write_real_program (definition * def)
write_real_program (const definition * def)
write_real_program (definition * def){  version_list *vp;  proc_list *proc;  decl_list *l;  if (!newstyle)    return;			/* not needed for old style */  for (vp = def->def.pr.versions; vp != NULL; vp = vp->next)    {      for (proc = vp->procs; proc != NULL; proc = proc->next)	{	  f_print (fout, "\n");	  internal_proctype (proc);	  f_print (fout, "\n_");	  pvname (proc->proc_name, vp->vers_num);	  if (Cflag)	    {	      f_print (fout, "(");	      /* arg name */	      if (proc->arg_num > 1)		f_print (fout, proc->args.argname);	      else		ptype (proc->args.decls->decl.prefix,		       proc->args.decls->decl.type, 0);	      f_print (fout, " *argp, struct svc_req *%s)\n",		       RQSTP);	    }	  else	    {	      f_print (fout, "(argp, %s)\n", RQSTP);	      /* arg name */	      if (proc->arg_num > 1)		f_print (fout, "\t%s *argp;\n", proc->args.argname);	      else		{		  f_print (fout, "\t");		  ptype (proc->args.decls->decl.prefix,			 proc->args.decls->decl.type, 0);		  f_print (fout, " *argp;\n");		}	      f_print (fout, "	struct svc_req *%s;\n", RQSTP);	    }	  f_print (fout, "{\n");	  f_print (fout, "\treturn(");	  if (Cflag)	    pvname_svc (proc->proc_name, vp->vers_num);	  else	    pvname (proc->proc_name, vp->vers_num);	  f_print (fout, "(");	  if (proc->arg_num < 2)	    {			/* single argument */	      if (!streq (proc->args.decls->decl.type, "void"))		f_print (fout, "*argp, ");	/* non-void */	    }	  else	    {	      for (l = proc->args.decls; l != NULL; l = l->next)		f_print (fout, "argp->%s, ", l->decl.name);	    }	  f_print (fout, "%s));\n}\n", RQSTP);	}    }}