=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/rpcgen/rpc_hout.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- src/usr.bin/rpcgen/rpc_hout.c 1997/07/25 21:05:39 1.4 +++ src/usr.bin/rpcgen/rpc_hout.c 2001/07/17 02:23:59 1.5 @@ -1,4 +1,4 @@ -/* $OpenBSD: rpc_hout.c,v 1.4 1997/07/25 21:05:39 mickey Exp $ */ +/* $OpenBSD: rpc_hout.c,v 1.5 2001/07/17 02:23:59 pvalchev Exp $ */ /* $NetBSD: rpc_hout.c,v 1.4 1995/06/11 21:49:55 pk Exp $ */ /* * Sun RPC is a product of Sun Microsystems, Inc. and is provided for @@ -43,18 +43,18 @@ #include "rpc_parse.h" #include "rpc_util.h" -static pconstdef __P((definition *)); -static pargdef __P((definition *)); -static pstructdef __P((definition *)); -static puniondef __P((definition *)); -static pprogramdef __P((definition *)); -static penumdef __P((definition *)); -static ptypedef __P((definition *)); -static pdefine __P((char *, char *)); -static puldefine __P((char *, char *)); -static define_printed __P((proc_list *, version_list *)); -static undefined2 __P((char *, char *)); -static parglist __P((proc_list *, char *)); +static void pconstdef __P((definition *)); +static void pargdef __P((definition *)); +static void pstructdef __P((definition *)); +static void puniondef __P((definition *)); +static void pprogramdef __P((definition *)); +static void penumdef __P((definition *)); +static void ptypedef __P((definition *)); +static void pdefine __P((char *, char *)); +static void puldefine __P((char *, char *)); +static int define_printed __P((proc_list *, version_list *)); +static int undefined2 __P((char *, char *)); +static void parglist __P((proc_list *, char *)); /* * Print the C-version of an xdr definition @@ -108,12 +108,19 @@ f_print(fout, "\n"); pprogramdef(def); break; - } + case DEF_CONST: + case DEF_STRUCT: + case DEF_UNION: + case DEF_ENUM: + case DEF_TYPEDEF: + break; + } } +void pxdrfuncdecl( name, pointerp ) -char* name; -int pointerp; + char* name; + int pointerp; { f_print(fout,"#ifdef __cplusplus\n"); @@ -130,7 +137,7 @@ } -static +static void pconstdef(def) definition *def; { @@ -140,7 +147,7 @@ /* print out the definitions for the arguments of functions in the header file */ -static +static void pargdef(def) definition *def; { @@ -173,7 +180,7 @@ } -static +static void pstructdef(def) definition *def; { @@ -188,7 +195,7 @@ f_print(fout, "typedef struct %s %s;\n", name, name); } -static +static void puniondef(def) definition *def; { @@ -217,7 +224,7 @@ f_print(fout, "typedef struct %s %s;\n", name, name); } -static +static void pdefine(name, num) char *name; char *num; @@ -225,7 +232,7 @@ f_print(fout, "#define %s %s\n", name, num); } -static +static void puldefine(name, num) char *name; char *num; @@ -233,7 +240,7 @@ f_print(fout, "#define %s ((u_long)%s)\n", name, num); } -static +static int define_printed(stop, start) proc_list *stop; version_list *start; @@ -254,7 +261,7 @@ /* NOTREACHED */ } -static +static void pprogramdef(def) definition *def; { @@ -309,6 +316,7 @@ } } +void pprocdef(proc, vp, addargtype, server_p,mode) proc_list *proc; version_list *vp; @@ -335,7 +343,7 @@ /* print out argument list of procedure */ -static +static void parglist(proc, addargtype) proc_list *proc; char* addargtype; @@ -360,7 +368,7 @@ f_print(fout, "%s);\n", addargtype); } -static +static void penumdef(def) definition *def; { @@ -392,7 +400,7 @@ f_print(fout, "typedef enum %s %s;\n", name, name); } -static +static void ptypedef(def) definition *def; { @@ -439,6 +447,7 @@ } } +void pdeclaration(name, dec, tab, separator) char *name; declaration *dec; @@ -496,7 +505,7 @@ f_print(fout, separator ); } -static +static int undefined2(type, stop) char *type; char *stop;