diff options
author | danny <danny@FreeBSD.org> | 1997-02-11 10:49:25 +0000 |
---|---|---|
committer | danny <danny@FreeBSD.org> | 1997-02-11 10:49:25 +0000 |
commit | da4de4acb65bfed166f7a0fd06df1913df30bcd5 (patch) | |
tree | 71160423a76f8263422fcef347686d8905551417 /usr.bin/w/w.c | |
parent | b139405b95e14f555208343662a3a4686060b95d (diff) | |
download | FreeBSD-src-da4de4acb65bfed166f7a0fd06df1913df30bcd5.zip FreeBSD-src-da4de4acb65bfed166f7a0fd06df1913df30bcd5.tar.gz |
Reduce the command field width by one when idle time is > 9 days, to
eliminate unsightly blank line.
Possibly a 2.2 candidate.
Diffstat (limited to 'usr.bin/w/w.c')
-rw-r--r-- | usr.bin/w/w.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.bin/w/w.c b/usr.bin/w/w.c index b9c2a63..c615430 100644 --- a/usr.bin/w/w.c +++ b/usr.bin/w/w.c @@ -127,7 +127,7 @@ main(argc, argv) FILE *ut; u_long l; size_t arglen; - int ch, i, nentries, nusers, wcmd; + int ch, i, nentries, nusers, wcmd, longidle; char *memf, *nlistf, *p, *vis_args, *x; char buf[MAXHOSTNAMELEN], errbuf[256]; @@ -345,7 +345,9 @@ main(argc, argv) ep->utmp.ut_line : ep->utmp.ut_line + 3, UT_HOSTSIZE, UT_HOSTSIZE, *p ? p : "-"); pr_attime(&ep->utmp.ut_time, &now); - pr_idle(ep->idle); + longidle=pr_idle(ep->idle); + if (longidle) + argwidth--; if (ep->args != NULL) { arglen = strlen(ep->args); strvisx(vis_args, ep->args, |