DragonFlyBSD/src 148ae05usr.bin/calendar parsedata.c io.c

calendar(1): Sync with FreeBSD

New features:
* Support events that 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), solar events (equinox,
  solstice), and 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.
* Implement an internal 'cpp'-like parser to parse the calendars, so no
  longer require the external cpp(1).

Changed behavior:
DragonFly's calendar(1) switched to use the 'calendar.all' file by
default in 9abdd9620822cc1232dc702a76d95ebf133733b5.  This calendar file
always exists.  However, it makes calendar(1) print too much entries,
which I think most users would not need.  So switch to the original
default calendar file, i.e., 'calendar', the same as other BSDs.

The following minor changes were made:
1. In 'calendar.c' and 'io.c', delete the unused 'copyright' variable
   to suppress the compilation warnings.
2. In 'sunpos.c', rename the macro 'MIN(h)' to 'MINUTE(h)' to avoid the
   conflict; meanwhile rename the macro 'SMIN(h)' to 'SMINUTE(h)' for
   better consistency.

More cleanups and improvements to follow.
DeltaFile
+1,118-0usr.bin/calendar/parsedata.c
+366-317usr.bin/calendar/io.c
+51-418usr.bin/calendar/day.c
+453-0usr.bin/calendar/dates.c
+450-0usr.bin/calendar/sunpos.c
+278-0usr.bin/calendar/pom.c
+154-40usr.bin/calendar/calendar.h
+136-47usr.bin/calendar/calendar.c
+168-0usr.bin/calendar/locale.c
+125-0usr.bin/calendar/events.c
+93-24usr.bin/calendar/calendar.1
+23-66usr.bin/calendar/ostern.c
+24-49usr.bin/calendar/paskha.c
+4-4usr.bin/calendar/pathnames.h
+5-1usr.bin/calendar/Makefile
+3,448-96615 files

UnifiedSplitRaw