summaryrefslogtreecommitdiff
path: root/usr.bin/rpcgen/rpc_sample.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2001-07-18 22:26:01 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2001-07-18 22:26:01 +0000
commit2a73d8edb2be731bc3a885f71bc315e06a3c1598 (patch)
tree95857f8e7acaba4fdb9457173d6a6630b8f11536 /usr.bin/rpcgen/rpc_sample.c
parentdbf58eafcd9b0edb160c6680606b3907e1b50404 (diff)
Uhmm, nope, this broke everything
Diffstat (limited to 'usr.bin/rpcgen/rpc_sample.c')
-rw-r--r--usr.bin/rpcgen/rpc_sample.c24
1 files changed, 11 insertions, 13 deletions
diff --git a/usr.bin/rpcgen/rpc_sample.c b/usr.bin/rpcgen/rpc_sample.c
index dd90624de1d..37e47ae4d38 100644
--- a/usr.bin/rpcgen/rpc_sample.c
+++ b/usr.bin/rpcgen/rpc_sample.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rpc_sample.c,v 1.4 2001/07/17 02:23:59 pvalchev Exp $ */
+/* $OpenBSD: rpc_sample.c,v 1.5 2001/07/18 22:26:00 deraadt Exp $ */
/* $NetBSD: rpc_sample.c,v 1.2 1995/06/11 21:50:01 pk Exp $ */
/*
* Sun RPC is a product of Sun Microsystems, Inc. and is provided for
@@ -42,16 +42,15 @@ static char sccsid[] = "@(#)rpc_sample.c 1.1 90/08/30 (C) 1987 SMI";
#include <sys/cdefs.h>
#include <stdio.h>
#include <string.h>
-#include "rpc_scan.h"
#include "rpc_parse.h"
#include "rpc_util.h"
static char RQSTP[] = "rqstp";
void printarglist();
-static void write_sample_client __P((char *, version_list *));
-static void write_sample_server __P((definition *));
-static void return_type __P((proc_list *));
+static write_sample_client __P((char *, version_list *));
+static write_sample_server __P((definition *));
+static return_type __P((proc_list *));
void
write_sample_svc(def)
@@ -82,7 +81,7 @@ write_sample_clnt(def)
}
-static void
+static
write_sample_client(program_name, vp )
char* program_name;
version_list *vp;
@@ -165,7 +164,7 @@ write_sample_client(program_name, vp )
f_print(fout, "}\n");
}
-static void
+static
write_sample_server(def)
definition *def;
{
@@ -185,11 +184,11 @@ write_sample_server(def)
f_print(fout, "{\n");
f_print(fout, "\n\tstatic ");
- if(streq( proc->res_type, "void"))
- f_print(fout, "char*"); /* cannot have void type */
- else
+ if( !streq( proc->res_type, "void") )
return_type(proc);
- f_print(fout, " result;\n");
+ else
+ f_print(fout, "char*" ); /* cannot have void type */
+ f_print(fout, " result;\n", proc->res_type);
f_print(fout,
"\n\t/*\n\t * insert server code here\n\t */\n\n");
if( !streq( proc->res_type, "void") )
@@ -204,14 +203,13 @@ write_sample_server(def)
}
}
-static void
+static
return_type(plist)
proc_list *plist;
{
ptype( plist->res_prefix, plist->res_type, 1 );
}
-void
add_sample_msg()
{
f_print(fout, "/*\n");