Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src ANSIfy.
details: https://anonhg.NetBSD.org/src/rev/07d2f3f611e4
branches: trunk
changeset: 499868:07d2f3f611e4
user: simonb <simonb%NetBSD.org@localhost>
date: Thu Nov 30 23:59:03 2000 +0000
description:
ANSIfy.
diffstat:
libexec/rpc.rstatd/rstat_proc.c | 18 +++---
usr.bin/vmstat/dkstats.c | 22 +++-----
usr.bin/vmstat/vmstat.c | 97 +++++++++++++++++-----------------------
usr.sbin/iostat/iostat.c | 55 +++++++++-------------
4 files changed, 83 insertions(+), 109 deletions(-)
diffs (truncated from 514 to 300 lines):
diff -r 05aa941bd601 -r 07d2f3f611e4 libexec/rpc.rstatd/rstat_proc.c
--- a/libexec/rpc.rstatd/rstat_proc.c Thu Nov 30 23:47:45 2000 +0000
+++ b/libexec/rpc.rstatd/rstat_proc.c Thu Nov 30 23:59:03 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rstat_proc.c,v 1.36 2000/11/29 11:18:34 simonb Exp $ */
+/* $NetBSD: rstat_proc.c,v 1.37 2000/11/30 23:59:03 simonb Exp $ */
/*
* Sun RPC is a product of Sun Microsystems, Inc. and is provided for
@@ -35,7 +35,7 @@
static char sccsid[] = "from: @(#)rpc.rstatd.c 1.1 86/09/25 Copyr 1984 Sun Micro";
static char sccsid[] = "from: @(#)rstat_proc.c 2.2 88/08/01 4.0 RPCSRC";
#else
-__RCSID("$NetBSD: rstat_proc.c,v 1.36 2000/11/29 11:18:34 simonb Exp $");
+__RCSID("$NetBSD: rstat_proc.c,v 1.37 2000/11/30 23:59:03 simonb Exp $");
#endif
#endif
@@ -380,7 +380,7 @@
} argument;
char *result;
xdrproc_t xdr_argument, xdr_result;
- char *(*local) __P((void *, struct svc_req *));
+ char *(*local)(void *, struct svc_req *);
switch (rqstp->rq_proc) {
case NULLPROC:
@@ -392,15 +392,15 @@
xdr_result = (xdrproc_t)xdr_statstime;
switch (rqstp->rq_vers) {
case RSTATVERS_ORIG:
- local = (char *(*) __P((void *, struct svc_req *)))
+ local = (char *(*)(void *, struct svc_req *))
rstatproc_stats_1_svc;
break;
case RSTATVERS_SWTCH:
- local = (char *(*) __P((void *, struct svc_req *)))
+ local = (char *(*)(void *, struct svc_req *))
rstatproc_stats_2_svc;
break;
case RSTATVERS_TIME:
- local = (char *(*) __P((void *, struct svc_req *)))
+ local = (char *(*)(void *, struct svc_req *))
rstatproc_stats_3_svc;
break;
default:
@@ -414,15 +414,15 @@
xdr_result = (xdrproc_t)xdr_u_int;
switch (rqstp->rq_vers) {
case RSTATVERS_ORIG:
- local = (char *(*) __P((void *, struct svc_req *)))
+ local = (char *(*)(void *, struct svc_req *))
rstatproc_havedisk_1_svc;
break;
case RSTATVERS_SWTCH:
- local = (char *(*) __P((void *, struct svc_req *)))
+ local = (char *(*)(void *, struct svc_req *))
rstatproc_havedisk_2_svc;
break;
case RSTATVERS_TIME:
- local = (char *(*) __P((void *, struct svc_req *)))
+ local = (char *(*)(void *, struct svc_req *))
rstatproc_havedisk_3_svc;
break;
default:
diff -r 05aa941bd601 -r 07d2f3f611e4 usr.bin/vmstat/dkstats.c
--- a/usr.bin/vmstat/dkstats.c Thu Nov 30 23:47:45 2000 +0000
+++ b/usr.bin/vmstat/dkstats.c Thu Nov 30 23:59:03 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dkstats.c,v 1.9 2000/07/07 15:13:25 itojun Exp $ */
+/* $NetBSD: dkstats.c,v 1.10 2000/11/30 23:59:04 simonb Exp $ */
/*
* Copyright (c) 1996 John M. Vinopal
@@ -97,10 +97,10 @@
#define timerset(tvp, uvp) ((uvp)->tv_sec = (tvp)->tv_sec); \
((uvp)->tv_usec = (tvp)->tv_usec)
-void dkswap __P((void));
-void dkreadstats __P((void));
-int dkinit __P((int, gid_t));
-static void deref_kptr __P((void *, void *, size_t));
+void dkswap(void);
+void dkreadstats(void);
+int dkinit(int, gid_t);
+static void deref_kptr(void *, void *, size_t);
/*
* Take the delta between the present values and the last recorded
@@ -108,7 +108,7 @@
* the delta values in the 'cur' structure.
*/
void
-dkswap()
+dkswap(void)
{
u_int64_t tmp;
int i;
@@ -149,7 +149,7 @@
* Also collect statistics for tty i/o and cpu ticks.
*/
void
-dkreadstats()
+dkreadstats(void)
{
struct disk cur_disk, *p;
size_t ssize;
@@ -190,9 +190,7 @@
* track disk statistics.
*/
int
-dkinit(select, egid)
- int select;
- gid_t egid;
+dkinit(int select, gid_t egid)
{
gid_t oldgid;
struct disklist_head disk_head;
@@ -283,9 +281,7 @@
* and the size of the copy passed in `len'.
*/
static void
-deref_kptr(kptr, ptr, len)
- void *kptr, *ptr;
- size_t len;
+deref_kptr(void *kptr, void *ptr, size_t len)
{
char buf[128];
diff -r 05aa941bd601 -r 07d2f3f611e4 usr.bin/vmstat/vmstat.c
--- a/usr.bin/vmstat/vmstat.c Thu Nov 30 23:47:45 2000 +0000
+++ b/usr.bin/vmstat/vmstat.c Thu Nov 30 23:59:03 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: vmstat.c,v 1.72 2000/11/30 12:02:19 simonb Exp $ */
+/* $NetBSD: vmstat.c,v 1.73 2000/11/30 23:59:04 simonb Exp $ */
/*-
* Copyright (c) 1998, 2000 The NetBSD Foundation, Inc.
@@ -80,7 +80,7 @@
#if 0
static char sccsid[] = "@(#)vmstat.c 8.2 (Berkeley) 3/1/95";
#else
-__RCSID("$NetBSD: vmstat.c,v 1.72 2000/11/30 12:02:19 simonb Exp $");
+__RCSID("$NetBSD: vmstat.c,v 1.73 2000/11/30 23:59:04 simonb Exp $");
#endif
#endif /* not lint */
@@ -160,7 +160,7 @@
extern int *dk_select, dk_ndrive;
struct uvmexp uvmexp, ouvmexp;
-int ndrives;
+int ndrives;
int winlines = 20;
@@ -175,31 +175,31 @@
#define HISTLIST 0x40
#define HISTDUMP 0x80
-void cpustats __P((void));
-void dkstats __P((void));
-void doevcnt __P((int verbose));
-void dointr __P((int verbose));
-void domem __P((void));
-void dopool __P((void));
-void dosum __P((void));
-void dovmstat __P((u_int, int));
-void kread __P((int, void *, size_t));
-void needhdr __P((int));
-long getuptime __P((void));
-void printhdr __P((void));
-long pct __P((long, long));
-void usage __P((void));
-void doforkst __P((void));
+void cpustats(void);
+void dkstats(void);
+void doevcnt(int verbose);
+void dointr(int verbose);
+void domem(void);
+void dopool(void);
+void dosum(void);
+void dovmstat(u_int, int);
+void kread(int, void *, size_t);
+void needhdr(int);
+long getuptime(void);
+void printhdr(void);
+long pct(long, long);
+void usage(void);
+void doforkst(void);
-void hist_traverse __P((int, const char *));
-void hist_dodump __P((struct uvm_history *));
+void hist_traverse(int, const char *);
+void hist_dodump(struct uvm_history *);
-int main __P((int, char **));
-char **choosedrives __P((char **));
+int main(int, char **);
+char **choosedrives(char **);
-extern int dkinit __P((int, gid_t));
-extern void dkreadstats __P((void));
-extern void dkswap __P((void));
+extern int dkinit(int, gid_t);
+extern void dkreadstats(void);
+extern void dkswap(void);
/* Namelist and memory file names. */
char *nlistf, *memf;
@@ -208,9 +208,7 @@
#define BACKWARD_COMPATIBILITY
int
-main(argc, argv)
- int argc;
- char **argv;
+main(int argc, char **argv)
{
int c, todo, verbose;
u_int interval;
@@ -364,8 +362,7 @@
}
char **
-choosedrives(argv)
- char **argv;
+choosedrives(char **argv)
{
int i;
@@ -399,7 +396,7 @@
}
long
-getuptime()
+getuptime(void)
{
static time_t now;
static struct timeval boottime;
@@ -420,9 +417,7 @@
int hz, hdrcnt;
void
-dovmstat(interval, reps)
- u_int interval;
- int reps;
+dovmstat(u_int interval, int reps)
{
struct vmtotal total;
time_t uptime, halfuptime;
@@ -497,7 +492,7 @@
}
void
-printhdr()
+printhdr(void)
{
int i;
@@ -523,16 +518,14 @@
* Force a header to be prepended to the next output.
*/
void
-needhdr(dummy)
- int dummy;
+needhdr(int dummy)
{
hdrcnt = 1;
}
long
-pct(top, bot)
- long top, bot;
+pct(long top, long bot)
{
long ans;
@@ -545,7 +538,7 @@
#define PCT(top, bot) (int)pct((long)(top), (long)(bot))
void
-dosum()
+dosum(void)
{
struct nchstats nchstats;
long nchtotal;
@@ -649,7 +642,7 @@
}
void
-doforkst()
+doforkst(void)
{
kread(X_UVMEXP, &uvmexp, sizeof(uvmexp));
@@ -661,7 +654,7 @@
}
Home |
Main Index |
Thread Index |
Old Index