about summary refs log tree commit diff
path: root/src/usr.bin/calendar
diff options
context:
space:
mode:
Diffstat (limited to 'src/usr.bin/calendar')
-rw-r--r--src/usr.bin/calendar/Makefile7
-rw-r--r--src/usr.bin/calendar/calendars/calendar.history6
-rw-r--r--src/usr.bin/calendar/day.c6
3 files changed, 10 insertions, 9 deletions
diff --git a/src/usr.bin/calendar/Makefile b/src/usr.bin/calendar/Makefile
index ee0950c..6be97aa 100644
--- a/src/usr.bin/calendar/Makefile
+++ b/src/usr.bin/calendar/Makefile
@@ -1,4 +1,4 @@
-#	$OpenBSD: Makefile,v 1.10 2015/10/23 10:33:52 tedu Exp $
+#	$OpenBSD: Makefile,v 1.11 2016/09/11 06:40:57 natano Exp $
 
 PROG=	calendar
 SRCS=   calendar.c io.c day.c pesach.c ostern.c paskha.c
@@ -8,11 +8,10 @@ beforeinstall:
 	${INSTALL} ${INSTALL_COPY} -o ${BINOWN} -g ${BINGRP} -m 444 \
 	    ${.CURDIR}/calendars/calendar.* ${DESTDIR}/usr/share/calendar
 .for lang in ${INTER}
-	@test -d ${DESTDIR}/usr/share/calendar/${lang} || \
-		mkdir ${DESTDIR}/usr/share/calendar/${lang}
+	${INSTALL} -d -o root -g wheel ${DESTDIR}/usr/share/calendar/${lang}
 	${INSTALL} ${INSTALL_COPY} -o ${BINOWN} -g ${BINGRP} -m 444 \
     		${.CURDIR}/calendars/${lang}/calendar.* \
-		${DESTDIR}/usr/share/calendar/${lang}; 
+		${DESTDIR}/usr/share/calendar/${lang}
 .endfor
 
 .include <bsd.prog.mk>
diff --git a/src/usr.bin/calendar/calendars/calendar.history b/src/usr.bin/calendar/calendars/calendar.history
index 70daeb9..88f66bf 100644
--- a/src/usr.bin/calendar/calendars/calendar.history
+++ b/src/usr.bin/calendar/calendars/calendar.history
@@ -1,7 +1,7 @@
 /*
  * History
  *
- * $OpenBSD: calendar.history,v 1.78 2016/02/16 09:08:51 jmc Exp $
+ * $OpenBSD: calendar.history,v 1.79 2016/09/14 14:10:18 jmc Exp $
  */
 
 #ifndef _calendar_history_
@@ -348,8 +348,8 @@
 09/13	British defeat the French at Plains of Abraham near Quebec City, 1759
 09/13	Building of Hadrian's Wall begun, 122
 09/13	Chiang Kai-Shek becomes president of China, 1943
-09/14	The Selective Service Act establishes the first peacetime draft, 1940
-09/15	The Nazi's adopt a new national flag with the swastika, 1935
+09/14	The Selective Service Act establishes the first US peacetime draft, 1940
+09/15	The Nazis adopt a new national flag with the swastika, 1935
 09/16	General Motors is founded, 1908
 09/17	Joshua A. Norton proclaims himself 'Emperor Norton I', 1859
 09/17	Battle of Antietam, 1862
diff --git a/src/usr.bin/calendar/day.c b/src/usr.bin/calendar/day.c
index 7e8da77..a34e785 100644
--- a/src/usr.bin/calendar/day.c
+++ b/src/usr.bin/calendar/day.c
@@ -1,4 +1,4 @@
-/*	$OpenBSD: day.c,v 1.33 2016/07/13 21:32:01 millert Exp $	*/
+/*	$OpenBSD: day.c,v 1.34 2016/09/14 15:09:46 millert Exp $	*/
 
 /*
  * Copyright (c) 1989, 1993, 1994
@@ -543,7 +543,9 @@ isnow(char *endp, int bodun)
 				tdiff = difftime(ttmp, f_time)/ SECSPERDAY;
 				if (tdiff <= offset + f_dayAfter ||
 				    (bodun && tdiff == -1)) {
-					if ((tmtmp.tm_mon == month) &&
+					if (((tmtmp.tm_mon == month) ||
+					     (flags & F_SPECIAL) ||
+					     (interval == WEEKLY)) &&
 					    (tdiff >=  0 ||
 					    (bodun && tdiff == -1))) {
 					if ((tmp = malloc(sizeof(struct match))) == NULL)