projects
/
unix-history
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
tags
|
clone url
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
date and time created 83/02/11 15:44:33 by rrh
[unix-history]
/
usr
/
src
/
usr.bin
/
w
/
w.c
diff --git
a/usr/src/usr.bin/w/w.c
b/usr/src/usr.bin/w/w.c
index
d11377e
..
a46a2f8
100644
(file)
--- a/
usr/src/usr.bin/w/w.c
+++ b/
usr/src/usr.bin/w/w.c
@@
-1,4
+1,4
@@
-static char *sccsid = "@(#)w.c 4.
7
(Berkeley) %G%";
+static char *sccsid = "@(#)w.c 4.
9
(Berkeley) %G%";
/*
* w - print system status (who and what)
*
/*
* w - print system status (who and what)
*
@@
-14,7
+14,7
@@
static char *sccsid = "@(#)w.c 4.7 (Berkeley) %G%";
#include <sys/dir.h>
#include <sys/user.h>
#include <sys/proc.h>
#include <sys/dir.h>
#include <sys/user.h>
#include <sys/proc.h>
-#include <
sys
/pte.h>
+#include <
machine
/pte.h>
#include <sys/vm.h>
#define NMAX sizeof(utmp.ut_name)
#include <sys/vm.h>
#define NMAX sizeof(utmp.ut_name)
@@
-70,7
+70,7
@@
time_t proctime; /* cpu time of process in doing */
double avenrun[3];
struct proc *aproc;
double avenrun[3];
struct proc *aproc;
-#define DIV60(t) ((t
+30)/
60) /* x/60 rounded */
+#define DIV60(t) ((t
+ 30) /
60) /* x/60 rounded */
#define TTYEQ (tty == pr[i].w_tty)
#define IGINT (1+3*1) /* ignoring both SIGINT & SIGQUIT */
#define TTYEQ (tty == pr[i].w_tty)
#define IGINT (1+3*1) /* ignoring both SIGINT & SIGQUIT */
@@
-331,9
+331,9
@@
putline()
if (lflag) {
/* print CPU time for all processes & children */
if (lflag) {
/* print CPU time for all processes & children */
- prttime(
DIV60(jobtime)
," ");
+ prttime(
jobtime
," ");
/* print cpu time for interesting process */
/* print cpu time for interesting process */
- prttime(
DIV60(proctime)
," ");
+ prttime(
proctime
," ");
}
/* what user is doing, either command tail or args */
}
/* what user is doing, either command tail or args */