23 #include <sys/types.h> 75 static unsigned long *
ids = NULL;
82 struct item *k = malloc (
sizeof *k);
112 struct item *p, *q, *
r, *s, *t;
119 if (root->
right == NULL)
129 a =
id < p->
id ? -1 : 1;
261 p = malloc (
sizeof *p);
263 d = malloc(
sizeof *d);
334 if ((*p)->suc == loop)
396 if (root_node->
left == NULL && root_node->
right == NULL)
397 return (*action) (root_node);
400 if (root_node->
left != NULL)
403 if ((*action) (root_node))
405 if (root_node->
right != NULL)
419 if (root_node->
right)
424 struct item *j = NULL;
425 struct item *k = NULL;
427 if(root == NULL) root =
new_item(0);
450 ids = malloc(
sizeof(
unsigned long)*(
n_ids+1));
500 while(items_to_clean) {
503 items_to_clean = items_to_clean->
next;
507 while(succs_to_clean) {
510 succs_to_clean = succs_to_clean->
next;
static unsigned long * ids
static int scan_zeros(struct item *k)
static struct item * root
static int recurse_tree(struct item *root_node, int(*action)(struct item *))
static void walk_tree(struct item *root_node, int(*action)(struct item *))
struct item_cleanup_list * next
static int count_items(struct item *unused)
struct successor * to_clean
static struct item * loop
static struct item_cleanup_list * items_to_clean
static struct succ_cleanup_list * succs_to_clean
struct succ_cleanup_list * next
void add_relation(unsigned long id1, unsigned long id2)
static void record_relation(struct item *j, struct item *k)
static int detect_loop(struct item *k)
unsigned long * get_sorted_ids(void)
static struct item * search_item(unsigned long id)
static struct item * new_item(unsigned long id)
static struct item * head
static struct item * zeros