Date: Thu, 18 Feb 2010 21:21:54 +0000 (UTC) From: Edwin Groothuis <edwin@FreeBSD.org> To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r204062 - user/edwin/calendar Message-ID: <201002182121.o1ILLs24082031@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201002182121.o1ILLs24082031>