diff options
author | Leah Neukirchen <leah@vuxu.org> | 2019-06-01 20:49:16 +0200 |
---|---|---|
committer | Leah Neukirchen <leah@vuxu.org> | 2019-06-01 20:49:16 +0200 |
commit | 34a71527e28acaa4e34be42af0fe2333cefca79e (patch) | |
tree | 54eb71ffac2cea8858b233e56c34be87ddacbfb8 /src/usr.bin/calendar/calendar.c | |
parent | e52863add031ba25f58f0ade8128cd4d38937f7e (diff) | |
download | outils-34a71527e28acaa4e34be42af0fe2333cefca79e.tar.gz outils-34a71527e28acaa4e34be42af0fe2333cefca79e.tar.xz outils-34a71527e28acaa4e34be42af0fe2333cefca79e.zip |
cvs update
Diffstat (limited to 'src/usr.bin/calendar/calendar.c')
-rw-r--r-- | src/usr.bin/calendar/calendar.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/usr.bin/calendar/calendar.c b/src/usr.bin/calendar/calendar.c index 547ba08..7886fd3 100644 --- a/src/usr.bin/calendar/calendar.c +++ b/src/usr.bin/calendar/calendar.c @@ -1,4 +1,4 @@ -/* $OpenBSD: calendar.c,v 1.35 2015/12/07 18:46:35 espie Exp $ */ +/* $OpenBSD: calendar.c,v 1.37 2019/02/01 16:22:53 millert Exp $ */ /* * Copyright (c) 1989, 1993, 1994 @@ -57,9 +57,9 @@ int daynames = 0; time_t f_time = 0; int bodun_always = 0; -int f_dayAfter = 0; /* days after current date */ -int f_dayBefore = 0; /* days before current date */ -int f_SetdayAfter = 0; /* calendar invoked with -A */ +int f_dayAfter = 0; /* days after current date */ +int f_dayBefore = 0; /* days before current date */ +int f_Setday = 0; /* calendar invoked with -A or -B */ struct specialev spev[NUMEV]; @@ -100,13 +100,15 @@ main(int argc, char *argv[]) f_dayAfter = strtonum(optarg, 0, INT_MAX, &errstr); if (errstr) errx(1, "-A %s: %s", optarg, errstr); - f_SetdayAfter = 1; + f_Setday = 1; break; case 'B': /* days before current date */ f_dayBefore = strtonum(optarg, 0, INT_MAX, &errstr); if (errstr) errx(1, "-B %s: %s", optarg, errstr); + if (f_dayBefore != 0) + f_Setday = 1; break; case 'w': |