summaryrefslogtreecommitdiffstats
path: root/usr.bin/w
diff options
context:
space:
mode:
authorwollman <wollman@FreeBSD.org>1995-08-07 19:17:46 +0000
committerwollman <wollman@FreeBSD.org>1995-08-07 19:17:46 +0000
commitfc1f6c1d76677a4e8d2c39e5fa7be3716841930e (patch)
tree413738746625eee30af858d100ea794582067fa4 /usr.bin/w
parentc87e4ea046fafb0b07c7ac3335948b0743fed8b4 (diff)
downloadFreeBSD-src-fc1f6c1d76677a4e8d2c39e5fa7be3716841930e.zip
FreeBSD-src-fc1f6c1d76677a4e8d2c39e5fa7be3716841930e.tar.gz
Delete bogus referneces to timezone code internal header file `tzfile.h',
which is no longer bogusly installed in /usr/include.
Diffstat (limited to 'usr.bin/w')
-rw-r--r--usr.bin/w/pr_time.c17
-rw-r--r--usr.bin/w/w.c11
2 files changed, 13 insertions, 15 deletions
diff --git a/usr.bin/w/pr_time.c b/usr.bin/w/pr_time.c
index 91410ee..ba94b50 100644
--- a/usr.bin/w/pr_time.c
+++ b/usr.bin/w/pr_time.c
@@ -40,7 +40,6 @@ static char sccsid[] = "@(#)pr_time.c 8.2 (Berkeley) 4/4/94";
#include <stdio.h>
#include <string.h>
-#include <tzfile.h>
#include "extern.h"
@@ -64,11 +63,11 @@ pr_attime(started, now)
diff = *now - *started;
/* If more than a week, use day-month-year. */
- if (diff > SECSPERDAY * DAYSPERWEEK)
+ if (diff > 86400 * 7)
(void)strcpy(fmt, "%d%b%y");
/* If not today, use day-hour-am/pm. */
- else if (*now / SECSPERDAY != *started / SECSPERDAY) {
+ else if (*now / 86400 != *started / 86400) {
(void)strcpy(fmt, __CONCAT("%a%", "I%p"));
}
@@ -90,18 +89,18 @@ pr_idle(idle)
time_t idle;
{
/* If idle more than 36 hours, print as a number of days. */
- if (idle >= 36 * SECSPERHOUR)
- (void)printf(" %ddays ", idle / SECSPERDAY);
+ if (idle >= 36 * 3600)
+ (void)printf(" %ddays ", idle / 86400);
/* If idle more than an hour, print as HH:MM. */
- else if (idle >= SECSPERHOUR)
+ else if (idle >= 3600)
(void)printf(" %2d:%02d ",
- idle / SECSPERHOUR, (idle % SECSPERHOUR) / SECSPERMIN);
+ idle / 3600, (idle % 3600) / 60);
- else if (idle / SECSPERMIN == 0)
+ else if (idle / 60 == 0)
(void)printf(" - ");
/* Else print the minutes idle. */
else
- (void)printf(" %2d ", idle / SECSPERMIN);
+ (void)printf(" %2d ", idle / 60);
}
diff --git a/usr.bin/w/w.c b/usr.bin/w/w.c
index 6e006ad..e7cafca 100644
--- a/usr.bin/w/w.c
+++ b/usr.bin/w/w.c
@@ -72,7 +72,6 @@ static char sccsid[] = "@(#)w.c 8.4 (Berkeley) 4/16/94";
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <tzfile.h>
#include <unistd.h>
#include <utmp.h>
#include <vis.h>
@@ -371,11 +370,11 @@ pr_header(nowp, nusers)
boottime.tv_sec != 0) {
uptime = now - boottime.tv_sec;
uptime += 30;
- days = uptime / SECSPERDAY;
- uptime %= SECSPERDAY;
- hrs = uptime / SECSPERHOUR;
- uptime %= SECSPERHOUR;
- mins = uptime / SECSPERMIN;
+ days = uptime / 86400;
+ uptime %= 86400;
+ hrs = uptime / 3600;
+ uptime %= 3600;
+ mins = uptime / 60;
(void)printf(" up");
if (days > 0)
(void)printf(" %d day%s,", days, days > 1 ? "s" : "");
OpenPOWER on IntegriCloud