Module Name:    src
Committed By:   matt
Date:           Tue Mar 20 16:30:26 UTC 2012

Modified Files:
        src/lib/libc/yp: local.h xdryp.c yp_match.c yplib.c

Log Message:
Convert to use C89 prototypes.
Remove use of __P


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/lib/libc/yp/local.h
cvs rdiff -u -r1.31 -r1.32 src/lib/libc/yp/xdryp.c
cvs rdiff -u -r1.18 -r1.19 src/lib/libc/yp/yp_match.c
cvs rdiff -u -r1.44 -r1.45 src/lib/libc/yp/yplib.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/libc/yp/local.h
diff -u src/lib/libc/yp/local.h:1.3 src/lib/libc/yp/local.h:1.4
--- src/lib/libc/yp/local.h:1.3	Wed Oct 21 01:07:46 2009
+++ src/lib/libc/yp/local.h	Tue Mar 20 16:30:26 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: local.h,v 1.3 2009/10/21 01:07:46 snj Exp $	*/
+/*	$NetBSD: local.h,v 1.4 2012/03/20 16:30:26 matt Exp $	*/
 
 /*
  * Copyright (c) 1996 Christos Zoulas.  All rights reserved.
@@ -25,6 +25,6 @@
  */
 
 __BEGIN_DECLS
-void __yp_unbind __P((struct dom_binding *));
-int _yp_invalid_domain __P((const char *));
+void __yp_unbind(struct dom_binding *);
+int _yp_invalid_domain(const char *);
 __END_DECLS

Index: src/lib/libc/yp/xdryp.c
diff -u src/lib/libc/yp/xdryp.c:1.31 src/lib/libc/yp/xdryp.c:1.32
--- src/lib/libc/yp/xdryp.c:1.31	Tue Mar 13 21:13:49 2012
+++ src/lib/libc/yp/xdryp.c	Tue Mar 20 16:30:26 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: xdryp.c,v 1.31 2012/03/13 21:13:49 christos Exp $	*/
+/*	$NetBSD: xdryp.c,v 1.32 2012/03/20 16:30:26 matt Exp $	*/
 
 /*
  * Copyright (c) 1996 Jason R. Thorpe <[email protected]>.
@@ -61,7 +61,7 @@
 
 #include <sys/cdefs.h>
 #if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: xdryp.c,v 1.31 2012/03/13 21:13:49 christos Exp $");
+__RCSID("$NetBSD: xdryp.c,v 1.32 2012/03/20 16:30:26 matt Exp $");
 #endif
 
 /*
@@ -115,10 +115,10 @@ __weak_alias(xdr_ypresp_val,_xdr_ypresp_
 /*
  * Functions used only within this file.
  */
-static	bool_t xdr_ypbind_binding __P((XDR *, struct ypbind_binding *));
-static	bool_t xdr_ypbind_resptype __P((XDR *, enum ypbind_resptype *));
-static	bool_t xdr_ypstat __P((XDR *, enum ypbind_resptype *));
-static	bool_t xdr_ypmaplist_str __P((XDR *, char *));
+static	bool_t xdr_ypbind_binding(XDR *, struct ypbind_binding *);
+static	bool_t xdr_ypbind_resptype(XDR *, enum ypbind_resptype *);
+static	bool_t xdr_ypstat(XDR *, enum ypbind_resptype *);
+static	bool_t xdr_ypmaplist_str(XDR *, char *);
 
 __warn_references(xdr_domainname,
     "warning: this program uses xdr_domainname(), which is deprecated and buggy.")

