Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.sbin ansify - drop the K&R style prototypes & implementa...
details: https://anonhg.NetBSD.org/src/rev/0f3a1afefd93
branches: trunk
changeset: 358952:0f3a1afefd93
user: sevan <sevan%NetBSD.org@localhost>
date: Tue Jan 23 21:06:24 2018 +0000
description:
ansify - drop the K&R style prototypes & implementations.
diffstat:
usr.sbin/faithd/prefix.c | 10 +-
usr.sbin/inetd/ipsec.h | 8 +-
usr.sbin/isdn/daicctl/daicctl.h | 14 ++--
usr.sbin/isdn/daicctl/dnload.c | 6 +-
usr.sbin/iteconfig/iteconfig.c | 42 +++++---------
usr.sbin/kvm_mkdb/extern.h | 18 +++---
usr.sbin/kvm_mkdb/kvm_mkdb.c | 15 ++---
usr.sbin/kvm_mkdb/nlist.c | 10 +--
usr.sbin/kvm_mkdb/nlist_aout.c | 19 ++----
usr.sbin/mailwrapper/mailwrapper.c | 21 ++-----
usr.sbin/mdconfig/mdconfig.c | 10 +--
usr.sbin/memswitch/memswitch.c | 25 ++------
usr.sbin/memswitch/memswitch.h | 30 +++++-----
usr.sbin/memswitch/methods.c | 102 ++++++++++--------------------------
usr.sbin/memswitch/methods.h | 56 ++++++++++----------
usr.sbin/mscdlabel/main.c | 7 +-
usr.sbin/rbootd/bpf.c | 14 +---
usr.sbin/rbootd/defs.h | 68 ++++++++++++------------
usr.sbin/rbootd/parseconf.c | 7 +-
usr.sbin/rbootd/rmpproto.c | 30 +++-------
usr.sbin/rbootd/utils.c | 36 ++++--------
usr.sbin/rmt/rmt.c | 26 +++------
usr.sbin/rpc.lockd/lockd.h | 4 +-
usr.sbin/rpc.pcnfsd/extern.h | 52 +++++++++---------
usr.sbin/rpc.pcnfsd/pcnfsd_cache.c | 11 +--
usr.sbin/rpc.pcnfsd/pcnfsd_misc.c | 43 +++++----------
usr.sbin/rpc.pcnfsd/pcnfsd_print.c | 103 ++++++++----------------------------
usr.sbin/rpc.pcnfsd/pcnfsd_test.c | 57 +++++---------------
usr.sbin/rpc.pcnfsd/pcnfsd_v1.c | 18 +----
usr.sbin/rpc.pcnfsd/pcnfsd_v2.c | 80 +++++++---------------------
usr.sbin/rpc.statd/stat_proc.c | 33 +++--------
usr.sbin/rpc.statd/statd.c | 77 ++++++++-------------------
usr.sbin/rpc.statd/statd.h | 30 +++++-----
usr.sbin/rpc.statd/test.c | 28 ++-------
usr.sbin/sesd/srcs/chpmon.c | 8 +--
usr.sbin/sesd/srcs/eltsub.c | 15 ++---
usr.sbin/sesd/srcs/getencstat.c | 11 +--
usr.sbin/sesd/srcs/getnobj.c | 8 +--
usr.sbin/sesd/srcs/getobjmap.c | 9 +--
usr.sbin/sesd/srcs/getobjstat.c | 8 +--
usr.sbin/sesd/srcs/inienc.c | 8 +--
usr.sbin/sesd/srcs/sesd.c | 7 +-
usr.sbin/sesd/srcs/setencstat.c | 8 +--
usr.sbin/sesd/srcs/setobjstat.c | 8 +--
usr.sbin/tcpdchk/fakelog.c | 9 +--
usr.sbin/tcpdchk/inetcf.c | 24 ++-----
usr.sbin/tcpdchk/inetcf.h | 8 +-
usr.sbin/tcpdchk/percent_m.c | 8 +-
usr.sbin/tcpdchk/percent_m.h | 4 +-
usr.sbin/tcpdchk/scaffold.c | 17 ++---
usr.sbin/tcpdchk/tcpdchk.c | 31 +++-------
usr.sbin/tcpdmatch/tcpdmatch.c | 26 +++------
usr.sbin/videomode/videomode.c | 26 +++-----
53 files changed, 469 insertions(+), 884 deletions(-)
diffs (truncated from 3438 to 300 lines):
diff -r 6c1864d07c92 -r 0f3a1afefd93 usr.sbin/faithd/prefix.c
--- a/usr.sbin/faithd/prefix.c Tue Jan 23 19:14:09 2018 +0000
+++ b/usr.sbin/faithd/prefix.c Tue Jan 23 21:06:24 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: prefix.c,v 1.8 2010/11/26 18:58:43 christos Exp $ */
+/* $NetBSD: prefix.c,v 1.9 2018/01/23 21:06:24 sevan Exp $ */
/* $KAME: prefix.c,v 1.13 2003/09/02 22:50:17 itojun Exp $ */
/*
@@ -47,11 +47,11 @@
#include "faithd.h"
#include "prefix.h"
-static int prefix_set __P((const char *, struct prefix *, int));
-static struct config *config_load1 __P((const char *));
+static int prefix_set(const char *, struct prefix *, int);
+static struct config *config_load1(const char *);
#if 0
-static void config_show1 __P((const struct config *));
-static void config_show __P((void));
+static void config_show1(const struct config *);
+static void config_show(void);
#endif
struct config *config_list = NULL;
diff -r 6c1864d07c92 -r 0f3a1afefd93 usr.sbin/inetd/ipsec.h
--- a/usr.sbin/inetd/ipsec.h Tue Jan 23 19:14:09 2018 +0000
+++ b/usr.sbin/inetd/ipsec.h Tue Jan 23 21:06:24 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ipsec.h,v 1.1 2000/01/31 14:28:20 itojun Exp $ */
+/* $NetBSD: ipsec.h,v 1.2 2018/01/23 21:06:24 sevan Exp $ */
/*
* Copyright (C) 1999 WIDE Project.
@@ -29,6 +29,6 @@
* SUCH DAMAGE.
*/
-extern int ipsecsetup __P((int, int, const char *));
-extern int ipsecsetup_test __P((const char *));
-extern int ipsecsetup0 __P((int, int, const char *, int));
+extern int ipsecsetup(int, int, const char *);
+extern int ipsecsetup_test(const char *);
+extern int ipsecsetup0(int, int, const char *, int);
diff -r 6c1864d07c92 -r 0f3a1afefd93 usr.sbin/isdn/daicctl/daicctl.h
--- a/usr.sbin/isdn/daicctl/daicctl.h Tue Jan 23 19:14:09 2018 +0000
+++ b/usr.sbin/isdn/daicctl/daicctl.h Tue Jan 23 21:06:24 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: daicctl.h,v 1.7 2008/04/28 20:24:16 martin Exp $ */
+/* $NetBSD: daicctl.h,v 1.8 2018/01/23 21:06:24 sevan Exp $ */
/*-
* Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -31,10 +31,10 @@
#define PATH_ISDN_DEV "/dev/isdn"
-extern void download __P((int fd, int controller, char *filename));
-extern void simpccard __P((char *controller, int insert));
-extern void xlog __P((int fd, int controller));
-extern void xversion __P((int fd, int controller));
-extern void istat __P((int fd, int controller));
-extern void passthrough __P((int fd, int controller));
+extern void download(int fd, int controller, char *filename);
+extern void simpccard(char *controller, int insert);
+extern void xlog(int fd, int controller);
+extern void xversion(int fd, int controller);
+extern void istat(int fd, int controller);
+extern void passthrough(int fd, int controller);
diff -r 6c1864d07c92 -r 0f3a1afefd93 usr.sbin/isdn/daicctl/dnload.c
--- a/usr.sbin/isdn/daicctl/dnload.c Tue Jan 23 19:14:09 2018 +0000
+++ b/usr.sbin/isdn/daicctl/dnload.c Tue Jan 23 21:06:24 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dnload.c,v 1.7 2009/04/16 05:56:32 lukem Exp $ */
+/* $NetBSD: dnload.c,v 1.8 2018/01/23 21:06:24 sevan Exp $ */
/*-
* Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -40,9 +40,7 @@
#include "daicctl.h"
void
-download(fd, controller, filename)
- int fd, controller;
- char *filename;
+download(int fd, int controller, char *filename)
{
int i, num_ports = 1;
struct isdn_download_request dr;
diff -r 6c1864d07c92 -r 0f3a1afefd93 usr.sbin/iteconfig/iteconfig.c
--- a/usr.sbin/iteconfig/iteconfig.c Tue Jan 23 19:14:09 2018 +0000
+++ b/usr.sbin/iteconfig/iteconfig.c Tue Jan 23 21:06:24 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: iteconfig.c,v 1.9 2009/04/26 19:56:20 mlelstv Exp $ */
+/* $NetBSD: iteconfig.c,v 1.10 2018/01/23 21:06:25 sevan Exp $ */
/*
* Copyright (c) 1994 Christian E. Hopps
* All rights reserved.
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: iteconfig.c,v 1.9 2009/04/26 19:56:20 mlelstv Exp $");
+__RCSID("$NetBSD: iteconfig.c,v 1.10 2018/01/23 21:06:25 sevan Exp $");
#endif
#include <sys/types.h>
@@ -67,19 +67,16 @@
#include "pathnames.h"
-int initialize __P((const char *, struct itewinsize *, struct itebell *,
- struct itewinsize *, struct itebell *));
-int main __P((int, char **));
-void printcmap __P((colormap_t *, int));
-void xioctl __P((int, int, void *));
-colormap_t *xgetcmap __P((int, int));
-long xstrtol __P((char *));
-void usage __P((void));
+int initialize(const char *, struct itewinsize *, struct itebell *,
+ struct itewinsize *, struct itebell *);
+void printcmap(colormap_t *, int);
+void xioctl(int, int, void *);
+colormap_t *xgetcmap(int, int);
+long xstrtol(char *);
+static void usage(void) __dead;
int
-main(argc, argv)
- int argc;
- char **argv;
+main(int argc, char *argv[])
{
struct itewinsize is, newis;
struct itebell ib, newib;
@@ -194,17 +191,14 @@
}
void
-xioctl(fd, cmd, addr)
- int fd, cmd;
- void *addr;
+xioctl(int fd, int cmd, void *addr)
{
if (ioctl(fd, cmd, addr) == -1)
err(1, "ioctl");
}
long
-xstrtol(s)
- char *s;
+xstrtol(char *s)
{
long rv;
@@ -216,9 +210,7 @@
}
colormap_t *
-xgetcmap(fd, ncolors)
- int fd;
- int ncolors;
+xgetcmap(int fd, int ncolors)
{
colormap_t *cm;
@@ -233,9 +225,7 @@
}
void
-printcmap(cm, ncols)
- colormap_t *cm;
- int ncols;
+printcmap(colormap_t *cm, int ncols)
{
int i, nel;
@@ -283,8 +273,8 @@
return(fd);
}
-void
-usage()
+static void
+usage(void)
{
fprintf(stderr, "%s\n\t\t%s\n\t\t%s\n",
"usage: iteconfig [-i] [-f file] [-v volume] [-p pitch] [-t msec]",
diff -r 6c1864d07c92 -r 0f3a1afefd93 usr.sbin/kvm_mkdb/extern.h
--- a/usr.sbin/kvm_mkdb/extern.h Tue Jan 23 19:14:09 2018 +0000
+++ b/usr.sbin/kvm_mkdb/extern.h Tue Jan 23 21:06:24 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: extern.h,v 1.19 2003/08/07 11:25:23 agc Exp $ */
+/* $NetBSD: extern.h,v 1.20 2018/01/23 21:06:25 sevan Exp $ */
/*-
* Copyright (c) 1992, 1993
@@ -97,22 +97,22 @@
/* #define NLIST_ELF64 */
#endif
-void create_knlist __P((const char *, DB *));
-void punt __P((void));
-int testdb __P((void));
+void create_knlist(const char *, DB *);
+void punt(void);
+int testdb(void);
#ifdef NLIST_AOUT
-int create_knlist_aout __P((const char *, DB *));
+int create_knlist_aout(const char *, DB *);
#endif
#ifdef NLIST_COFF
-int create_knlist_coff __P((const char *, DB *));
+int create_knlist_coff(const char *, DB *);
#endif
#ifdef NLIST_ECOFF
-int create_knlist_ecoff __P((const char *, DB *));
+int create_knlist_ecoff(const char *, DB *);
#endif
#ifdef NLIST_ELF32
-int create_knlist_elf32 __P((const char *, DB *));
+int create_knlist_elf32(const char *, DB *);
#endif
#ifdef NLIST_ELF64
-int create_knlist_elf64 __P((const char *, DB *));
+int create_knlist_elf64(const char *, DB *);
#endif
diff -r 6c1864d07c92 -r 0f3a1afefd93 usr.sbin/kvm_mkdb/kvm_mkdb.c
--- a/usr.sbin/kvm_mkdb/kvm_mkdb.c Tue Jan 23 19:14:09 2018 +0000
+++ b/usr.sbin/kvm_mkdb/kvm_mkdb.c Tue Jan 23 21:06:24 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kvm_mkdb.c,v 1.20 2008/07/21 13:36:58 lukem Exp $ */
+/* $NetBSD: kvm_mkdb.c,v 1.21 2018/01/23 21:06:25 sevan Exp $ */
/*-
* Copyright (c) 1990, 1993
@@ -71,7 +71,7 @@
#if 0
static char sccsid[] = "from: @(#)kvm_mkdb.c 8.3 (Berkeley) 5/4/95";
#else
-__RCSID("$NetBSD: kvm_mkdb.c,v 1.20 2008/07/21 13:36:58 lukem Exp $");
+__RCSID("$NetBSD: kvm_mkdb.c,v 1.21 2018/01/23 21:06:25 sevan Exp $");
#endif
#endif /* not lint */
@@ -90,8 +90,7 @@
#include "extern.h"
- int main __P((int, char **));
-static void usage __P((void));
+static void usage(void) __dead;
HASHINFO openinfo = {
4096, /* bsize */
@@ -107,9 +106,7 @@
static char dbtemp[MAXPATHLEN];
int
-main(argc, argv)
- int argc;
- char *argv[];
+main(int argc, char *argv[])
{
int ch;
char *nlistpath;
@@ -181,8 +178,8 @@
exit(0);
}
-void
-usage()
+static void
+usage(void)
{
(void)fprintf(stderr, "usage: kvm_mkdb [-o database] [file]\n");
exit(1);
diff -r 6c1864d07c92 -r 0f3a1afefd93 usr.sbin/kvm_mkdb/nlist.c
--- a/usr.sbin/kvm_mkdb/nlist.c Tue Jan 23 19:14:09 2018 +0000
+++ b/usr.sbin/kvm_mkdb/nlist.c Tue Jan 23 21:06:24 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: nlist.c,v 1.19 2003/08/07 11:25:23 agc Exp $ */
+/* $NetBSD: nlist.c,v 1.20 2018/01/23 21:06:25 sevan Exp $ */
/*-
* Copyright (c) 1990, 1993
@@ -66,7 +66,7 @@
#if 0
static char sccsid[] = "from: @(#)nlist.c 8.1 (Berkeley) 6/6/93";
#else
-__RCSID("$NetBSD: nlist.c,v 1.19 2003/08/07 11:25:23 agc Exp $");
+__RCSID("$NetBSD: nlist.c,v 1.20 2018/01/23 21:06:25 sevan Exp $");
#endif
#endif /* not lint */
@@ -87,7 +87,7 @@
#include "extern.h"
Home |
Main Index |
Thread Index |
Old Index