aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--usr.bin/rpcgen/rpc_main.c14
-rw-r--r--usr.bin/rpcgen/rpc_svcout.c6
2 files changed, 13 insertions, 7 deletions
diff --git a/usr.bin/rpcgen/rpc_main.c b/usr.bin/rpcgen/rpc_main.c
index 981c94ddcb03..4d84aabb8034 100644
--- a/usr.bin/rpcgen/rpc_main.c
+++ b/usr.bin/rpcgen/rpc_main.c
@@ -29,7 +29,7 @@
*/
#ifndef lint
/*static char sccsid[] = "from: @(#)rpc_main.c 1.7 87/06/24 (C) 1987 SMI";*/
-static char rcsid[] = "$Id: rpc_main.c,v 1.1 1993/09/13 23:20:15 jtc Exp $";
+static char rcsid[] = "$Id: rpc_main.c,v 1.1 1994/08/07 18:01:31 wollman Exp $";
#endif
/*
@@ -109,16 +109,22 @@ main(argc, argv)
}
/*
- * add extension to filename
+ * strip path and add extension to filename
*/
static char *
-extendfile(file, ext)
- char *file;
+extendfile(path, ext)
+ char *path;
char *ext;
{
+ char *file;
char *res;
char *p;
+ if ((file = rindex(path, '/')) == NULL)
+ file = path;
+ else
+ file++;
+
res = alloc(strlen(file) + strlen(ext) + 1);
if (res == NULL) {
abort();
diff --git a/usr.bin/rpcgen/rpc_svcout.c b/usr.bin/rpcgen/rpc_svcout.c
index 7f375c56bfa6..15c91a7ae13c 100644
--- a/usr.bin/rpcgen/rpc_svcout.c
+++ b/usr.bin/rpcgen/rpc_svcout.c
@@ -29,7 +29,7 @@
*/
#ifndef lint
/*static char sccsid[] = "from: @(#)rpc_svcout.c 1.6 87/06/24 (C) 1987 SMI";*/
-static char rcsid[] = "$Id: rpc_svcout.c,v 1.1 1993/09/13 23:20:19 jtc Exp $";
+static char rcsid[] = "$Id: rpc_svcout.c,v 1.1 1994/08/07 18:01:36 wollman Exp $";
#endif
/*
@@ -222,7 +222,7 @@ write_program(def, storage)
f_print(fout, "\t}\n");
f_print(fout, "\tbzero((char *)&%s, sizeof(%s));\n", ARG, ARG);
- printif("getargs", TRANSP, "&", ARG);
+ printif("getargs", TRANSP, "(caddr_t)&", ARG);
printerr("decode", TRANSP);
f_print(fout, "\t\treturn;\n");
f_print(fout, "\t}\n");
@@ -235,7 +235,7 @@ write_program(def, storage)
printerr("systemerr", TRANSP);
f_print(fout, "\t}\n");
- printif("freeargs", TRANSP, "&", ARG);
+ printif("freeargs", TRANSP, "(caddr_t)&", 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");