svn commit: r204812 - user/edwin/ncal

Edwin Groothuis edwin at FreeBSD.org
Sat Mar 6 23:01:11 UTC 2010


Author: edwin
Date: Sat Mar  6 23:01:10 2010
New Revision: 204812
URL: http://svn.freebsd.org/changeset/base/204812

Log:
  Fix the -y option
  In the Julian day format, properly highlight the current day
  Update the manpage with -3, -A and -B

Modified:
  user/edwin/ncal/ncal.1
  user/edwin/ncal/ncal.c
Directory Properties:
  user/edwin/ncal/   (props changed)

Modified: user/edwin/ncal/ncal.1
==============================================================================
--- user/edwin/ncal/ncal.1	Sat Mar  6 22:38:38 2010	(r204811)
+++ user/edwin/ncal/ncal.1	Sat Mar  6 23:01:10 2010	(r204812)
@@ -33,24 +33,32 @@
 .Nd displays a calendar and the date of Easter
 .Sh SYNOPSIS
 .Nm
-.Op Fl hjy
+.Op Fl 3hjy
+.Op Fl A Ar number
+.Op Fl B Ar number
 .Oo
 .Op Ar month
 .Ar year
 .Oc
 .Nm
-.Op Fl hj
+.Op Fl 3hj
+.Op Fl A Ar number
+.Op Fl B Ar number
 .Fl m Ar month
 .Op Ar year
 .Nm ncal
-.Op Fl hjJpwy
+.Op Fl 3hjJpwy
+.Op Fl A Ar number
+.Op Fl B Ar number
 .Op Fl s Ar country_code
 .Oo
 .Op Ar month
 .Ar year
 .Oc
 .Nm ncal
-.Op Fl hJeo
+.Op Fl 3hJeo
+.Op Fl A Ar number
+.Op Fl B Ar number
 .Op Ar year
 .Sh DESCRIPTION
 The

Modified: user/edwin/ncal/ncal.c
==============================================================================
--- user/edwin/ncal/ncal.c	Sat Mar  6 22:38:38 2010	(r204811)
+++ user/edwin/ncal/ncal.c	Sat Mar  6 23:01:10 2010	(r204812)
@@ -369,6 +369,12 @@ main(int argc, char *argv[])
 		usage();
 	}
 
+	if (flag_hole_year) {
+		m = 1;
+		before = 0;
+		after = 11;
+	}
+
 	if (flag_month != NULL) {
 		if (parsemonth(flag_month, &m, &y)) {
 			errx(EX_USAGE,
@@ -723,7 +729,7 @@ mkmonthr(int y, int m, int jd_flag, stru
 				if (jd_flag)
 					dt.d = j - jan1 + 1;
 				else
-					sdateb(j, &dt);
+					sdater(j, &dt);
 				/* separator */
 				mlines->lines[i][k] = ' ';
 				/* the actual text */


More information about the svn-src-user mailing list