chiark / gitweb /
delta: draw arrows with draw_special_char()
[elogind.git] / src / shared / calendarspec.c
index 7979e2384f53014e105d173519c60acb9a3ac6a9..69b742723295c5df91c03464fd70593d6bd97612 100644 (file)
@@ -686,6 +686,23 @@ int calendar_spec_from_string(const char *p, CalendarSpec **spec) {
                 if (r < 0)
                         goto fail;
 
+        } else if (strcaseeq(p, "anually") || strcaseeq(p, "yearly")) {
+                r = const_chain(1, &c->month);
+                if (r < 0)
+                        goto fail;
+                r = const_chain(1, &c->day);
+                if (r < 0)
+                        goto fail;
+                r = const_chain(0, &c->hour);
+                if (r < 0)
+                        goto fail;
+                r = const_chain(0, &c->minute);
+                if (r < 0)
+                        goto fail;
+                r = const_chain(0, &c->second);
+                if (r < 0)
+                        goto fail;
+
         } else if (strcaseeq(p, "weekly")) {
 
                 c->weekdays_bits = 1;
@@ -921,7 +938,6 @@ int calendar_spec_next_usec(const CalendarSpec *spec, usec_t usec, usec_t *next)
         if (t == (time_t) -1)
                 return -EINVAL;
 
-
         *next = (usec_t) t * USEC_PER_SEC;
         return 0;
 }