History log of /freebsd-current/usr.bin/calendar/calendar.h
Revision Date Author Comments
# b3e76948 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

Remove $FreeBSD$: two-line .h pattern

Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/


# 0357fa26 05-Nov-2020 Stefan Eßer <se@FreeBSD.org>

Restrict locale settings to the file they occur in

This prevents LANG= in an included file from affecting the interpretation
of month and day names in the including file.

Make the internal pre-processor accept white space between the "#" at
the start of the line and the keyword for better compatibility with cpp.

Add support for the cpp keywords #warning and #error.

MFC after: 3 days


# 2ceb17a8 04-Nov-2020 Stefan Eßer <se@FreeBSD.org>

Add regression tests for conditions and comments

Fix one case where #else was not corerctly processed and simplify the
conditions logic.

Fix parsing of day and month names in the locale specified in the calendar
file. The previous version would expect those names to match the locale of
the user.

Mention that comments are now correctly processed and that // is supported
in addition to /* ... */.

MFC after: 3 days


# fd1efedc 02-Mar-2020 Conrad Meyer <cem@FreeBSD.org>

Add extremely useful calendar(1) application to FreeBSD

It does extremely useful things like execute sendmail and spew dubiously
accurate factoids.

From the feedback, it seems like it is an essential utility in a modern unix
and not at all a useless bikeshed. How do those Linux people live without it?
Reverts r358561.


# 3c565de3 02-Mar-2020 Conrad Meyer <cem@FreeBSD.org>

Fix typo in r278616

FreeBSD isn't an encyclopedia.


# adedf5ee 19-Feb-2019 Baptiste Daroussin <bapt@FreeBSD.org>

calendar: use iconv to respect the output encoding

calendar(1) can have input in various encoding, specifying
LANG=<locale_name> to enable calendar(1) to determine which one to use.

The problem is the content of the calendar itself is exposed as is making it
unreadable in many cases. For example french calendar which is encoded
ISO8859-1 is rendered badly in a fr_FR.UTF-8 environment.

Using iconv allows to solve this issue.
This will also allow to keep only 1 encoding in base for those files without
breaking user existing setup

Reported by: many
MFC after: 1 month
Differential Revision: https://reviews.freebsd.org/D19221


# 8a16b7a1 20-Nov-2017 Pedro F. Giffuni <pfg@FreeBSD.org>

General further adoption of SPDX licensing ID tags.

Mainly focus on files that use BSD 3-Clause license.

The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.

Special thanks to Wind River for providing access to "The Duke of
Highlander" tool: an older (2014) run over FreeBSD tree was useful as a
starting point.


# fbbd9655 28-Feb-2017 Warner Losh <imp@FreeBSD.org>

Renumber copyright clause 4

Renumber cluase 4 to 3, per what everybody else did when BSD granted
them permission to remove clause 3. My insistance on keeping the same
numbering for legal reasons is too pedantic, so give up on that point.

Submitted by: Jan Schaumann <jschauma@stevens.edu>
Pull Request: https://github.com/freebsd/freebsd/pull/96


# e061f95e 04-Mar-2015 Baptiste Daroussin <bapt@FreeBSD.org>

Rework calendar(1) parser

Support includes surrounded by '"' or '<' '>'
Print warnings about bad syntax
Correctly navigate through include directories to find calendar files
Correctly support multiple includes

Tested by: gjb
MFC after: 1 week


# 5d32a871 19-Sep-2013 Diane Bruce <db@FreeBSD.org>

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

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


# 90c72ba9 12-Jun-2013 Greg Lehey <grog@FreeBSD.org>

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


# 11b3cbc2 18-Feb-2011 Sergey A. Osokin <osa@FreeBSD.org>

Replace hard-coded value by Julian2Gregorian converter function.


# f6db4696 25-Dec-2010 Sergey A. Osokin <osa@FreeBSD.org>

Fix typo (Pashka -> Paskha).


# a7d5f7eb 19-Oct-2010 Jamie Gritton <jamie@FreeBSD.org>

A new jail(8) with a configuration file, to replace the work currently done
by /etc/rc.d/jail.


# c31776f0 30-Aug-2010 Edwin Groothuis <edwin@FreeBSD.org>

For calendars which don't match the solar-based Gregorian calendar,
be able to specify a year string in an entry.


# bb06482c 30-Mar-2010 Edwin Groothuis <edwin@FreeBSD.org>

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.


# 2b84020d 29-Mar-2010 Edwin Groothuis <edwin@FreeBSD.org>

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


# fe0506d7 09-Mar-2010 Marcel Moolenaar <marcel@FreeBSD.org>

Create the altix project branch. The altix project will add support
for the SGI Altix 350 to FreeBSD/ia64. The hardware used for porting
is a two-module system, consisting of a base compute module and a
CPU expansion module. SGI's NUMAFlex architecture can be an excellent
platform to test CPU affinity and NUMA-aware features in FreeBSD.


# d7f03759 19-Oct-2008 Ulf Lilleengen <lulf@FreeBSD.org>

- Import the HEAD csup code which is the basis for the cvsmode work.


# 0d724b87 05-Aug-2008 Edwin Groothuis <edwin@FreeBSD.org>

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)


# 35304a16 05-Aug-2008 Edwin Groothuis <edwin@FreeBSD.org>

style(9)ify usr.bin/calendar

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


# f4025ee0 08-Jun-2007 Greg Lehey <grog@FreeBSD.org>

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.


# e4cedda8 07-May-2007 David Malone <dwmalone@FreeBSD.org>

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


# d86c537a 28-May-2004 Stefan Farfeleder <stefanf@FreeBSD.org>

Include <sys/uio.h> for the complete type of struct iovec.

Approved by: das (mentor)


# b20a21a6 13-Jun-2002 Greg Lehey <grog@FreeBSD.org>

Add two new options:

-W is like -A (number of days in the future to consider, but also
specifies that we don't want special treatment at weekends.
-F changes our notion of "Friday" (the day before the weekend).

Arguably, calendar(1) is broken to have special treatment of weekends
by default, but this method maintains POLA.


# f1bb2cd2 21-Mar-2002 Warner Losh <imp@FreeBSD.org>

remove __P


# 9e1e9c44 02-Dec-2001 Mark Murray <markm@FreeBSD.org>

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


# 2c215927 04-May-2000 Alexey Zelkin <phantom@FreeBSD.org>

Add missing $FreeBSD$ tags


# 96846ff6 25-Apr-1999 Warner Losh <imp@FreeBSD.org>

More egcs warning fixes:
o main returns int not void
o use return 0 at end of main when needed
o use braces to avoid potentially ambiguous else
o don't default to type int
o #ifdef 0 -> #if 0

Reviewed by: obrien and chuckr


# 7f7d4bbe 10-May-1996 Andrey A. Chernov <ache@FreeBSD.org>

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


# ab5dc107 10-May-1996 Andrey A. Chernov <ache@FreeBSD.org>

Localize it
Handle Orthodox Eastern
-Wall cleanup


# 544b5cb2 05-Apr-1996 Mike Pritchard <mpp@FreeBSD.org>

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.


# 1d6b2fd7 03-Feb-1996 Wolfram Schneider <wosch@FreeBSD.org>

Submitted by: pst
add forgotten file calendar.h. Sorry.