Print -' rather than
' for 0 idle time.
This commit is contained in:
parent
889b512ea4
commit
6be6fca207
@ -36,7 +36,7 @@
|
||||
|
||||
#ifndef lint
|
||||
/*static char sccsid[] = "from: @(#)sprint.c 5.8 (Berkeley) 12/4/90";*/
|
||||
static char rcsid[] = "$Id: sprint.c,v 1.2 1993/08/01 18:15:58 mycroft Exp $";
|
||||
static char rcsid[] = "$Id: sprint.c,v 1.3 1993/10/26 20:54:41 mycroft Exp $";
|
||||
#endif /* not lint */
|
||||
|
||||
#include <sys/types.h>
|
||||
@ -149,7 +149,7 @@ stimeprint(w)
|
||||
if (!delta->tm_yday)
|
||||
if (!delta->tm_hour)
|
||||
if (!delta->tm_min)
|
||||
(void)printf(" ");
|
||||
(void)printf(" -");
|
||||
else
|
||||
(void)printf("%5d", delta->tm_min);
|
||||
else
|
||||
|
@ -39,7 +39,7 @@ char copyright[] =
|
||||
|
||||
#ifndef lint
|
||||
/*static char sccsid[] = "from: @(#)w.c 5.29 (Berkeley) 4/23/91";*/
|
||||
static char rcsid[] = "$Id: w.c,v 1.8 1993/08/01 18:03:14 mycroft Exp $";
|
||||
static char rcsid[] = "$Id: w.c,v 1.9 1993/10/26 20:52:51 mycroft Exp $";
|
||||
#endif /* not lint */
|
||||
|
||||
/*
|
||||
@ -308,7 +308,7 @@ main(argc, argv)
|
||||
if (ep->idle >= 36 * 60)
|
||||
printf(" %ddays ", (ep->idle + 12 * 60) / (24 * 60));
|
||||
else if (ep->idle == 0)
|
||||
printf(" ");
|
||||
printf(" - ");
|
||||
else
|
||||
prttime(ep->idle, " ");
|
||||
if (ep->args)
|
||||
@ -345,11 +345,9 @@ prttime(tim, tail)
|
||||
char *tail;
|
||||
{
|
||||
|
||||
if (tim >= 60) {
|
||||
printf(" %2d:", tim/60);
|
||||
tim %= 60;
|
||||
printf("%02d", tim);
|
||||
} else if (tim >= 0)
|
||||
if (tim >= 60)
|
||||
printf(" %2d:%02d", tim/60, tim%60);
|
||||
else if (tim >= 0)
|
||||
printf(" %2d", tim);
|
||||
printf("%s", tail);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user