summaryrefslogtreecommitdiffstats
path: root/lib/libc/yp/yplib.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc/yp/yplib.c')
-rw-r--r--lib/libc/yp/yplib.c108
1 files changed, 33 insertions, 75 deletions
diff --git a/lib/libc/yp/yplib.c b/lib/libc/yp/yplib.c
index a762611..0a4bc7e 100644
--- a/lib/libc/yp/yplib.c
+++ b/lib/libc/yp/yplib.c
@@ -105,10 +105,9 @@ static char _yp_domain[MAXHOSTNAMELEN];
int _yplib_timeout = 10;
#ifdef YPMATCHCACHE
-static void ypmatch_cache_delete(ypdb, prev, cur)
- struct dom_binding *ypdb;
- struct ypmatch_ent *prev;
- struct ypmatch_ent *cur;
+static void
+ypmatch_cache_delete(struct dom_binding *ypdb, struct ypmatch_ent *prev,
+ struct ypmatch_ent *cur)
{
if (prev == NULL)
ypdb->cache = cur->ypc_next;
@@ -125,8 +124,8 @@ static void ypmatch_cache_delete(ypdb, prev, cur)
return;
}
-static void ypmatch_cache_flush(ypdb)
- struct dom_binding *ypdb;
+static void
+ypmatch_cache_flush(struct dom_binding *ypdb)
{
struct ypmatch_ent *n, *c = ypdb->cache;
@@ -139,8 +138,8 @@ static void ypmatch_cache_flush(ypdb)
return;
}
-static void ypmatch_cache_expire(ypdb)
- struct dom_binding *ypdb;
+static void
+ypmatch_cache_expire(struct dom_binding *ypdb)
{
struct ypmatch_ent *c = ypdb->cache;
struct ypmatch_ent *n, *p = NULL;
@@ -162,11 +161,9 @@ static void ypmatch_cache_expire(ypdb)
return;
}
-static void ypmatch_cache_insert(ypdb, map, key, val)
- struct dom_binding *ypdb;
- char *map;
- keydat *key;
- valdat *val;
+static void
+ypmatch_cache_insert(struct dom_binding *ypdb, char *map, keydat *key,
+ valdat *val)
{
struct ypmatch_ent *new;
@@ -235,11 +232,9 @@ static void ypmatch_cache_insert(ypdb, map, key, val)
return;
}
-static bool_t ypmatch_cache_lookup(ypdb, map, key, val)
- struct dom_binding *ypdb;
- char *map;
- keydat *key;
- valdat *val;
+static bool_t
+ypmatch_cache_lookup(struct dom_binding *ypdb, char *map, keydat *key,
+ valdat *val)
{
struct ypmatch_ent *c = ypdb->cache;
@@ -266,8 +261,7 @@ static bool_t ypmatch_cache_lookup(ypdb, map, key, val)
#endif
char *
-ypbinderr_string(incode)
- int incode;
+ypbinderr_string(int incode)
{
static char err[80];
switch (incode) {
@@ -285,9 +279,7 @@ ypbinderr_string(incode)
}
int
-_yp_dobind(dom, ypdb)
- char *dom;
- struct dom_binding **ypdb;
+_yp_dobind(char *dom, struct dom_binding **ypdb)
{
static pid_t pid = -1;
char path[MAXPATHLEN];
@@ -563,8 +555,7 @@ gotit:
}
static void
-_yp_unbind(ypb)
- struct dom_binding *ypb;
+_yp_unbind(struct dom_binding *ypb)
{
struct sockaddr_in check;
int checklen = sizeof(struct sockaddr_in);
@@ -594,15 +585,13 @@ _yp_unbind(ypb)
}
int
-yp_bind(dom)
- char *dom;
+yp_bind(char *dom)
{
return (_yp_dobind(dom, NULL));
}
void
-yp_unbind(dom)
- char *dom;
+yp_unbind(char *dom)
{
struct dom_binding *ypb, *ypbp;
@@ -623,13 +612,8 @@ yp_unbind(dom)
}
int
-yp_match(indomain, inmap, inkey, inkeylen, outval, outvallen)
- char *indomain;
- char *inmap;
- const char *inkey;
- int inkeylen;
- char **outval;
- int *outvallen;
+yp_match(char *indomain, char *inmap, const char *inkey, int inkeylen,
+ char **outval, int *outvallen)
{
struct dom_binding *ysd;
struct ypresp_val yprv;
@@ -701,8 +685,7 @@ again:
}
int
-yp_get_default_domain(domp)
-char **domp;
+yp_get_default_domain(char **domp)
{
*domp = NULL;
if (_yp_domain[0] == '\0')
@@ -713,13 +696,8 @@ char **domp;
}
int
-yp_first(indomain, inmap, outkey, outkeylen, outval, outvallen)
- char *indomain;
- char *inmap;
- char **outkey;
- int *outkeylen;
- char **outval;
- int *outvallen;
+yp_first(char *indomain, char *inmap, char **outkey, int *outkeylen,
+ char **outval, int *outvallen)
{
struct ypresp_key_val yprkv;
struct ypreq_nokey yprnk;
@@ -770,15 +748,8 @@ again:
}
int
-yp_next(indomain, inmap, inkey, inkeylen, outkey, outkeylen, outval, outvallen)
- char *indomain;
- char *inmap;
- char *inkey;
- int inkeylen;
- char **outkey;
- int *outkeylen;
- char **outval;
- int *outvallen;
+yp_next(char *indomain, char *inmap, char *inkey, int inkeylen,
+ char **outkey, int *outkeylen, char **outval, int *outvallen)
{
struct ypresp_key_val yprkv;
struct ypreq_key yprk;
@@ -832,10 +803,7 @@ again:
}
int
-yp_all(indomain, inmap, incallback)
- char *indomain;
- char *inmap;
- struct ypall_callback *incallback;
+yp_all(char *indomain, char *inmap, struct ypall_callback *incallback)
{
struct ypreq_nokey yprnk;
struct dom_binding *ysd;
@@ -893,10 +861,7 @@ again:
}
int
-yp_order(indomain, inmap, outorder)
- char *indomain;
- char *inmap;
- int *outorder;
+yp_order(char *indomain, char *inmap, int *outorder)
{
struct dom_binding *ysd;
struct ypresp_order ypro;
@@ -948,10 +913,7 @@ again:
}
int
-yp_master(indomain, inmap, outname)
- char *indomain;
- char *inmap;
- char **outname;
+yp_master(char *indomain, char *inmap, char **outname)
{
struct dom_binding *ysd;
struct ypresp_master yprm;
@@ -991,10 +953,9 @@ again:
xdr_free(xdr_ypresp_master, (char *)&yprm);
return (r);
}
+
int
-yp_maplist(indomain, outmaplist)
- char *indomain;
- struct ypmaplist **outmaplist;
+yp_maplist(char *indomain, struct ypmaplist **outmaplist)
{
struct dom_binding *ysd;
struct ypresp_maplist ypml;
@@ -1031,8 +992,7 @@ again:
}
char *
-yperr_string(incode)
- int incode;
+yperr_string(int incode)
{
static char err[80];
@@ -1077,8 +1037,7 @@ yperr_string(incode)
}
int
-ypprot_err(incode)
- unsigned int incode;
+ypprot_err(unsigned int incode)
{
switch (incode) {
case YP_TRUE:
@@ -1108,8 +1067,7 @@ ypprot_err(incode)
}
int
-_yp_check(dom)
- char **dom;
+_yp_check(char **dom)
{
char *unused;
OpenPOWER on IntegriCloud