Print this page
rpcgen should only produce ANSI code

*** 18,27 **** --- 18,29 ---- * * 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,98 **** 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"); --- 87,97 ----
*** 220,233 **** 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) { --- 219,229 ----
*** 256,276 **** } /* 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"); --- 252,264 ----
*** 300,314 **** 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"); --- 288,298 ----