[Pvfs2-cvs] commit by aching in pvfs2-1/src/common/itree: itree.h
CVS commit program
cvs at parl.clemson.edu
Sat Feb 10 23:06:39 EST 2007
Update of /projects/cvsroot/pvfs2-1/src/common/itree
In directory parlweb1:/tmp/cvs-serv9410
Modified Files:
Tag: version-lock-actual-branch
itree.h
Log Message:
Added node count information to the level printing.
Index: itree.h
===================================================================
RCS file: /projects/cvsroot/pvfs2-1/src/common/itree/Attic/itree.h,v
diff -p -u -r1.1.2.2 -r1.1.2.3
--- itree.h 31 Jan 2007 05:15:54 -0000 1.1.2.2
+++ itree.h 11 Feb 2007 04:06:39 -0000 1.1.2.3
@@ -518,7 +518,7 @@ static inline itree_qnode * itree_qnode_
static inline void itree_breadth_print(itree_t *head_p,
itree_t *NIL)
{
- int old_level = -1;
+ int old_level = -1, count = 0;
itree_qnode *q_head_p = NULL;
itree_qnode *q_pop_p = NULL;
fprintf(stdout, "\nitree_breadth_print:");
@@ -547,8 +547,9 @@ static inline void itree_breadth_print(i
q_pop_p->itree_p->max,
(q_pop_p->itree_p->color == ITREE_RED ? "r": "b"));
free(q_pop_p);
+ count++;
}
- fprintf(stdout, "\n\n");
+ fprintf(stdout, "\n%d total nodes\n\n", count);
}
/* itree_breadth_print_fn - Debugging function to print out
@@ -558,7 +559,7 @@ static inline void itree_breadth_print_f
itree_t *NIL,
void (*print_fn) (itree_t *))
{
- int old_level = -1;
+ int old_level = -1, count = 0;
itree_qnode *q_head_p = NULL;
itree_qnode *q_pop_p = NULL;
fprintf(stdout, "\nitree_breadth_print:");
@@ -584,8 +585,9 @@ static inline void itree_breadth_print_f
print_fn(q_pop_p->itree_p);
free(q_pop_p);
+ count++;
}
- fprintf(stdout, "\n\n");
+ fprintf(stdout, "\n%d total nodes\n\n", count);
}
/* itree_inorder_tree_print - Debugging function to print out all nodes of
More information about the Pvfs2-cvs
mailing list