summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/rpcgen/rpc_clntout.c7
-rw-r--r--usr.bin/rpcgen/rpc_main.c35
-rw-r--r--usr.bin/rpcgen/rpc_parse.c6
-rw-r--r--usr.bin/rpcgen/rpc_sample.c5
-rw-r--r--usr.bin/rpcgen/rpc_svcout.c8
-rw-r--r--usr.bin/rpcgen/rpc_util.c21
-rw-r--r--usr.bin/rpcgen/rpc_util.h6
7 files changed, 32 insertions, 56 deletions
diff --git a/usr.bin/rpcgen/rpc_clntout.c b/usr.bin/rpcgen/rpc_clntout.c
index 8a8e1d3f5bb..b6855ab3ff4 100644
--- a/usr.bin/rpcgen/rpc_clntout.c
+++ b/usr.bin/rpcgen/rpc_clntout.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rpc_clntout.c,v 1.11 2002/07/05 05:39:42 deraadt Exp $ */
+/* $OpenBSD: rpc_clntout.c,v 1.12 2003/07/09 03:35:21 deraadt Exp $ */
/* $NetBSD: rpc_clntout.c,v 1.4 1995/06/11 21:49:52 pk Exp $ */
/*
* Sun RPC is a product of Sun Microsystems, Inc. and is provided for
@@ -47,8 +47,6 @@ static char sccsid[] = "@(#)rpc_clntout.c 1.11 89/02/22 (C) 1987 SMI";
static void write_program(definition *);
static void printbody(proc_list *);
-extern void pdeclaration();
-
#define DEFAULT_TIMEOUT 25 /* in seconds */
static char RESULT[] = "clnt_res";
@@ -147,8 +145,7 @@ void printarglist(proc, addargname, addargtype)
}
static char *
-ampr(type)
- char *type;
+ampr(char *type)
{
if (isvectordef(type, REL_ALIAS)) {
return ("");
diff --git a/usr.bin/rpcgen/rpc_main.c b/usr.bin/rpcgen/rpc_main.c
index ac567b6bcb0..c4959e21988 100644
--- a/usr.bin/rpcgen/rpc_main.c
+++ b/usr.bin/rpcgen/rpc_main.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rpc_main.c,v 1.18 2003/04/14 19:59:36 deraadt Exp $ */
+/* $OpenBSD: rpc_main.c,v 1.19 2003/07/09 03:35:21 deraadt Exp $ */
/* $NetBSD: rpc_main.c,v 1.9 1996/02/19 11:12:43 pk Exp $ */
/*
* Sun RPC is a product of Sun Microsystems, Inc. and is provided for
@@ -32,7 +32,7 @@
#ifndef lint
static char sccsid[] = "@(#)rpc_main.c 1.30 89/03/30 (C) 1987 SMI";
-static char cvsid[] = "$OpenBSD: rpc_main.c,v 1.18 2003/04/14 19:59:36 deraadt Exp $";
+static char cvsid[] = "$OpenBSD: rpc_main.c,v 1.19 2003/07/09 03:35:21 deraadt Exp $";
#endif
/*
@@ -144,9 +144,7 @@ static void usage(void);
void c_initialize(void);
int
-main(argc, argv)
- int argc;
- char *argv[];
+main(int argc, char *argv[])
{
struct commandline cmd;
@@ -217,9 +215,7 @@ main(argc, argv)
* add extension to filename
*/
static char *
-extendfile(path, ext)
- char *path;
- char *ext;
+extendfile(char *path, char *ext)
{
char *file;
char *res;
@@ -249,9 +245,7 @@ extendfile(path, ext)
* Open output file with given extension
*/
static void
-open_output(infile, outfile)
- char *infile;
- char *outfile;
+open_output(char *infile, char *outfile)
{
if (outfile == NULL) {
@@ -274,7 +268,7 @@ open_output(infile, outfile)
}
static void
-add_warning()
+add_warning(void)
{
fprintf(fout, "/*\n");
fprintf(fout, " * Please do not edit this file.\n");
@@ -284,7 +278,7 @@ add_warning()
/* clear list of arguments */
static void
-clear_args()
+clear_args(void)
{
int i;
for (i = FIXEDARGS; i < ARGLISTLEN; i++)
@@ -294,7 +288,7 @@ clear_args()
/* make sure that a CPP exists */
static void
-find_cpp()
+find_cpp(void)
{
struct stat buf;
@@ -319,9 +313,7 @@ find_cpp()
* Open input file with given define for C-preprocessor
*/
static void
-open_input(infile, define)
- char *infile;
- char *define;
+open_input(char *infile, char *define)
{
int pd[2];
@@ -418,9 +410,7 @@ static char *valid_i_nettypes[] = {
};
static int
-check_nettype(name, list_to_check)
- char *name;
- char *list_to_check[];
+check_nettype(char *name, char *list_to_check[])
{
int i;
for (i = 0; list_to_check[i] != NULL; i++) {
@@ -494,9 +484,8 @@ char rpcgen_table_dcl[] = "struct rpcgen_table {\n\
};\n";
-char *
-generate_guard(pathname)
- char *pathname;
+static char *
+generate_guard(char *pathname)
{
char *filename, *guard, *tmp;
diff --git a/usr.bin/rpcgen/rpc_parse.c b/usr.bin/rpcgen/rpc_parse.c
index e6671c24f3b..60895c4bff0 100644
--- a/usr.bin/rpcgen/rpc_parse.c
+++ b/usr.bin/rpcgen/rpc_parse.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rpc_parse.c,v 1.13 2003/06/25 21:09:26 deraadt Exp $ */
+/* $OpenBSD: rpc_parse.c,v 1.14 2003/07/09 03:35:21 deraadt Exp $ */
/* $NetBSD: rpc_parse.c,v 1.5 1995/08/29 23:05:55 cgd Exp $ */
/*
* Sun RPC is a product of Sun Microsystems, Inc. and is provided for
@@ -376,9 +376,7 @@ static char *reserved_types[] = {
/* check that the given name is not one that would eventually result in
xdr routines that would conflict with internal XDR routines. */
static void
-check_type_name(name, new_type)
- int new_type;
- char *name;
+check_type_name(char *name, int new_type)
{
int i;
char tmp[100];
diff --git a/usr.bin/rpcgen/rpc_sample.c b/usr.bin/rpcgen/rpc_sample.c
index aded83167d5..11655aaea3f 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.13 2002/07/05 05:39:42 deraadt Exp $ */
+/* $OpenBSD: rpc_sample.c,v 1.14 2003/07/09 03:35:21 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
@@ -47,7 +47,6 @@ static char sccsid[] = "@(#)rpc_sample.c 1.1 90/08/30 (C) 1987 SMI";
static char RQSTP[] = "rqstp";
-void printarglist();
static void write_sample_client(char *, version_list *);
static void write_sample_server(definition *);
static void return_type(proc_list *);
@@ -210,7 +209,7 @@ return_type(plist)
}
void
-add_sample_msg()
+add_sample_msg(void)
{
fprintf(fout, "/*\n");
fprintf(fout, " * This is sample code generated by rpcgen.\n");
diff --git a/usr.bin/rpcgen/rpc_svcout.c b/usr.bin/rpcgen/rpc_svcout.c
index 0cc04696c4c..04a343c1aaa 100644
--- a/usr.bin/rpcgen/rpc_svcout.c
+++ b/usr.bin/rpcgen/rpc_svcout.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rpc_svcout.c,v 1.18 2003/07/06 21:26:00 deraadt Exp $ */
+/* $OpenBSD: rpc_svcout.c,v 1.19 2003/07/09 03:35:21 deraadt Exp $ */
/* $NetBSD: rpc_svcout.c,v 1.7 1995/06/24 14:59:59 pk Exp $ */
/*
* Sun RPC is a product of Sun Microsystems, Inc. and is provided for
@@ -64,14 +64,12 @@ static void write_timeout_func(void);
static void write_pm_most(char *, int);
static void write_caller_func(void);
static void write_rpc_svc_fg(char *, char *);
-static void write_msg_out();
+static void write_msg_out(void);
static void open_log_file(char *, char *);
int nullproc(proc_list *proc);
static void
-p_xdrfunc(rname, typename)
-char *rname;
-char *typename;
+p_xdrfunc(char *rname, char *typename)
{
if (Cflag)
fprintf(fout, "\t\txdr_%s = (xdrproc_t) xdr_%s;\n",
diff --git a/usr.bin/rpcgen/rpc_util.c b/usr.bin/rpcgen/rpc_util.c
index 66effcc278f..62cfab6c548 100644
--- a/usr.bin/rpcgen/rpc_util.c
+++ b/usr.bin/rpcgen/rpc_util.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rpc_util.c,v 1.11 2003/06/25 21:09:26 deraadt Exp $ */
+/* $OpenBSD: rpc_util.c,v 1.12 2003/07/09 03:35:21 deraadt Exp $ */
/* $NetBSD: rpc_util.c,v 1.6 1995/08/29 23:05:57 cgd Exp $ */
/*
* Sun RPC is a product of Sun Microsystems, Inc. and is provided for
@@ -131,17 +131,13 @@ storeval(lstp, val)
}
static int
-findit(def, type)
- definition *def;
- char *type;
+findit(definition *def, char *type)
{
return (streq(def->def_name, type));
}
static char *
-fixit(type, orig)
- char *type;
- char *orig;
+fixit(char *type, char *orig)
{
definition *def;
@@ -200,9 +196,7 @@ ptype(prefix, type, follow)
}
static int
-typedefed(def, type)
- definition *def;
- char *type;
+typedefed(definition *def, char *type)
{
if (def->def_kind != DEF_TYPEDEF || def->def.ty.old_prefix != NULL)
return (0);
@@ -306,7 +300,7 @@ record_open(file)
}
static char expectbuf[100];
-static char *toktostr();
+static char *toktostr(tok_kind);
/*
* error, token encountered was not the expected one
@@ -392,8 +386,7 @@ static token tokstrings[] = {
};
static char *
-toktostr(kind)
- tok_kind kind;
+toktostr(tok_kind kind)
{
token *sp;
@@ -403,7 +396,7 @@ toktostr(kind)
}
static void
-printbuf()
+printbuf(void)
{
char c;
int i;
diff --git a/usr.bin/rpcgen/rpc_util.h b/usr.bin/rpcgen/rpc_util.h
index b03a677fa4d..f3ced319f1e 100644
--- a/usr.bin/rpcgen/rpc_util.h
+++ b/usr.bin/rpcgen/rpc_util.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: rpc_util.h,v 1.12 2003/06/25 21:09:26 deraadt Exp $ */
+/* $OpenBSD: rpc_util.h,v 1.13 2003/07/09 03:35:21 deraadt Exp $ */
/* $NetBSD: rpc_util.h,v 1.3 1995/06/11 21:50:10 pk Exp $ */
/*
* Sun RPC is a product of Sun Microsystems, Inc. and is provided for
@@ -70,7 +70,7 @@ extern bas_type *typ_list_t;
* All the option flags
*/
extern int inetdflag;
-extern int pmflag;
+extern int pmflag;
extern int tblflag;
extern int logflag;
extern int newstyle;
@@ -157,3 +157,5 @@ void write_sample_clnt_main(void);
void add_type(int len, char *type);
+void pdeclaration(char *, declaration *, int, char *);
+void add_sample_msg(void);