diff options
author | Peter Valchev <pvalchev@cvs.openbsd.org> | 2001-07-17 02:24:01 +0000 |
---|---|---|
committer | Peter Valchev <pvalchev@cvs.openbsd.org> | 2001-07-17 02:24:01 +0000 |
commit | f4e7ed46357090ce61bed511ee4cb53fcfa67522 (patch) | |
tree | 2c26f79ad6c1190ba713dbb517a160af1e7c8a04 /usr.bin/rpcgen/rpc_svcout.c | |
parent | fede51bc6df1cd1fce250efe151ecc1cb867f1d9 (diff) |
-Wall cleanup; ok deraadt
Diffstat (limited to 'usr.bin/rpcgen/rpc_svcout.c')
-rw-r--r-- | usr.bin/rpcgen/rpc_svcout.c | 67 |
1 files changed, 35 insertions, 32 deletions
diff --git a/usr.bin/rpcgen/rpc_svcout.c b/usr.bin/rpcgen/rpc_svcout.c index e127e2d5cf7..2b492cfd983 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.3 2001/01/11 19:24:24 deraadt Exp $ */ +/* $OpenBSD: rpc_svcout.c,v 1.4 2001/07/17 02:23:59 pvalchev 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 @@ -40,6 +40,7 @@ #include <sys/cdefs.h> #include <stdio.h> #include <string.h> +#include "rpc_scan.h" #include "rpc_parse.h" #include "rpc_util.h" @@ -51,22 +52,22 @@ static char ROUTINE[] = "local"; char _errbuf[256]; /* For all messages */ -void internal_proctype __P((proc_list *)); -static write_real_program __P((definition *)); -static write_program __P((definition *, char *)); -static printerr __P((char *, char *)); -static printif __P((char *, char *, char *, char *)); -static write_inetmost __P((char *)); -static print_return __P((char *)); -static print_pmapunset __P((char *)); -static print_err_message __P((char *)); -static write_timeout_func __P((void)); -static write_pm_most __P((char *, int)); -static write_caller_func __P((void)); -static write_rpc_svc_fg __P((char *, char *)); -static open_log_file __P((char *, char *)); - -static +static void internal_proctype __P((proc_list *)); +static void write_real_program __P((definition *)); +static void write_program __P((definition *, char *)); +static void printerr __P((char *, char *)); +static void printif __P((char *, char *, char *, char *)); +static void write_inetmost __P((char *)); +static void print_return __P((char *)); +static void print_pmapunset __P((char *)); +static void print_err_message __P((char *)); +static void write_timeout_func __P((void)); +static void write_pm_most __P((char *, int)); +static void write_caller_func __P((void)); +static void write_rpc_svc_fg __P((char *, char *)); +static void open_log_file __P((char *, char *)); + +static void p_xdrfunc( rname, typename ) char* rname; char* typename; @@ -78,7 +79,7 @@ char* typename; f_print(fout, "\t\txdr_%s = xdr_%s;\n", rname, stringfix(typename) ); } -void +static void internal_proctype(plist) proc_list *plist; { @@ -168,7 +169,7 @@ write_netid_register(transp) f_print(fout, "%s\t\texit(1);\n", sp); f_print(fout, "%s\t}\n", sp); f_print(fout, "%s\t%s = svc_tli_create(RPC_ANYFD, nconf, 0, 0, 0);\n", - sp, TRANSP, transp); + sp, TRANSP); f_print(fout, "%s\tif (%s == NULL) {\n", sp, TRANSP); (void) sprintf(_errbuf, "cannot create %s service.", transp); print_err_message(tmpbuf); @@ -290,7 +291,7 @@ write_programs(storage) which calls server's defintion of actual function (e.g. printmsg_1(...)). Unpacks single user argument of printmsg_1 to call-by-value format expected by printmsg_1. */ -static +static void write_real_program(def) definition *def; { @@ -345,7 +346,7 @@ write_real_program(def) } } -static +static void write_program(def, storage) definition *def; char *storage; @@ -488,7 +489,7 @@ write_program(def, storage) } } -static +static void printerr(err, transp) char *err; char *transp; @@ -496,7 +497,7 @@ printerr(err, transp) f_print(fout, "\t\tsvcerr_%s(%s);\n", err, transp); } -static +static void printif(proc, transp, prefix, arg) char *proc; char *transp; @@ -507,6 +508,7 @@ printif(proc, transp, prefix, arg) proc, transp, arg, prefix, arg); } +int nullproc(proc) proc_list *proc; { @@ -518,7 +520,7 @@ nullproc(proc) return (0); } -static +static void write_inetmost(infile) char *infile; { @@ -547,7 +549,7 @@ write_inetmost(infile) f_print(fout, "\t}\n"); } -static +static void print_return(space) char *space; { @@ -560,7 +562,7 @@ print_return(space) } } -static +static void print_pmapunset(space) char *space; { @@ -580,7 +582,7 @@ print_pmapunset(space) } } -static +static void print_err_message(space) char *space; { @@ -611,6 +613,7 @@ write_svc_aux( nomain ) * Write the _msgout function */ +void write_msg_out() { f_print(fout, "\n"); @@ -637,7 +640,7 @@ write_msg_out() /* * Write the timeout function */ -static +static void write_timeout_func() { if (!timerflag) @@ -667,7 +670,7 @@ write_timeout_func() f_print(fout, "}\n"); } -static +static void write_caller_func() /*EVAS*/ { #define P(s) f_print(fout, s); @@ -705,7 +708,7 @@ P("}\n"); /* * Write the most of port monitor support */ -static +static void write_pm_most(infile, netflag) char *infile; int netflag; @@ -792,7 +795,7 @@ write_pm_most(infile, netflag) /* * Support for backgrounding the server if self started. */ -static +static void write_rpc_svc_fg(infile, sp) char *infile; char *sp; @@ -843,7 +846,7 @@ write_rpc_svc_fg(infile, sp) open_log_file(infile, sp); } -static +static void open_log_file(infile, sp) char *infile; char *sp; |