ports/x11-clocks/xalarm/files/patch-dates.c
Cy Schubert 04b8ff2431 Resurrect xalarm 3.06.
Take on maintainership.
2015-10-25 08:16:49 +00:00

18 lines
481 B
C

--- dates.c.orig Fri Apr 2 09:08:14 2004
+++ dates.c Fri Apr 2 09:17:53 2004
@@ -297,8 +297,13 @@
if (year >= 0) date->tm_year = year;
while ((year < 0) and (date->tm_year < (2500-1900)) and
(DaysBetween (&today, date) < 0))
- if (month < 0)
- date->tm_mon = (date->tm_mon + 1) % 12;
+ if (month < 0) {
+ date->tm_mon++;
+ if (date->tm_mon > 11) {
+ date->tm_mon = 0;
+ date->tm_year++;
+ }
+ }
else
date->tm_year++;
} else