Commit Graph

20 Commits

Author SHA1 Message Date
ache
0808a9f291 w(1) uses strftime %b with to print the abbreviated month name
if a user logged in more than a week ago.
This may contain multibyte characters (e.g. when using UTF-8).
This string is then aligned on byte-length rathern than char-length,
resulting in misalignment and unfinished multibyte characters.

PR:             126657
Submitted by:   Johan van Selst <johans@stack.nl>
2008-08-20 12:32:19 +00:00
jmallett
ecd7ab07f9 ANSI style function declarations. 2002-06-07 01:41:54 +00:00
markm
a23dd012ce WARNS=2 fix, use __FBSDID() and sort includes.
WARNS=2 not added to Makefile as it is to become default.
2001-12-11 22:18:47 +00:00
ache
75dff8d870 Fix width for printing time 2001-03-21 21:49:33 +00:00
ache
98047335ba Oops, remove tabs sneaked in wrong place 2001-03-02 23:49:07 +00:00
ache
fe36abf2a2 Use AM/PM time only when available in locale 2001-03-02 23:11:38 +00:00
davidn
eb0978086d Fix cosmetic bug in time display. Current day logins are now displayed
as plain time as originally intended, instead of displaying DayHH times
when the login time happens to be prior the GMT - TZ difference.
(Only noticable on systems operating east of GMT/UTC).
Local times are now used to determine the day.
1999-11-10 04:28:16 +00:00
peter
3b842d34e8 $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
peter
d66a1cb030 Fix the annoying bug introduced in rev 1.18 that caused each line to be
one character shorter than the previous in a stairstep fashion when long
idle times were involved.

A couple of nits:
- spelling/typo fix.
- some of the easier style(9) fixes where it was bothering me.
- Handle 100+ days idle time (ha!).  Probably the right thing to do is
  to do a snprintf into a buffer and strlen the result rather than doing
  hackery on magic numbers.

XXX the wide (and mostly unused) username and tty columns annoy me since
it it could be used for more useful information for the command. We should
actually count the largest username and tty and adjust like 'ls -l' does.
1999-01-10 15:28:37 +00:00
alex
c9da542ee5 -Wall cleanup. 1997-12-28 17:50:10 +00:00
charnier
98f0299552 Revert some casts I introduced.
Requested by: Bruce.
1997-08-26 06:59:34 +00:00
charnier
0beb621f63 Typo in usage(). Err -> errx when testing allocations. 1997-08-25 06:42:19 +00:00
yokota
479436ac99 Made sure the string formated by strftime() is properly
null-terminated.

Should go to RELENG_2_1 and RELENG_2_2.

Reviewed by guido@freebsd.org.
1997-03-07 10:54:19 +00:00
danny
da4de4acb6 Reduce the command field width by one when idle time is > 9 days, to
eliminate unsightly blank line.

Possibly a 2.2 candidate.
1997-02-11 10:49:25 +00:00
ache
89926b7c1c Fix one column wrong offset in previous change days->day 1995-10-08 23:16:45 +00:00
dima
b5ee2c7636 Print "1day" instead of "1days" 1995-09-22 00:50:37 +00:00
wollman
fc1f6c1d76 Delete bogus referneces to timezone code internal header file `tzfile.h',
which is no longer bogusly installed in /usr/include.
1995-08-07 19:17:46 +00:00
rgrimes
a14d555c87 Remove trailing whitespace. 1995-05-30 06:41:30 +00:00
ache
8802e34cc8 idle time == 0 printed now as "-" like in good old BSD
skip cua* 3 chars as tty* 3 lchars
1994-09-27 01:00:18 +00:00
rgrimes
f9ab90d9d6 BSD 4.4 Lite Usr.bin Sources 1994-05-27 12:33:43 +00:00