Add options to make `who' more POSIX compliant.
authorJim Meyering <jim@meyering.net>
Sat, 9 Jun 2001 09:00:24 +0000 (09:00 +0000)
committerJim Meyering <jim@meyering.net>
Sat, 9 Jun 2001 09:00:24 +0000 (09:00 +0000)
commit2beac10424a4f9a8cee26ed26508fadadf112f22
tree5f9c5249c5e8a3b3b9956387c3b16374064e597c
parent7c976d94854bb783859a1fcbcc0091e008b30fc5
Add options to make `who' more POSIX compliant.

Accept new options: --all (-a), --boot (-b), --dead (-d),
--login, --process (-p), --runlevel (-r), --short (-s), --time (-t),
--users (-u).
The -u option now produces POSIX-specified results and is the same as
the long option `--users'.  --idle is no longer the same as -u.
(time_string, print_line, print_boottime, print_deadprocs, print_login,
print_initspawn, print_clockchange, print_runlevel): New functions.
(print_user): Renamed from print_entry and reworked.
(search_entries): Remove function.
(who_am_i): Likewise.
(usage): Describe new options.
(main): Handle new options.
Mostly from Michael Stone.
src/who.c