/*}}}*/ void mark_all_descendents(struct node *n)/*{{{*/ { struct node *y; for (y = n->kids.next; y != (struct node *) &n->kids; y = y->chain.next) { y->flag = 1; if (has_kids(y)) { mark_all_descendents(y); } } }
/*}}}*/ void clear_flags(struct links *x)/*{{{*/ { struct node *y; for (y = x->next; y != (struct node *) x; y = y->chain.next) { y->flag = 0; if (has_kids(y)) { clear_flags(&y->kids); } } }
/*}}}*/ static void undo_descendents(struct node *y)/*{{{*/ { struct node *c; for (c = y->kids.next; c != (struct node *) &y->kids; c = c->chain.next) { c->done = 0; if (has_kids(c)) { undo_descendents(c); } } }
/*}}}*/ static void mark_done_from_bottom_up(struct links *x, time_t done_time)/*{{{*/ { struct node *y; for (y = x->next; y != (struct node *) x; y = y->chain.next) { if (has_kids(y)) { mark_done_from_bottom_up(&y->kids, done_time); } if (y->flag) { if (has_open_child(y)) { fprintf(stderr, "Cannot mark %s done, it has open sub-tasks\n", y->scratch); } else { y->done = done_time; } } } }