diff options
author | charnier <charnier@FreeBSD.org> | 2002-07-21 12:55:04 +0000 |
---|---|---|
committer | charnier <charnier@FreeBSD.org> | 2002-07-21 12:55:04 +0000 |
commit | 26ad533edbc3e54e07a85fde8180be9cd25ed1fa (patch) | |
tree | b7b64d6f677d73a28bdc53eeb9c62b73bdfdcb45 /usr.bin/rpcgen/rpc_hout.c | |
parent | 9f90b488fd6314e317a25d522e46eb4f211794f3 (diff) | |
download | FreeBSD-src-26ad533edbc3e54e07a85fde8180be9cd25ed1fa.zip FreeBSD-src-26ad533edbc3e54e07a85fde8180be9cd25ed1fa.tar.gz |
Removal of spaces at EOL. Add __FBSDID. New function xmalloc, xrealloc,
xstrdup. There is a crash() function that do cleaning before exiting the
program. The new functions are wrappers that make use of crash() in case
of allocation failure. warn, exit -> err.
Reviewed by: alfred
Diffstat (limited to 'usr.bin/rpcgen/rpc_hout.c')
-rw-r--r-- | usr.bin/rpcgen/rpc_hout.c | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/usr.bin/rpcgen/rpc_hout.c b/usr.bin/rpcgen/rpc_hout.c index 648a95f..ad9baaa 100644 --- a/usr.bin/rpcgen/rpc_hout.c +++ b/usr.bin/rpcgen/rpc_hout.c @@ -1,4 +1,3 @@ -/* $FreeBSD$ */ /* * Sun RPC is a product of Sun Microsystems, Inc. and is provided for * unrestricted use provided that this legend is included on all tape @@ -6,23 +5,23 @@ * may copy or modify Sun RPC without charge, but are not authorized * to license or distribute it to anyone else except as part of a product or * program developed by the user. - * + * * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * + * * Sun RPC is provided with no support and without any obligation on the * part of Sun Microsystems, Inc. to assist in its use, correction, * modification or enhancement. - * + * * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC * OR ANY PART THEREOF. - * + * * In no event will Sun Microsystems, Inc. be liable for any lost revenue * or profits or other special, indirect and consequential damages, even if * Sun has been advised of the possibility of such damages. - * + * * Sun Microsystems, Inc. * 2550 Garcia Avenue * Mountain View, California 94043 @@ -30,12 +29,15 @@ #ident "@(#)rpc_hout.c 1.16 94/04/25 SMI" -#ifndef lint #if 0 +#ifndef lint static char sccsid[] = "@(#)rpc_hout.c 1.12 89/02/22 (C) 1987 SMI"; #endif #endif +#include <sys/cdefs.h> +__FBSDID("$FreeBSD$"); + /* * rpc_hout.c, Header file outputter for the RPC protocol compiler * Copyright (C) 1987, Sun Microsystems, Inc. @@ -126,7 +128,7 @@ int pointerp; { xdrfunc * xdrptr; - xdrptr = (xdrfunc *) malloc(sizeof (struct xdrfunc)); + xdrptr = XALLOC(struct xdrfunc); xdrptr->name = name; xdrptr->pointerp = pointerp; @@ -151,9 +153,9 @@ int i; { if (i == 2) { f_print(fout, "extern bool_t xdr_%s();\n", name); - return; + return; } - else + else f_print(fout, "extern bool_t xdr_%s(XDR *, %s%s);\n", name, name, pointerp ? "*" : ""); @@ -337,7 +339,7 @@ pprogramdef(def) puldefine(vers->vers_name, vers->vers_num); /* - * Print out 2 definitions, one for ANSI-C, another for + * Print out 2 definitions, one for ANSI-C, another for * old K & R C */ |