/* ET-trees data structure implementation.
Contributed by Pavel Nejedly
- Copyright (C) 2002, 2003, 2004, 2005, 2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2003, 2004, 2005, 2007, 2008 Free Software
+ Foundation, Inc.
This file is part of the libiberty library.
Libiberty is free software; you can redistribute it and/or
if (occ->prev)
{
- m = record_path_before_1 (occ->prev, depth);
+ m = record_path_before_1 (occ->prev, depth);
if (m < mn)
mn = m;
}
if (occ->next)
{
- m = check_path_after_1 (occ->next, depth);
+ m = check_path_after_1 (occ->next, depth);
if (m < mn)
mn = m;
}
record_path_before (occ);
et_check_tree_sanity (occ);
#endif
-
+
while (occ->parent)
{
occ_depth = occ->depth;
et_new_occ (struct et_node *node)
{
struct et_occ *nw;
-
+
if (!et_occurrences)
et_occurrences = create_alloc_pool ("et_occ pool", sizeof (struct et_occ), 300);
- nw = pool_alloc (et_occurrences);
+ nw = (struct et_occ *) pool_alloc (et_occurrences);
nw->of = node;
nw->parent = NULL;
et_new_tree (void *data)
{
struct et_node *nw;
-
+
if (!et_nodes)
et_nodes = create_alloc_pool ("et_node pool", sizeof (struct et_node), 300);
- nw = pool_alloc (et_nodes);
+ nw = (struct et_node *) pool_alloc (et_nodes);
nw->data = data;
nw->father = NULL;
for (r = rmost->next; r->prev; r = r->prev)
continue;
- et_splay (r);
+ et_splay (r);
r->prev->parent = NULL;
p_occ = t->parent_occ;
{
struct et_occ *occ = node->rightmost_occ, *r;
- /* The root of the tree corresponds to the rightmost occurence in the
+ /* The root of the tree corresponds to the rightmost occurrence in the
represented path. */
et_splay (occ);
for (r = occ; r->next; r = r->next)