WARNSify; deprecate register; clean up .Nm
This commit is contained in:
parent
c44131f35b
commit
615373621d
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: pr_time.c,v 1.6 1997/04/13 13:44:13 mrg Exp $ */
|
||||
/* $NetBSD: pr_time.c,v 1.7 1997/10/20 02:49:14 mrg Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990, 1993, 1994
|
||||
@ -33,11 +33,12 @@
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#ifndef lint
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)pr_time.c 8.2 (Berkeley) 4/4/94";
|
||||
#else
|
||||
static char rcsid[] = "$NetBSD: pr_time.c,v 1.6 1997/04/13 13:44:13 mrg Exp $";
|
||||
__RCSID("$NetBSD: pr_time.c,v 1.7 1997/10/20 02:49:14 mrg Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: proc_compare.c,v 1.6 1996/06/07 01:39:27 thorpej Exp $ */
|
||||
/* $NetBSD: proc_compare.c,v 1.7 1997/10/20 02:49:14 mrg Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990, 1993
|
||||
@ -33,11 +33,12 @@
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#ifndef lint
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)proc_compare.c 8.2 (Berkeley) 9/23/93";
|
||||
#else
|
||||
static char rcsid[] = "$NetBSD: proc_compare.c,v 1.6 1996/06/07 01:39:27 thorpej Exp $";
|
||||
__RCSID("$NetBSD: proc_compare.c,v 1.7 1997/10/20 02:49:14 mrg Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
@ -74,7 +75,7 @@ static char rcsid[] = "$NetBSD: proc_compare.c,v 1.6 1996/06/07 01:39:27 thorpej
|
||||
|
||||
int
|
||||
proc_compare(p1, p2)
|
||||
register struct proc *p1, *p2;
|
||||
struct proc *p1, *p2;
|
||||
{
|
||||
|
||||
if (p1 == NULL)
|
||||
|
@ -1,4 +1,4 @@
|
||||
.\" $NetBSD: uptime.1,v 1.6 1996/06/07 01:39:32 thorpej Exp $
|
||||
.\" $NetBSD: uptime.1,v 1.7 1997/10/20 02:49:15 mrg Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 1980, 1990, 1993, 1994
|
||||
.\" The Regents of the University of California. All rights reserved.
|
||||
@ -40,10 +40,10 @@
|
||||
.Nm uptime
|
||||
.Nd show how long system has been running
|
||||
.Sh SYNOPSIS
|
||||
.Nm uptime
|
||||
.Nm
|
||||
.Sh DESCRIPTION
|
||||
The
|
||||
.Nm uptime
|
||||
.Nm
|
||||
utility displays the current time,
|
||||
the length of time the system has been up,
|
||||
the number of users, and the load average of the system over the last
|
||||
|
@ -1,4 +1,4 @@
|
||||
.\" $NetBSD: w.1,v 1.5 1996/06/07 01:39:35 thorpej Exp $
|
||||
.\" $NetBSD: w.1,v 1.6 1997/10/20 02:49:16 mrg Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 1980, 1990, 1991, 1993
|
||||
.\" The Regents of the University of California. All rights reserved.
|
||||
@ -47,7 +47,7 @@
|
||||
.Op Ar user
|
||||
.Sh DESCRIPTION
|
||||
The
|
||||
.Nm w
|
||||
.Nm
|
||||
utility prints a summary of the current activity on the system,
|
||||
including what each user is doing.
|
||||
The first line displays the current time of day, how long the system has
|
||||
@ -77,7 +77,7 @@ default
|
||||
.Dq /netbsd .
|
||||
.It Fl n
|
||||
Show network addresses as numbers (normally
|
||||
.Nm w
|
||||
.Nm
|
||||
interprets addresses and attempts to display them symbolically).
|
||||
.El
|
||||
.Pp
|
||||
@ -105,7 +105,7 @@ This fails, for example, in critical sections of programs like the shell
|
||||
and editor, or when faulty programs running in the background fork and fail
|
||||
to ignore interrupts.
|
||||
(In cases where no process can be found,
|
||||
.Nm w
|
||||
.Nm
|
||||
prints
|
||||
.Dq \- . )
|
||||
.Pp
|
||||
@ -124,7 +124,7 @@ null or garbaged arguments.
|
||||
In these cases, the name of the command is printed in parentheses.
|
||||
.Pp
|
||||
The
|
||||
.Nm w
|
||||
.Nm
|
||||
utility does not know about the new conventions for detection of background
|
||||
jobs.
|
||||
It will sometimes find a background job instead of the right one.
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: w.c,v 1.25 1997/07/07 20:30:08 phil Exp $ */
|
||||
/* $NetBSD: w.c,v 1.26 1997/10/20 02:49:17 mrg Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1980, 1991, 1993, 1994
|
||||
@ -33,17 +33,17 @@
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#ifndef lint
|
||||
static char copyright[] =
|
||||
"@(#) Copyright (c) 1980, 1991, 1993, 1994\n\
|
||||
The Regents of the University of California. All rights reserved.\n";
|
||||
__COPYRIGHT("@(#) Copyright (c) 1980, 1991, 1993, 1994\n\
|
||||
The Regents of the University of California. All rights reserved.\n");
|
||||
#endif /* not lint */
|
||||
|
||||
#ifndef lint
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)w.c 8.6 (Berkeley) 6/30/94";
|
||||
#else
|
||||
static char rcsid[] = "$NetBSD: w.c,v 1.25 1997/07/07 20:30:08 phil Exp $";
|
||||
__RCSID("$NetBSD: w.c,v 1.26 1997/10/20 02:49:17 mrg Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
@ -116,6 +116,7 @@ static void pr_header __P((time_t *, int));
|
||||
static struct stat
|
||||
*ttystat __P((char *));
|
||||
static void usage __P((int));
|
||||
int main __P((int, char **));
|
||||
|
||||
int
|
||||
main(argc, argv)
|
||||
@ -198,7 +199,7 @@ main(argc, argv)
|
||||
strncmp(utmp.ut_name, sel_user, UT_NAMESIZE) != 0))
|
||||
continue;
|
||||
if ((ep = calloc(1, sizeof(struct entry))) == NULL)
|
||||
err(1, NULL);
|
||||
err(1, "%s", "");
|
||||
*nextp = ep;
|
||||
nextp = &(ep->next);
|
||||
memmove(&(ep->utmp), &utmp, sizeof(struct utmp));
|
||||
@ -313,7 +314,7 @@ main(argc, argv)
|
||||
}
|
||||
if (x) {
|
||||
(void)snprintf(buf, sizeof(buf), "%s:%.*s", p,
|
||||
ep->utmp.ut_host + UT_HOSTSIZE - x, x);
|
||||
(int)(ep->utmp.ut_host + UT_HOSTSIZE - x), x);
|
||||
p = buf;
|
||||
}
|
||||
(void)printf("%-*.*s %-2.2s %-*.*s ",
|
||||
|
Loading…
Reference in New Issue
Block a user