version 1.14, 2014/10/17 20:19:15 |
version 1.15, 2015/03/15 00:41:28 |
|
|
|
|
#include <sys/types.h> |
#include <sys/types.h> |
#include <sys/time.h> |
#include <sys/time.h> |
#include <tzfile.h> |
|
#include <stdio.h> |
#include <stdio.h> |
#include <stdlib.h> |
#include <stdlib.h> |
#include <string.h> |
#include <string.h> |
|
|
} else |
} else |
(void)printf(" * "); |
(void)printf(" * "); |
p = ctime(&w->loginat); |
p = ctime(&w->loginat); |
if (now - w->loginat < SECSPERDAY * (DAYSPERWEEK - 1)) |
|
|
if (now - w->loginat < SECSPERDAY * 6) |
(void)printf(" %.3s", p); |
(void)printf(" %.3s", p); |
else |
else |
(void)printf("%.6s", p + 4); |
(void)printf("%.6s", p + 4); |
if (now - w->loginat >= SECSPERDAY * DAYSPERNYEAR / 2) |
if (now - w->loginat >= SIXMONTHS) |
(void)printf(" %.4s ", p + 20); |
(void)printf(" %.4s ", p + 20); |
else |
else |
(void)printf(" %.5s", p + 11); |
(void)printf(" %.5s", p + 11); |