Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.sbin/ypserv/yppush ANSIfy, de-__P(), and remove unused S...



details:   https://anonhg.NetBSD.org/src/rev/fa64fa1f34c4
branches:  trunk
changeset: 533638:fa64fa1f34c4
user:      wiz <wiz%NetBSD.org@localhost>
date:      Sat Jul 06 00:46:12 2002 +0000

description:
ANSIfy, de-__P(), and remove unused SIG_PF define.

diffstat:

 usr.sbin/ypserv/yppush/yppush.c      |  30 ++++++++++++------------------
 usr.sbin/ypserv/yppush/yppush.h      |  14 +++++++-------
 usr.sbin/ypserv/yppush/yppush_err.c  |   7 +++----
 usr.sbin/ypserv/yppush/yppush_proc.c |  12 ++++--------
 usr.sbin/ypserv/yppush/yppush_svc.c  |  19 ++++++-------------
 5 files changed, 32 insertions(+), 50 deletions(-)

diffs (236 lines):

diff -r 458cd80a7345 -r fa64fa1f34c4 usr.sbin/ypserv/yppush/yppush.c
--- a/usr.sbin/ypserv/yppush/yppush.c   Sat Jul 06 00:42:27 2002 +0000
+++ b/usr.sbin/ypserv/yppush/yppush.c   Sat Jul 06 00:46:12 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: yppush.c,v 1.17 2001/02/19 23:22:52 cgd Exp $  */
+/*     $NetBSD: yppush.c,v 1.18 2002/07/06 00:46:12 wiz Exp $  */
 
 /*
  *
@@ -93,11 +93,11 @@
  * prototypes
  */
 
-int    main __P((int, char *[]));
-int    pushit __P((int, char *, int, char *, int, char *));
-void   push __P((char *, int, struct yppush_info *));
-void   _svc_run __P((void));
-void   usage __P((void));
+int    main(int, char *[]);
+int    pushit(int, char *, int, char *, int, char *);
+void   push(char *, int, struct yppush_info *);
+void   _svc_run(void);
+void   usage(void);
 
 
 /*
@@ -105,9 +105,7 @@
  */
 
 int
