Print this page
rpcgen should only produce ANSI code

@@ -18,10 +18,12 @@
  *
  * CDDL HEADER END
  */
 
 /*
+ * Copyright 2014 Garrett D'Amore <garrett@damore.org>
+ *
  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 /* Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T */
 /* All Rights Reserved */

@@ -85,14 +87,11 @@
         int i;
         decl_list *l;
 
         f_print(fout, "\n\nvoid\n");
         pvname(program_name, vp->vers_num);
-        if (Cflag)
                 f_print(fout, "(char *host)\n{\n");
-        else
-                f_print(fout, "(host)\n\tchar *host;\n{\n");
         f_print(fout, "\tCLIENT *clnt;\n");
 
         i = 0;
         for (proc = vp->procs; proc != NULL; proc = proc->next) {
                 f_print(fout, "\t");

@@ -220,14 +219,11 @@
                                 return_type(proc);
                                 f_print(fout, "*\n");
                         } else {
                                 f_print(fout, "bool_t\n");
                         }
-                        if (Cflag || mtflag)
                                 pvname_svc(proc->proc_name, vp->vers_num);
-                        else
-                                pvname(proc->proc_name, vp->vers_num);
                         printarglist(proc, "result", RQSTP, "struct svc_req *");
 
                         f_print(fout, "{\n");
 
                         if (!mtflag) {

@@ -256,21 +252,13 @@
                 }
                 /* put in sample freeing routine */
                 if (mtflag) {
                         f_print(fout, "\nint\n");
                         pvname(def->def_name, vp->vers_num);
-                        if (Cflag)
                                 f_print(fout, "_freeresult(SVCXPRT *transp,"
                                     " xdrproc_t xdr_result,"
                                     " caddr_t result)\n");
-                        else {
-                                f_print(fout, "_freeresult(transp, xdr_result,"
-                                    " result)\n");
-                                f_print(fout, "\tSVCXPRT *transp;\n");
-                                f_print(fout, "\txdrproc_t xdr_result;\n");
-                                f_print(fout, "\tcaddr_t result;\n");
-                        }
                         f_print(fout, "{\n"
                             "\t(void) xdr_free(xdr_result, result);\n"
                             "\n\t/*\n\t * Insert additional freeing"
                             " code here, if needed\n\t */\n"
                             "\n\n\treturn (TRUE);\n}\n");

@@ -300,15 +288,11 @@
         list *l;
         definition *def;
         version_list *vp;
 
         f_print(fout, "\n\n");
-        if (Cflag)
                 f_print(fout, "int\nmain(int argc, char *argv[])\n{\n");
-        else
-                f_print(fout, "int\nmain(argc, argv)\n\tint argc;\n"
-                    "\tchar *argv[];\n{\n");
 
         f_print(fout, "\tchar *host;");
         f_print(fout, "\n\n\tif (argc < 2) {");
         f_print(fout, "\n\t\tprintf(\"usage:  %%s server_host\\n\","
             " argv[0]);\n");