This commit is contained in:
mjl 2001-01-05 04:59:21 +00:00
parent 96015e4766
commit 3d418a4a73
4 changed files with 25 additions and 37 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: extern.h,v 1.4 2000/05/26 03:10:31 simonb Exp $ */
/* $NetBSD: extern.h,v 1.5 2001/01/05 04:59:21 mjl Exp $ */
/*-
* Copyright (c) 1993
@ -36,8 +36,8 @@
*/
struct kinfo_proc2;
void fmt_puts __P((char *, int *));
void fmt_putc __P((int, int *));
void pr_attime __P((time_t *, time_t *));
void pr_idle __P((time_t));
int proc_compare __P((struct kinfo_proc2 *, struct kinfo_proc2 *));
void fmt_puts(char *, int *);
void fmt_putc(int, int *);
void pr_attime(time_t *, time_t *);
void pr_idle(time_t);
int proc_compare(struct kinfo_proc2 *, struct kinfo_proc2 *);

View File

@ -1,4 +1,4 @@
/* $NetBSD: pr_time.c,v 1.11 2000/12/20 01:20:38 cgd Exp $ */
/* $NetBSD: pr_time.c,v 1.12 2001/01/05 04:59:21 mjl Exp $ */
/*-
* Copyright (c) 1990, 1993, 1994
@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)pr_time.c 8.2 (Berkeley) 4/4/94";
#else
__RCSID("$NetBSD: pr_time.c,v 1.11 2000/12/20 01:20:38 cgd Exp $");
__RCSID("$NetBSD: pr_time.c,v 1.12 2001/01/05 04:59:21 mjl Exp $");
#endif
#endif /* not lint */
@ -60,8 +60,7 @@ __RCSID("$NetBSD: pr_time.c,v 1.11 2000/12/20 01:20:38 cgd Exp $");
* %I% get replaced in the source code.
*/
void
pr_attime(started, now)
time_t *started, *now;
pr_attime(time_t *started, time_t *now)
{
static char buf[256];
int tnow_yday;
@ -95,8 +94,7 @@ pr_attime(started, now)
* Display the idle time.
*/
void
pr_idle(idle)
time_t idle;
pr_idle(time_t idle)
{
int days = idle / SECSPERDAY;

View File

@ -1,4 +1,4 @@
/* $NetBSD: proc_compare.c,v 1.9 2000/05/26 03:10:31 simonb Exp $ */
/* $NetBSD: proc_compare.c,v 1.10 2001/01/05 04:59:21 mjl Exp $ */
/*-
* Copyright (c) 1990, 1993
@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)proc_compare.c 8.2 (Berkeley) 9/23/93";
#else
__RCSID("$NetBSD: proc_compare.c,v 1.9 2000/05/26 03:10:31 simonb Exp $");
__RCSID("$NetBSD: proc_compare.c,v 1.10 2001/01/05 04:59:21 mjl Exp $");
#endif
#endif /* not lint */
@ -75,8 +75,7 @@ __RCSID("$NetBSD: proc_compare.c,v 1.9 2000/05/26 03:10:31 simonb Exp $");
#define BOTH 3
int
proc_compare(p1, p2)
struct kinfo_proc2 *p1, *p2;
proc_compare(struct kinfo_proc2 *p1, struct kinfo_proc2 *p2)
{
if (p1 == NULL)

View File

@ -1,4 +1,4 @@
/* $NetBSD: w.c,v 1.44 2001/01/05 04:54:53 mjl Exp $ */
/* $NetBSD: w.c,v 1.45 2001/01/05 04:59:21 mjl Exp $ */
/*-
* Copyright (c) 1980, 1991, 1993, 1994
@ -43,7 +43,7 @@ __COPYRIGHT("@(#) Copyright (c) 1980, 1991, 1993, 1994\n\
#if 0
static char sccsid[] = "@(#)w.c 8.6 (Berkeley) 6/30/94";
#else
__RCSID("$NetBSD: w.c,v 1.44 2001/01/05 04:54:53 mjl Exp $");
__RCSID("$NetBSD: w.c,v 1.45 2001/01/05 04:59:21 mjl Exp $");
#endif
#endif /* not lint */
@ -116,17 +116,14 @@ struct entry {
#endif
} *ep, *ehead = NULL, **nextp = &ehead;
static void pr_args __P((struct kinfo_proc2 *));
static void pr_header __P((time_t *, int));
static struct stat
*ttystat __P((char *, size_t));
static void usage __P((int));
int main __P((int, char **));
static void pr_args(struct kinfo_proc2 *);
static void pr_header(time_t *, int);
static struct stat *ttystat(char *, size_t);
static void usage(int);
int main(int, char **);
int
main(argc, argv)
int argc;
char **argv;
main(int argc, char **argv)
{
extern char *__progname;
struct kinfo_proc2 *kp;
@ -385,8 +382,7 @@ main(argc, argv)
}
static void
pr_args(kp)
struct kinfo_proc2 *kp;
pr_args(struct kinfo_proc2 *kp)
{
char **argv;
int left;
@ -408,9 +404,7 @@ nothing:
}
static void
pr_header(nowp, nusers)
time_t *nowp;
int nusers;
pr_header(time_t *nowp, int nusers)
{
double avenrun[3];
time_t uptime;
@ -483,9 +477,7 @@ pr_header(nowp, nusers)
}
static struct stat *
ttystat(line, sz)
char *line;
size_t sz;
ttystat(char *line, size_t sz)
{
static struct stat sb;
char ttybuf[MAXPATHLEN];
@ -497,8 +489,7 @@ ttystat(line, sz)
}
static void
usage(wcmd)
int wcmd;
usage(int wcmd)
{
if (wcmd)
(void)fprintf(stderr,