Date: Sun, 21 Mar 2010 21:25:35 +0000 (UTC) From: Edwin Groothuis <edwin@FreeBSD.org> To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r205426 - user/edwin/ncal Message-ID: <201003212125.o2LLPZvJ020088@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: edwin Date: Sun Mar 21 21:25:35 2010 New Revision: 205426 URL: http://svn.freebsd.org/changeset/base/205426 Log: On advice of Alexander, use -N and -C to specify the ncal and cal mode. Also add -3 -A and -B to the usage(). Modified: user/edwin/ncal/ncal.1 user/edwin/ncal/ncal.c Modified: user/edwin/ncal/ncal.1 ============================================================================== --- user/edwin/ncal/ncal.1 Sun Mar 21 21:03:35 2010 (r205425) +++ user/edwin/ncal/ncal.1 Sun Mar 21 21:25:35 2010 (r205426) @@ -60,6 +60,10 @@ .Op Fl A Ar number .Op Fl B Ar number .Op Ar year +.Nm ncal +.Op Fl CN +.Op Fl H Ar yyyy-mm-dd +.Op Fl d Ar yyyy-mm .Sh DESCRIPTION The .Nm @@ -127,8 +131,14 @@ of months after the current month. Display the .Ar number of months before the current month. -.It Fl b -Switch to backwards compatibility mode (for debugging). +.It Fl C +Switch to +.Nm cal +mode. +.It Fl N +Switch to +.Nm ncal +mode. .It Fl d Ar yyyy-mm Use .Ar yyyy-mm Modified: user/edwin/ncal/ncal.c ============================================================================== --- user/edwin/ncal/ncal.c Sun Mar 21 21:03:35 2010 (r205425) +++ user/edwin/ncal/ncal.c Sun Mar 21 21:25:35 2010 (r205426) @@ -256,7 +256,7 @@ main(int argc, char *argv[]) before = after = -1; - while ((ch = getopt(argc, argv, "A:B:3Jbd:eH:hjm:ops:wy")) != -1) + while ((ch = getopt(argc, argv, "3A:B:Cd:eH:hjJm:Nops:wy")) != -1) switch (ch) { case '3': flag_3months = 1; @@ -283,9 +283,12 @@ main(int argc, char *argv[]) nswitch = ndaysj(&never); flag_julian_cal = 1; break; - case 'b': + case 'C': flag_backward = 1; break; + case 'N': + flag_backward = 0; + break; case 'd': flag_today = optarg; break; @@ -500,11 +503,12 @@ usage(void) { fputs( - "usage: cal [-hjy] [[month] year]\n" - " cal [-hj] [-m month] [year]\n" - " ncal [-hJjpwy] [-s country_code] [[month] year]\n" - " ncal [-hJeo] [year]\n" - "for debug the highlighting: [-b] [-H yyyy-mm-dd] [-d yyyy-mm]\n", +"Usage: cal [general options] [-hjy] [[month] year]\n" +" cal [general options] [-hj] [-m month] [year]\n" +" ncal [general options] [-hJjpwy] [-s country_code] [[month] year]\n" +" ncal [general options] [-hJeo] [year]\n" +"General options: [-NC3] [-A months] [-B months]\n" +"For debug the highlighting: [-H yyyy-mm-dd] [-d yyyy-mm]\n", stderr); exit(EX_USAGE); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201003212125.o2LLPZvJ020088>