Commit Graph

71 Commits

Author SHA1 Message Date
Greg Lehey
f4025ee00f Sort events by date.
Correct long-standing off-by-one error in -W option.

Submitted by: edwin@

Shorten some long lines.  These files are still not completely
style(9) compliant.
2007-06-09 05:54:13 +00:00
David Malone
e4cedda807 ANSIfy function definitions.
Move some extern declarations to a header file.
Remove an unneeded extern declaration for optarg.
2007-05-07 11:18:30 +00:00
Juli Mallett
afb325f75d Search the include path for the argument to -f, to make lives easier for
those of us who want to figure out how old Jim Mock is, but only want to
type 'calendar -f calendar.freebsd'.  This is done in a way that should
be totally backwards compatible with no noticable differences, at all.

Reviewed by:	mux
MFC after:	4 weeks
2002-07-28 13:46:09 +00:00
David Malone
9f5b04e925 Style improvements recommended by Bruce as a follow up to some
of the recent WARNS commits. The idea is:

1) FreeBSD id tags should follow vendor tags.
2) Vendor tags should not be compiled (though copyrights probably should).
3) There should be no blank line between including cdefs and __FBSDIF.
2001-12-10 21:13:08 +00:00
Mark Murray
9e1e9c4421 WARNS=2 fixup (mostly. Some are Hard To Fix(tm), so NO_WERROR is set)
Use __FBSDID().
Sort some headers.
2001-12-02 22:44:14 +00:00
Brian Somers
7bc6d0158f Fix the type of the NULL arg to execl()
Idea from: Theo de Raadt <deraadt@openbsd.org>
2001-07-09 09:24:06 +00:00
Andrey A. Chernov
800f0ffbbe Don't attempt to parse %c, use nl_langinfo instead 2001-03-21 15:41:02 +00:00
Warner Losh
55ff3bf4be MAXPATHLEN includes the trailing NUL character, so there's no need to add 1
to it for the size of path.
2001-03-01 05:47:28 +00:00
David E. O'Brien
fd6fca87b3 Adapt to the new `ccp' now that the traditional-behaving /usr/bin/cpp
script is gone.

PR:		15932
Submitted by:	Jos Backus <Jos.Backus@nl.origin-it.com>
Tested by:	brian, Manfred Antar <mantar@pacbell.net>
2000-01-10 06:24:49 +00:00
Peter Wemm
c3aac50f28 $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
Dag-Erling Smørgrav
450288f508 Missed one in the previous commit. 1998-10-13 15:05:00 +00:00
Philippe Charnier
4d2854f4b5 Use err(3). Abort if strdup() returns NULL. 1997-06-23 06:52:13 +00:00
Mike Pritchard
bb5359e97e Don't call sendmail with "-f root" when run with "-a". This
eliminates the "X-authentication-warning" header line that
has been coming out since I made it so that sendmail is
run totally as the user whose calendar file is currently
being processed.
1997-02-16 18:24:44 +00:00
Mike Pritchard
3cdb4c34f5 Fix a couple of typos.
Submitted by:	bde
1997-02-11 03:45:14 +00:00
Mike Pritchard
fab46a51da Really fix calendar to drop all permissions when
run with "calendar -a".  Also don't ignore the return
values from the setuid/setgid calls.

Thanks to bde for making me this about this.
1997-02-09 07:45:03 +00:00
Mike Pritchard
3b4984d039 Initialize the group list when we switch uids when run as
root with "calendar -a".  Drop all privs when execing other
programs.

Obtained from: OpenBSD
1997-02-06 05:42:49 +00:00
Andrey A. Chernov
9d0a521e31 Localize even more.
FIx Orthodox Easter calculation
Better debug output
1996-05-10 19:31:02 +00:00
Andrey A. Chernov
7f7d4bbe18 Allow to configure national Easter names.
Speedup my national months/days handling code.
1996-05-10 17:32:06 +00:00
Andrey A. Chernov
ab5dc10734 Localize it
Handle Orthodox Eastern
-Wall cleanup
1996-05-10 16:30:22 +00:00
Mike Pritchard
544b5cb2f1 Change calendar to report the actual date for variable day events.
E.g. for Easter, and entries like "04/SunFirst" calendar will
now report:

04/05*	Good Friday (2 days before easter)
04/07*	First Sunday...

instead of:

Easter-2	Good Friday...
04/SunFirst	First Sunday...

I also modified the calendar files to use the variable day format
for a lot of events so that they will be reported correctly.
E.g. U.S. daylight savings time is now listed as:

04/SunFirst	Daylight savings time...

There are still a lot of wrong dates in there for some events
that move from year to year, but I don't have a good calendar handy
right now that I can use for reference.
1996-04-06 01:15:21 +00:00
Wolfram Schneider
c9c822e632 - handle events that move around from year to year, i.e.,
``the last Monday in April'
- handle easter

new options
	-f calendarfile
	-A days
	-B days

Calendar HOME directory ~/.calendar
don't sent mail if ~/.calendar/nomail exist
1996-02-02 06:02:41 +00:00