getrpcent.c (8870) | getrpcent.c (11666) |
---|---|
1/* 2 * Sun RPC is a product of Sun Microsystems, Inc. and is provided for 3 * unrestricted use provided that this legend is included on all tape 4 * media and as a part of the software program in whole or part. Users 5 * may copy or modify Sun RPC without charge, but are not authorized 6 * to license or distribute it to anyone else except as part of a product or 7 * program developed by the user or with the express written consent of 8 * Sun Microsystems, Inc. --- 16 unchanged lines hidden (view full) --- 25 * 26 * Sun Microsystems, Inc. 27 * 2550 Garcia Avenue 28 * Mountain View, California 94043 29 */ 30 31#if defined(LIBC_SCCS) && !defined(lint) 32/*static char *sccsid = "from: @(#)getrpcent.c 1.14 91/03/11 Copyr 1984 Sun Micro";*/ | 1/* 2 * Sun RPC is a product of Sun Microsystems, Inc. and is provided for 3 * unrestricted use provided that this legend is included on all tape 4 * media and as a part of the software program in whole or part. Users 5 * may copy or modify Sun RPC without charge, but are not authorized 6 * to license or distribute it to anyone else except as part of a product or 7 * program developed by the user or with the express written consent of 8 * Sun Microsystems, Inc. --- 16 unchanged lines hidden (view full) --- 25 * 26 * Sun Microsystems, Inc. 27 * 2550 Garcia Avenue 28 * Mountain View, California 94043 29 */ 30 31#if defined(LIBC_SCCS) && !defined(lint) 32/*static char *sccsid = "from: @(#)getrpcent.c 1.14 91/03/11 Copyr 1984 Sun Micro";*/ |
33static char *rcsid = "$Id: getrpcent.c,v 1.1 1994/08/07 18:35:51 wollman Exp $"; | 33static char *rcsid = "$Id: getrpcent.c,v 1.2 1995/05/30 05:41:21 rgrimes Exp $"; |
34#endif 35 36/* 37 * Copyright (c) 1984 by Sun Microsystems, Inc. 38 */ 39 40#include <stdio.h> | 34#endif 35 36/* 37 * Copyright (c) 1984 by Sun Microsystems, Inc. 38 */ 39 40#include <stdio.h> |
41#include <stdlib.h> |
|
41#include <sys/types.h> 42#include <string.h> 43#include <rpc/rpc.h> 44#ifdef YP 45#include <rpcsvc/yp_prot.h> 46#include <rpcsvc/ypclnt.h> 47#endif 48 --- 151 unchanged lines hidden (view full) --- 200 201struct rpcent * 202getrpcent() 203{ 204 struct rpcent *hp; 205 int reason; 206 register struct rpcdata *d = _rpcdata(); 207#ifdef YP | 42#include <sys/types.h> 43#include <string.h> 44#include <rpc/rpc.h> 45#ifdef YP 46#include <rpcsvc/yp_prot.h> 47#include <rpcsvc/ypclnt.h> 48#endif 49 --- 151 unchanged lines hidden (view full) --- 201 202struct rpcent * 203getrpcent() 204{ 205 struct rpcent *hp; 206 int reason; 207 register struct rpcdata *d = _rpcdata(); 208#ifdef YP |
208 char *key = NULL, *val = NULL; 209 int keylen, vallen; | 209 char *val = NULL; 210 int vallen; |
210#endif 211 212 if (d == 0) 213 return(NULL); 214#ifdef YP 215 if (!__yp_nomap && _yp_check(&d->domain)) { 216 if (d->current == NULL && d->currentlen == 0) { 217 reason = yp_first(d->domain, "rpc.bynumber", --- 81 unchanged lines hidden --- | 211#endif 212 213 if (d == 0) 214 return(NULL); 215#ifdef YP 216 if (!__yp_nomap && _yp_check(&d->domain)) { 217 if (d->current == NULL && d->currentlen == 0) { 218 reason = yp_first(d->domain, "rpc.bynumber", --- 81 unchanged lines hidden --- |