-main(argc, argv)
-       int     argc;
-       char   *argv[];
+main(int argc, char *argv[])
 
 {
        char   *targhost = NULL;
@@ -285,7 +283,7 @@
  * usage: print usage and exit
  */
 void
-usage()
+usage(void)
 {
        fprintf(stderr, "usage: %s [-d domain] [-h host] [-v] map\n",
            getprogname());
@@ -297,9 +295,8 @@
  * the key/value pairs are from the ypservers map.
  */
 int
-pushit(instatus, inkey, inkeylen, inval, invallen, indata)
-       int     instatus, inkeylen, invallen;
-       char   *inkey, *inval, *indata;
+pushit(int instatus, char *inkey, int inkeylen, char *inval,
+       int invallen, char *indata)
 {
        struct yppush_info *ypi = (struct yppush_info *) indata;
 
@@ -311,10 +308,7 @@
  * push: push a specific map on a specific host
  */
 void
-push(host, hostlen, ypi)
-       char   *host;
-       int     hostlen;
-       struct yppush_info *ypi;
+push(char *host, int hostlen, struct yppush_info *ypi)
 {
        char    target[YPMAXPEER];
        CLIENT *ypserv;
@@ -434,7 +428,7 @@
  * to await the reply from ypxfr.
  */
 void
-_svc_run()
+_svc_run(void)
 {
        fd_set  readfds;
        struct timeval tv;
diff -r 458cd80a7345 -r fa64fa1f34c4 usr.sbin/ypserv/yppush/yppush.h
--- a/usr.sbin/ypserv/yppush/yppush.h   Sat Jul 06 00:42:27 2002 +0000
+++ b/usr.sbin/ypserv/yppush/yppush.h   Sat Jul 06 00:46:12 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: yppush.h,v 1.1.1.1 1996/08/09 10:15:01 thorpej Exp $   */
+/*     $NetBSD: yppush.h,v 1.2 2002/07/06 00:46:12 wiz Exp $   */
 
 /*
  * Copyright (c) 1996 Mats O Jansson <moj%stacken.kth.se@localhost>
@@ -44,11 +44,11 @@
 #define YPPUSHPROC_XFRRESP ((unsigned long)1)
 #endif
 
-void   *yppushproc_null_1 __P((void *, CLIENT *));
-void   *yppushproc_null_1_svc __P((void *, struct svc_req *));
-void   *yppushproc_xfrresp_1 __P((struct yppushresp_xfr *, CLIENT *));
-void   *yppushproc_xfrresp_1_svc __P((void *, struct svc_req *));
+void   *yppushproc_null_1(void *, CLIENT *);
+void   *yppushproc_null_1_svc(void *, struct svc_req *);
+void   *yppushproc_xfrresp_1(struct yppushresp_xfr *, CLIENT *);
+void   *yppushproc_xfrresp_1_svc(void *, struct svc_req *);
 
-void   yppush_xfrrespprog_1 __P((struct svc_req *, SVCXPRT *));
+void   yppush_xfrrespprog_1(struct svc_req *, SVCXPRT *);
 
-char   *yppush_err_string __P((int));
+char   *yppush_err_string(int);
diff -r 458cd80a7345 -r fa64fa1f34c4 usr.sbin/ypserv/yppush/yppush_err.c
--- a/usr.sbin/ypserv/yppush/yppush_err.c       Sat Jul 06 00:42:27 2002 +0000
+++ b/usr.sbin/ypserv/yppush/yppush_err.c       Sat Jul 06 00:46:12 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: yppush_err.c,v 1.3 1997/10/13 07:38:10 lukem Exp $     */
+/*     $NetBSD: yppush_err.c,v 1.4 2002/07/06 00:46:12 wiz Exp $       */
 
 /*
  * Copyright (c) 1996 Mats O Jansson <moj%stacken.kth.se@localhost>
@@ -33,7 +33,7 @@
 
 #include <sys/cdefs.h>
 #ifndef lint
-__RCSID("$NetBSD: yppush_err.c,v 1.3 1997/10/13 07:38:10 lukem Exp $");
+__RCSID("$NetBSD: yppush_err.c,v 1.4 2002/07/06 00:46:12 wiz Exp $");
 #endif
 
 #include <sys/types.h>
@@ -48,8 +48,7 @@
 #include "yppush.h"
 
 char *
-yppush_err_string(y)
-       int y;
+yppush_err_string(int y)
 {
        static char errstr[64];
 
diff -r 458cd80a7345 -r fa64fa1f34c4 usr.sbin/ypserv/yppush/yppush_proc.c
--- a/usr.sbin/ypserv/yppush/yppush_proc.c      Sat Jul 06 00:42:27 2002 +0000
+++ b/usr.sbin/ypserv/yppush/yppush_proc.c      Sat Jul 06 00:46:12 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: yppush_proc.c,v 1.4 1997/11/18 07:01:50 lukem Exp $    */
+/*     $NetBSD: yppush_proc.c,v 1.5 2002/07/06 00:46:12 wiz Exp $      */
 
 /*
  * Copyright (c) 1996 Mats O Jansson <moj%stacken.kth.se@localhost>
@@ -33,7 +33,7 @@
 
 #include <sys/cdefs.h>
 #ifndef lint
-__RCSID("$NetBSD: yppush_proc.c,v 1.4 1997/11/18 07:01:50 lukem Exp $");
+__RCSID("$NetBSD: yppush_proc.c,v 1.5 2002/07/06 00:46:12 wiz Exp $");
 #endif
 
 #include <sys/types.h>
@@ -48,9 +48,7 @@
 #include "yppush.h"
 
 void * 
-yppushproc_null_1_svc(argp, rqstp)
-       void *argp;
-       struct svc_req *rqstp;
+yppushproc_null_1_svc(void *argp, struct svc_req *rqstp)
 {
        static char result;
 
@@ -59,9 +57,7 @@
 }
 
 void * 
-yppushproc_xfrresp_1_svc(argp, rqstp)
-       void *argp;
-       struct svc_req *rqstp;
+yppushproc_xfrresp_1_svc(void *argp, struct svc_req *rqstp)
 {
        struct yppushresp_xfr *resp = argp;
        static char result;
diff -r 458cd80a7345 -r fa64fa1f34c4 usr.sbin/ypserv/yppush/yppush_svc.c
--- a/usr.sbin/ypserv/yppush/yppush_svc.c       Sat Jul 06 00:42:27 2002 +0000
+++ b/usr.sbin/ypserv/yppush/yppush_svc.c       Sat Jul 06 00:46:12 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: yppush_svc.c,v 1.5 1997/11/18 07:01:52 lukem Exp $     */
+/*     $NetBSD: yppush_svc.c,v 1.6 2002/07/06 00:46:12 wiz Exp $       */
 
 /*
  * Copyright (c) 1996 Mats O Jansson <moj%stacken.kth.se@localhost>
@@ -33,7 +33,7 @@
 
 #include <sys/cdefs.h>
 #ifndef lint
-__RCSID("$NetBSD: yppush_svc.c,v 1.5 1997/11/18 07:01:52 lukem Exp $");
+__RCSID("$NetBSD: yppush_svc.c,v 1.6 2002/07/06 00:46:12 wiz Exp $");
 #endif
 
 /*
@@ -60,10 +60,6 @@
 
 #include "yppush.h"
 
-#ifdef __STDC__
-#define SIG_PF void(*)(int)
-#endif
-
 #ifdef DEBUG
 #define RPC_SVC_FG
 #endif
@@ -73,11 +69,10 @@
 int _rpcfdtype;                        /* Whether Stream or Datagram ? */
 int _rpcsvcdirty;              /* Still serving ? */
 
-static void _msgout __P((char *));
+static void _msgout(char *);
 
 static
-void _msgout(msg)
-       char *msg;
+void _msgout(char *msg)
 {
 #ifdef RPC_SVC_FG
        if (_rpcpmstart)
@@ -90,16 +85,14 @@
 }
 
 void
-yppush_xfrrespprog_1(rqstp, transp)
-       struct svc_req *rqstp;
-       SVCXPRT *transp;
+yppush_xfrrespprog_1(struct svc_req *rqstp, SVCXPRT *transp)
 {
        union {
                struct yppushresp_xfr yppushproc_xfrresp_1_arg;
        } argument;
        void *result;
        xdrproc_t xdr_argument, xdr_result;
-       void *(*local) __P((void *, struct svc_req *));
+       void *(*local)(void *, struct svc_req *);
 
        _rpcsvcdirty = 1;
        switch (rqstp->rq_proc) {



Home | Main Index | Thread Index | Old Index