History log of /freebsd-10.0-release/usr.bin/calendar/io.c
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 259065 07-Dec-2013 gjb

- Copy stable/10 (r259064) to releng/10.0 as part of the
10.0-RELEASE cycle.
- Update __FreeBSD_version [1]
- Set branch name to -RC1

[1] 10.0-CURRENT __FreeBSD_version value ended at '55', so
start releng/10.0 at '100' so the branch is started with
a value ending in zero.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

# 256281 10-Oct-2013 gjb

Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation


# 255715 19-Sep-2013 db

- calendar uses cpp internally, this diff removes this usage and
substitutes a limited subset cpp processor internally.

PR: src/178463
Approved by: re (gjb)


# 251647 12-Jun-2013 grog

Handle some expression regressions.
Explicitly use GNU cpp for preprocessing.
Remove explicit debugging code.
Change some variable names to be less confusing.
Improve some comments.
Improve indentation.

PR: 162211
168785
MFC after: 2 weeks


# 241737 19-Oct-2012 ed

More -Wmissing-variable-declarations fixes.

In addition to adding `static' where possible:

- bin/date: Move `retval' into extern.h to make it visible to date.c.
- bin/ed: Move globally used variables into ed.h.
- sbin/camcontrol: Move `verbose' into camcontrol.h and fix shadow warnings.
- usr.bin/calendar: Remove unneeded variables.
- usr.bin/chat: Make `line' local instead of global.
- usr.bin/elfdump: Comment out unneeded function.
- usr.bin/rlogin: Use _Noreturn instead of __dead2.
- usr.bin/tset: Pull `Ospeed' into extern.h.
- usr.sbin/mfiutil: Put global variables in mfiutil.h.
- usr.sbin/pkg: Remove unused `os_corres'.
- usr.sbin/quotaon, usr.sbin/repquota: Remove unused `qfname'.


# 227370 08-Nov-2011 grog

Tidy up command line processing:
- Add ? option to optstring.
- Sort options alphabetically.
- Vertical space.

Tidy up usage() function.

Bring man page in sync with source.

Ensure that debug code is only executed with the -d option.

Submitted by: Christiane Yeardley


# 222755 06-Jun-2011 jh

Pass correct size to write(2).

PR: bin/155915
Submitted by: John Levine
MFC after: 2 weeks


# 208826 05-Jun-2010 edwin

Fix memory-leak at the processing of multiple calendars.

Found with: Coverity Prevent(tm)
CID: 7085


# 208825 05-Jun-2010 edwin

Properly check the return value of chdir, even if it is a "this
should not happen" case.

Found with: Coverity Prevent(tm)
CID: 4932


# 207703 06-May-2010 ache

While I am here, add more missing (unsigned char) casts to ctype() macros


# 207701 06-May-2010 ache

Fix recent space skipping:
1) add missing (unsigned char) cast to ctype() macro
2) fix off-by-one error causing last letter always doubled


# 205872 30-Mar-2010 edwin

On request of joel@:

- Remove the 3rd clause of the UC Berkeley copyrighted files.
- For the files added copyrighted by me, move the "All rights
reserved" to the next line.


# 205821 29-Mar-2010 edwin

Long awaited update to the calendar system:

- Repeating events which span multiple years (because of -A, -B or
just the three days before the end of the year).

- Support for lunar events (full moon, new moon) and solar events
(equinox and solstice, chinese new year). Because of this, the
options -U (UTC offset) and -l (longitude) are available to
compensate if reality doesn't match the calculated values.

MFC after: 1 month


# 200628 17-Dec-2009 rse

rewind(3) is already declared to return 'void', so no need for an explicit cast


# 181323 05-Aug-2008 edwin

Move functions which are only locally used into their C files and
make them static.

usage() in calendar.c
event_*() in io.c

PR: bin/118644
Approved by: bde@ (mentor)


# 181322 05-Aug-2008 edwin

style(9)ify usr.bin/calendar

PR: bin/118644
Approved by: bde@ (mentor)
MFC after: 1 week


# 175003 30-Dec-2007 grog

style(9)


# 175002 30-Dec-2007 grog

If we can't open a calendar file, don't guess why. Check the error
return and print a useful message.

Prior to this commit, access problems could give rise to messages that
the file didn't exist.


# 173169 30-Oct-2007 kevlo

Never use getenv("HOME") without checking for NULL and non-zero

Obtained from: OpenBSD


# 170447 09-Jun-2007 grog

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.


# 169343 07-May-2007 dwmalone

ANSIfy function definitions.
Move some extern declarations to a header file.
Remove an unneeded extern declaration for optarg.


# 100811 28-Jul-2002 jmallett

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


# 87628 10-Dec-2001 dwmalone

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.


# 87235 02-Dec-2001 markm

WARNS=2 fixup (mostly. Some are Hard To Fix(tm), so NO_WERROR is set)
Use __FBSDID().
Sort some headers.


# 79452 09-Jul-2001 brian

Fix the type of the NULL arg to execl()

Idea from: Theo de Raadt <deraadt@openbsd.org>


# 74583 21-Mar-2001 ache

Don't attempt to parse %c, use nl_langinfo instead


# 73257 01-Mar-2001 imp

MAXPATHLEN includes the trailing NUL character, so there's no need to add 1
to it for the size of path.


# 55716 10-Jan-2000 obrien

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>


# 50477 27-Aug-1999 peter

$Id$ -> $FreeBSD$


# 40302 13-Oct-1998 des

Missed one in the previous commit.


# 26839 23-Jun-1997 charnier

Use err(3). Abort if strdup() returns NULL.


# 22806 16-Feb-1997 mpp

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.


# 22554 11-Feb-1997 mpp

Fix a couple of typos.

Submitted by: bde


# 22473 09-Feb-1997 mpp

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.


# 22323 06-Feb-1997 mpp

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


# 15723 10-May-1996 ache

Localize even more.
FIx Orthodox Easter calculation
Better debug output


# 15720 10-May-1996 ache

Allow to configure national Easter names.
Speedup my national months/days handling code.


# 15714 10-May-1996 ache

Localize it
Handle Orthodox Eastern
-Wall cleanup


# 15066 05-Apr-1996 mpp

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.


# 13840 02-Feb-1996 wosch

- 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