summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ac/ac.c
Commit message (Collapse)AuthorAgeFilesLines
* Add a check for wtmp records which have invalid values for ut_time. Wtmpgad2004-03-081-12/+64
| | | | | | | | | | | | | | | records with time==0 get "the time of the last valid record", while records where time goes backwards (compared to the previous record) are skipped. Also prints a message saying how many records were changed or skipped due to these checks. Check was inspired by a simpler check in OpenBSD's version. This is all meant to sidestep problems that Tillman Hodgson noticed with 'ac' when running sparc64 with 64-bit time_t's. The real problem is whatever is creating wtmp records with ut_time==0, of course, but I have not yet figured out what is doing that. Reviewed by: no screams from freebsd-sparc64 or bde MFC after: 2 weeks
* Add a debug-statement from NetBSD, and then rework all debug-statementsgad2004-03-081-9/+82
| | | | | | | | | | so the program compiles without errors or warnings when DEBUG is defined on sparc64 with 64-bit time_t's. Also have debug statements include the year when printing records from a different year than 'now'. Also print out a special timestamp in debug statements when ut_time==0. Reviewed by: freebsd-sparc, bde MFC after: 2 weeks
* Minor style(9) fixes. remove a register keyword, correct two indents.gad2004-03-031-3/+3
| | | | Noticed while comparing to OpenBSD version.
* Convert K&R-style routine definitions to C89 style, partially to reducegad2004-03-031-33/+13
| | | | diffs with OpenBSD. This causes no changes to the object produced.
* Remove unused #includes. Eliminate castings by using size_t instead of int.charnier2002-10-171-8/+4
|
* Fix indentation broken in previous __P removal.alfred2002-07-111-14/+14
| | | | Grumbled about by: bde
* de-__P()alfred2002-07-111-13/+13
|
* Fixed some world breakage caused by not updating clients when <timeconv.h>bde2002-07-081-0/+1
| | | | | was split off from <time.h>. This became fatal here when -Werror was reenabled.
* I've been meaning to do this for a while. Add an underscore to thedillon2002-01-191-2/+2
| | | | | | | | time_to_xxx() and xxx_to_time() functions. e.g. _time_to_xxx() instead of time_to_xxx(), to make it more obvious that these are stopgap functions & placemarkers and not meant to create a defacto standard. They will eventually be replaced when a real standard comes out of committee.
* localtime() was being called with an int-pointer due to recent utmpdillon2001-10-291-2/+4
| | | | fixes.
* Fix logic error resulting in incorrect calculation of login timejon2001-08-051-2/+2
| | | | | | PR: bin/4204 Submitted by: Anatoly A. Orehovsky <tolik@www.tomsk.su> MFC after: 4 weeks
* Replace strncpy -> strlcpykris2001-07-241-6/+3
| | | | | Obtained from: OpenBSD MFC after: 1 week
* Constify and set WARNS=2.dd2001-06-241-4/+4
| | | | | Submitted by: Mike Barcroft <mike@q9media.com> Reviewed by: md5(1)
* Use nl_langinfo instead of %Efache2001-03-211-2/+7
|
* Use %Ef instead of hardcoded %b %eache2000-06-221-1/+1
|
* err -> errx for malloc failurecharnier1999-10-121-3/+3
|
* $Id$ -> $FreeBSD$peter1999-08-281-1/+1
|
* Back out previous commit. Allowing `-' as a pseudonym for /dev/stdin issheldonh1999-07-021-14/+6
| | | | | | legacy behaviour inherited from systems that don't have /dev/stdin. Requested by: bde
* Allow the use of `-' as an argument to the -w option so that standardsheldonh1999-06-301-6/+14
| | | | | | | input may be used (e.g. gunzip -c /var/log/wtmp.Jan.gz | ac -w - ). PR: 12467 Submitted by: wollman
* /var/log/wtmp entries for ptys are treated differently in ac, sincephk1998-07-021-3/+3
| | | | | | | | | they may not be logins. The code for determining whether it is a pty entry is broken. PR: 7137 Reviewed by: phk Submitted by: Tom Rush <tarush@mindspring.com>
* Give correct times with old wtmp files.steve1998-05-251-2/+3
| | | | | PR: 4732 Submitted by: Andrew Timonin <tim@pool1.convey.ru>
* Style in rcsid, sort #include.charnier1997-09-011-4/+5
|
* compare return value from getopt against -1 rather than EOF, per the finalimp1997-03-311-2/+2
| | | | posix standard on the topic.
* Revert $FreeBSD$ to $Id$peter1997-02-221-1/+1
|
* Make the long-awaited change from $Id$ to $FreeBSD$jkh1997-01-141-1/+1
| | | | | | | | This will make a number of things easier in the future, as well as (finally!) avoiding the Id-smashing problem which has plagued developers for so long. Boy, I'm glad we're not using sup anymore. This update would have been insane otherwise.
* Add setlocale LC_TIMEache1995-10-261-1/+4
|
* Remove trailing whitespace.rgrimes1995-05-301-19/+19
|
* strncmp use wrong utmp name sizeache1994-11-141-2/+2
| | | | Submitted by: rlz@zeus.id.net
* ac(8) utility, brought over from FreeBSD 1.1.5.dg1994-09-261-0/+557
OpenPOWER on IntegriCloud