freebsd-dev/usr.sbin/ac
Ed Schouten b42c08d3c4 Massively refactor ac(8).
- Use queue(3) -- not some homegrown implementation of linked lists.
- Rename structures to _entry, as they are entries in the linked list --
  not the lists themselves.
- Don't store entire copies of struct utmpx in utmpx_entry, but only the
  members we're interested in. Large fields such as hostnames are not
  needed during the execution of the program.
- Give structure members useful names, instead of `name'.
- While there, use struct timevals instead of time_t's internally. This
  is not strictly useful, but while we're at it...
- Mark stuff static.
- Add missing const keywords.
- Remove unneeded prototypes.
- Remove workaround for sparc64-specific utmp problems. These don't
  apply to utmpx.
- Don't discard entries when timestamps are not monotone. This shouldn't
  ever happen with utmpx, but discarding them is a bit too harsh.
- Remove debug code. We nowadays have `getent utmpx', which can be used
  to analyze logfiles in depth.
- Use proper uppercasing/periods in comments.
- Print output of `ac -p' sorted alphabetically, instead of first
  occurrence.
- Properly check against pts/* instead of tty[PQRSpqrs]* to determine
  whether a TTY is a pseudo-terminal.

MFC after:	1 month
2012-08-30 16:45:27 +00:00
..
ac.8 mdoc: correct .Bd/.Bl arguments. 2012-03-26 21:22:53 +00:00
ac.c Massively refactor ac(8). 2012-08-30 16:45:27 +00:00
Makefile Massively refactor ac(8). 2012-08-30 16:45:27 +00:00