svn commit: r204062 - user/edwin/calendar
Edwin Groothuis
edwin at FreeBSD.org
Thu Feb 18 21:21:55 UTC 2010
Author: edwin
Date: Thu Feb 18 21:21:54 2010
New Revision: 204062
URL: http://svn.freebsd.org/changeset/base/204062
Log:
Fix usage of -l when -U is used.
Document -l and -U
Modified:
user/edwin/calendar/calendar.1
user/edwin/calendar/calendar.c
Modified: user/edwin/calendar/calendar.1
==============================================================================
--- user/edwin/calendar/calendar.1 Thu Feb 18 21:14:29 2010 (r204061)
+++ user/edwin/calendar/calendar.1 Thu Feb 18 21:21:54 2010 (r204062)
@@ -54,6 +54,8 @@
.Ek
.Oc
.Op Fl W Ar num
+.Op Fl U Ar UTF-offset
+.Op Fl l Ar longitude
.Sh DESCRIPTION
The
.Nm
@@ -93,6 +95,12 @@ as the default calendar file.
.Sm on
.Xc
For test purposes only: set date directly to argument values.
+.It Fl l Ar longitude , Fl U Ar UTC-offset
+Only one is needed:
+Perform lunar and solar calculations from this longitude or from
+this UTC offset.
+If neither is specified, the calculations will be based on the
+difference between UTC time and localtime.
.It Fl W Ar num
Print lines from today and the next
.Ar num
Modified: user/edwin/calendar/calendar.c
==============================================================================
--- user/edwin/calendar/calendar.c Thu Feb 18 21:14:29 2010 (r204061)
+++ user/edwin/calendar/calendar.c Thu Feb 18 21:21:54 2010 (r204062)
@@ -174,7 +174,7 @@ main(int argc, char *argv[])
} else if (UTCoffset == UTCOFFSET_NOTSET) {
/* Base on information given */
UTCoffset = eastlongitude / 15;
- } else {
+ } else if (eastlongitude == LONGITUDE_NOTSET) {
/* Base on information given */
eastlongitude = UTCoffset * 15;
}
@@ -218,9 +218,11 @@ static void __dead2
usage(void)
{
- fprintf(stderr, "%s\n%s\n",
+ fprintf(stderr, "%s\n%s\n%s\n",
"usage: calendar [-a] [-A days] [-B days] [-F friday] "
"[-f calendarfile]",
- " [-d] [-t dd[.mm[.year]]] [-W days]");
+ " [-d] [-t dd[.mm[.year]]] [-W days]",
+ " [-U utcoffset] [-l longitude]"
+ );
exit(1);
}
More information about the svn-src-user
mailing list