+ /* Verify events and todos*/
+#ifdef DEBUG_CALS
+ for (event_t *cur = EVENTS; cur; cur = cur->next) {
+ if (!cur->cal)
+ error("Missing cal in event '%s'", cur->name);
+ if ((cur->next && cur->next->prev != cur) ||
+ (cur->prev && cur->prev->next != cur))
+ error("Broken link in event '%s'", cur->name);
+ }
+ for (todo_t *cur = TODOS; cur; cur = cur->next) {
+ if (!cur->cal)
+ error("Missing cal in todo '%s'", cur->name);
+ if ((cur->next && cur->next->prev != cur) ||
+ (cur->prev && cur->prev->next != cur))
+ error("Broken link in todo '%s'", cur->name);
+ }
+#endif