Index: src/lib/libc/yp/yp_match.c
diff -u src/lib/libc/yp/yp_match.c:1.18 src/lib/libc/yp/yp_match.c:1.19
--- src/lib/libc/yp/yp_match.c:1.18	Fri Mar  2 17:27:49 2012
+++ src/lib/libc/yp/yp_match.c	Tue Mar 20 16:30:26 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: yp_match.c,v 1.18 2012/03/02 17:27:49 christos Exp $	 */
+/*	$NetBSD: yp_match.c,v 1.19 2012/03/20 16:30:26 matt Exp $	 */
 
 /*
  * Copyright (c) 1992, 1993 Theo de Raadt <[email protected]>
@@ -28,7 +28,7 @@
 
 #include <sys/cdefs.h>
 #if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: yp_match.c,v 1.18 2012/03/02 17:27:49 christos Exp $");
+__RCSID("$NetBSD: yp_match.c,v 1.19 2012/03/20 16:30:26 matt Exp $");
 #endif
 
 #include "namespace.h"
@@ -65,17 +65,12 @@ static struct ypmatch_ent {
 	time_t          	 expire_t;
 } *ypmc;
 
-static bool_t ypmatch_add __P((const char *, const char *, int, char *, int));
-static bool_t ypmatch_find __P((const char *, const char *, int, const char **,
-    int *));
+static bool_t ypmatch_add(const char *, const char *, int, char *, int);
+static bool_t ypmatch_find(const char *, const char *, int, const char **,
+    int *);
 
 static bool_t
-ypmatch_add(map, key, keylen, val, vallen)
-	const char     *map;
-	const char     *key;
-	int             keylen;
-	char           *val;
-	int             vallen;
+ypmatch_add(const char *map, const char *key, int keylen, char *val, int vallen)
 {
 	struct ypmatch_ent *ep;
 	time_t t;
@@ -138,12 +133,8 @@ ypmatch_add(map, key, keylen, val, valle
 }
 
 static bool_t
-ypmatch_find(map, key, keylen, val, vallen)
-	const char     *map;
-	const char     *key;
-	int             keylen;
-	const char    **val;
-	int            *vallen;
+ypmatch_find(const char *map, const char *key, int keylen, const char **val,
+	int *vallen)
 {
 	struct ypmatch_ent *ep;
 	time_t          t;
@@ -176,13 +167,8 @@ ypmatch_find(map, key, keylen, val, vall
 #endif
 
 int
-yp_match(indomain, inmap, inkey, inkeylen, outval, outvallen)
-	const char     *indomain;
-	const char     *inmap;
-	const char     *inkey;
-	int             inkeylen;
-	char          **outval;
-	int            *outvallen;
+yp_match(const char *indomain, const char *inmap, const char *inkey,
+	int inkeylen, char **outval, int *outvallen)
 {
 	struct dom_binding *ysd;
 	struct ypresp_val yprv;

Index: src/lib/libc/yp/yplib.c
diff -u src/lib/libc/yp/yplib.c:1.44 src/lib/libc/yp/yplib.c:1.45
--- src/lib/libc/yp/yplib.c:1.44	Fri Mar  2 17:27:49 2012
+++ src/lib/libc/yp/yplib.c	Tue Mar 20 16:30:26 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: yplib.c,v 1.44 2012/03/02 17:27:49 christos Exp $	 */
+/*	$NetBSD: yplib.c,v 1.45 2012/03/20 16:30:26 matt Exp $	 */
 
 /*
  * Copyright (c) 1992, 1993 Theo de Raadt <[email protected]>
@@ -28,7 +28,7 @@
 
 #include <sys/cdefs.h>
 #if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: yplib.c,v 1.44 2012/03/02 17:27:49 christos Exp $");
+__RCSID("$NetBSD: yplib.c,v 1.45 2012/03/20 16:30:26 matt Exp $");
 #endif
 
 #include "namespace.h"
@@ -86,7 +86,8 @@ static 	mutex_t			_ypmutex = MUTEX_INITI
 #endif
 
 int
-yp_setbindtries(int ntries) {
+yp_setbindtries(int ntries)
+{
 	int old_val = _yplib_bindtries;
 
 	if (ntries >= 0)
@@ -95,9 +96,7 @@ yp_setbindtries(int ntries) {
 }
 
 int
-_yp_dobind(dom, ypdb)
-	const char     *dom;
-	struct dom_binding **ypdb;
+_yp_dobind(const char *dom, struct dom_binding **ypdb)
 {
 	static int      pid = -1;
 	char            path[MAXPATHLEN];
@@ -281,8 +280,7 @@ gotit:
 }
 
 void
-__yp_unbind(ypb)
-	struct dom_binding *ypb;
+__yp_unbind(struct dom_binding *ypb)
 {
 
 	_DIAGASSERT(ypb != NULL);
@@ -293,8 +291,7 @@ __yp_unbind(ypb)
 }
 
 int
-yp_bind(dom)
-	const char     *dom;
+yp_bind(const char *dom)
 {
 	if (_yp_invalid_domain(dom))
 		return YPERR_BADARGS;
@@ -303,8 +300,7 @@ yp_bind(dom)
 }
 
 void
-yp_unbind(dom)
-	const char     *dom;
+yp_unbind(const char *dom)
 {
 	struct dom_binding *ypb, *ypbp;
 
@@ -328,8 +324,7 @@ yp_unbind(dom)
 }
 
 int
-yp_get_default_domain(domp)
-	char          **domp;
+yp_get_default_domain(char **domp)
 {
 	if (domp == NULL)
 		return YPERR_BADARGS;
@@ -342,8 +337,7 @@ yp_get_default_domain(domp)
 }
 
 int
-_yp_check(dom)
-	char          **dom;
+_yp_check(char **dom)
 {
 	char           *unused;
 	int 		good;
@@ -369,8 +363,7 @@ done:
  * returns non-zero if invalid
  */
 int
-_yp_invalid_domain(dom)
-	const char *dom;
+_yp_invalid_domain(const char *dom)
 {
 	if (dom == NULL || *dom == '\0')
 		return 1;

Reply via email to