version 1.34, 2015/11/21 12:50:58 |
version 1.35, 2015/12/07 18:46:35 |
|
|
|
|
struct passwd *pw; |
struct passwd *pw; |
int doall = 0; |
int doall = 0; |
|
int daynames = 0; |
time_t f_time = 0; |
time_t f_time = 0; |
int bodun_always = 0; |
int bodun_always = 0; |
|
|
|
|
|
|
(void)setlocale(LC_ALL, ""); |
(void)setlocale(LC_ALL, ""); |
|
|
while ((ch = getopt(argc, argv, "abf:t:A:B:-")) != -1) |
while ((ch = getopt(argc, argv, "abwf:t:A:B:-")) != -1) |
switch (ch) { |
switch (ch) { |
case '-': /* backward contemptible */ |
case '-': /* backward contemptible */ |
case 'a': |
case 'a': |
|
|
errx(1, "-B %s: %s", optarg, errstr); |
errx(1, "-B %s: %s", optarg, errstr); |
break; |
break; |
|
|
|
case 'w': |
|
daynames = 1; |
|
break; |
|
|
default: |
default: |
usage(); |
usage(); |
} |
} |
|
|
usage(void) |
usage(void) |
{ |
{ |
(void)fprintf(stderr, |
(void)fprintf(stderr, |
"usage: calendar [-ab] [-A num] [-B num] [-f calendarfile] " |
"usage: calendar [-abw] [-A num] [-B num] [-f calendarfile] " |
"[-t [[[cc]yy]mm]dd]\n"); |
"[-t [[[cc]yy]mm]dd]\n"); |
exit(1); |
exit(1); |
} |
} |