void node_update_parents_todo (Node *pos) { #if 0 Node *tnode = node_top (pos); if (node_left (pos) && node_getflag (node_left (pos), F_todo) && !node_getflag (pos, F_temp)) { int status = -1; while (tnode && status) { if (node_getflag (tnode, F_todo)) { status = 1; if (!node_getflag (tnode, F_done)) status = 0; } tnode = node_down (tnode); } tnode = node_left (pos); if (status == 1) { /* all todo nodes were checked */ node_setflag (tnode, F_done, 1); node_update_parents_todo (tnode); } else if (status == 0) { /* one or more todo node were unchecked */ node_setflag (tnode, F_done, 0); node_update_parents_todo (tnode); } } #endif }
/* removes *pos if it is a temporary node, then returns 1 * otherwize returns 0 */ static int remove_temp (Node **pos) { if (node_getflag (*pos, F_temp)) { *pos = node_remove ((*pos)); node_update_parents_todo ((*pos)); docmd(*pos,"tree_changed"); return 1; } return 0; }