Deleted Added
full compact
ac.c (206095) ac.c (216227)
1/*
2 * Copyright (c) 1994 Christopher G. Demetriou.
3 * @(#)Copyright (c) 1994, Simon J. Gerraty.
4 *
5 * This is free software. It comes with NO WARRANTY.
6 * Permission to use, modify and distribute this source code
7 * is granted subject to the following conditions.
8 * 1/ that the above copyright notice and this notice
9 * are preserved in all copies and that due credit be given
10 * to the author.
11 * 2/ that any changes to this code are clearly commented
12 * as such so that the author does not get blamed for bugs
13 * other than his own.
14 */
15
16#include <sys/cdefs.h>
1/*
2 * Copyright (c) 1994 Christopher G. Demetriou.
3 * @(#)Copyright (c) 1994, Simon J. Gerraty.
4 *
5 * This is free software. It comes with NO WARRANTY.
6 * Permission to use, modify and distribute this source code
7 * is granted subject to the following conditions.
8 * 1/ that the above copyright notice and this notice
9 * are preserved in all copies and that due credit be given
10 * to the author.
11 * 2/ that any changes to this code are clearly commented
12 * as such so that the author does not get blamed for bugs
13 * other than his own.
14 */
15
16#include <sys/cdefs.h>
17__FBSDID("$FreeBSD: head/usr.sbin/ac/ac.c 206095 2010-04-02 14:30:56Z ed $");
17__FBSDID("$FreeBSD: head/usr.sbin/ac/ac.c 216227 2010-12-06 10:24:06Z kevlo $");
18
19#include <sys/types.h>
20#include <sys/time.h>
21#include <err.h>
22#include <errno.h>
23#include <langinfo.h>
24#include <locale.h>
25#include <stdio.h>

--- 553 unchanged lines hidden (view full) ---

579 head = log_out(head, usr);
580 break;
581 }
582 }
583 endutxent();
584 if (!(Flags & AC_W))
585 usht.ut_tv.tv_sec = time(NULL);
586 else
18
19#include <sys/types.h>
20#include <sys/time.h>
21#include <err.h>
22#include <errno.h>
23#include <langinfo.h>
24#include <locale.h>
25#include <stdio.h>

--- 553 unchanged lines hidden (view full) ---

579 head = log_out(head, usr);
580 break;
581 }
582 }
583 endutxent();
584 if (!(Flags & AC_W))
585 usht.ut_tv.tv_sec = time(NULL);
586 else
587 usht.ut_tv.tv_sec = ut_timecopy;;
587 usht.ut_tv.tv_sec = ut_timecopy;
588 usht.ut_type = SHUTDOWN_TIME;
589
590 if (Flags & AC_D) {
591 ltm = localtime(&ut_timecopy);
592 if (day >= 0 && day != ltm->tm_yday) {
593 /*
594 * print yesterday's total
595 */

--- 41 unchanged lines hidden ---
588 usht.ut_type = SHUTDOWN_TIME;
589
590 if (Flags & AC_D) {
591 ltm = localtime(&ut_timecopy);
592 if (day >= 0 && day != ltm->tm_yday) {
593 /*
594 * print yesterday's total
595 */

--- 41 unchanged lines hidden ---