=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/rpcgen/rpc_tblout.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- src/usr.bin/rpcgen/rpc_tblout.c 2001/07/18 22:26:00 1.4 +++ src/usr.bin/rpcgen/rpc_tblout.c 2001/11/24 19:17:47 1.5 @@ -1,4 +1,4 @@ -/* $OpenBSD: rpc_tblout.c,v 1.4 2001/07/18 22:26:00 deraadt Exp $ */ +/* $OpenBSD: rpc_tblout.c,v 1.5 2001/11/24 19:17:47 deraadt Exp $ */ /* $NetBSD: rpc_tblout.c,v 1.3 1995/06/24 15:00:15 pk Exp $ */ /* * Sun RPC is a product of Sun Microsystems, Inc. and is provided for @@ -53,30 +53,29 @@ static char tbl_end[] = "};\n"; static char null_entry[] = "\n\t(char *(*)())0,\n\ - \t(xdrproc_t) xdr_void,\t\t\t0,\n\ - \t(xdrproc_t) xdr_void,\t\t\t0,\n"; +\t(xdrproc_t) xdr_void,\t\t\t0,\n\ +\t(xdrproc_t) xdr_void,\t\t\t0,\n"; static char tbl_nproc[] = "int %s_nproc =\n\tsizeof(%s_table)/sizeof(%s_table[0]);\n\n"; -static write_table __P((definition *)); -static printit __P((char *, char *)); +static void write_table __P((definition *)); +static void printit __P((char *, char *)); void write_tables() { - list *l; definition *def; + list *l; f_print(fout, "\n"); for (l = defined; l != NULL; l = l->next) { def = (definition *) l->val; - if (def->def_kind == DEF_PROGRAM) { + if (def->def_kind == DEF_PROGRAM) write_table(def); - } } } -static +static void write_table(def) definition *def; { @@ -104,10 +103,10 @@ current = atoi(proc->proc_num); if (current != expected++) { f_print(fout, - "\n/*\n * WARNING: table out of order\n */\n"); + "\n/*\n * WARNING: table out of order\n */\n"); if (warning == 0) { f_print(stderr, - "WARNING %s table is out of order\n", + "WARNING %s table is out of order\n", progvers); warning = 1; nonfatalerrors = 1; @@ -117,22 +116,22 @@ f_print(fout, "\n\t(char *(*)())RPCGEN_ACTION("); /* routine to invoke */ - if ( !newstyle) - pvname_svc(proc->proc_name, vp->vers_num); + if (!newstyle) + pvname_svc(proc->proc_name, vp->vers_num); else { - if( newstyle ) - f_print( fout, "_"); /* calls internal func */ - pvname(proc->proc_name, vp->vers_num); + if (newstyle) + f_print(fout, "_"); /* calls internal func */ + pvname(proc->proc_name, vp->vers_num); } f_print(fout, "),\n"); /* argument info */ - if( proc->arg_num > 1 ) - printit((char*) NULL, proc->args.argname ); + if (proc->arg_num > 1) + printit((char*) NULL, proc->args.argname); else - /* do we have to do something special for newstyle */ - printit( proc->args.decls->decl.prefix, - proc->args.decls->decl.type ); + /* do we have to do something special for newstyle */ + printit(proc->args.decls->decl.prefix, + proc->args.decls->decl.type); /* result info */ printit(proc->res_prefix, proc->res_type); } @@ -143,15 +142,13 @@ } } -static +static void printit(prefix, type) char *prefix; char *type; { - int len; - int tabs; + int len, tabs; - len = fprintf(fout, "\txdr_%s,", stringfix(type)); /* account for leading tab expansion */ len += TABSIZE - 1; @@ -162,7 +159,7 @@ if (streq(type, "void")) { f_print(fout, "0"); } else { - f_print(fout, "sizeof ( "); + f_print(fout, "sizeof ("); /* XXX: should "follow" be 1 ??? */ ptype(prefix, type, 0); f_print(fout, ")");