diff options
author | edwin <edwin@FreeBSD.org> | 2010-03-21 21:33:21 +0000 |
---|---|---|
committer | edwin <edwin@FreeBSD.org> | 2010-03-21 21:33:21 +0000 |
commit | 9792f6e953c151c5df861e4c49cf9ed1d3762f38 (patch) | |
tree | 80c16fd52abe3a449fc3567be35758dc7ae6e2f0 /usr.bin/ncal/ncal.c | |
parent | 78363cb37359be16ff42d36fdd2cdf51b9f33ae0 (diff) | |
download | FreeBSD-src-9792f6e953c151c5df861e4c49cf9ed1d3762f38.zip FreeBSD-src-9792f6e953c151c5df861e4c49cf9ed1d3762f38.tar.gz |
Replace -b with -C and -B (as proposed by Alexander).
Add -3, -A and -B to the usage.
Update regression test for the new parameters.
Diffstat (limited to 'usr.bin/ncal/ncal.c')
-rw-r--r-- | usr.bin/ncal/ncal.c | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/usr.bin/ncal/ncal.c b/usr.bin/ncal/ncal.c index 9f077fb..5ab9a21 100644 --- a/usr.bin/ncal/ncal.c +++ b/usr.bin/ncal/ncal.c @@ -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); } |