Index: /trunk/ippTools/src/Makefile.am
===================================================================
--- /trunk/ippTools/src/Makefile.am	(revision 14493)
+++ /trunk/ippTools/src/Makefile.am	(revision 14494)
@@ -14,4 +14,5 @@
 	warptool \
 	pzgetimfiles \
+	ttree \
 	pztool 
 
@@ -65,4 +66,10 @@
 # for pxtools.h
 AM_CPPFLAGS = -I$(top_srcdir)/src$
+
+
+ttree_CFLAGS = $(PSLIB_CFLAGS) $(PSMODULES_CFLAGS) $(IPPDB_CFLAGS) 
+ttree_LDADD = $(PSLIB_LIBS) $(PSMODULES_LIBS) $(IPPDB_LIBS) libpxtools.la
+ttree_SOURCES = \
+    ttree.c 
 
 pztool_CFLAGS = $(PSLIB_CFLAGS) $(PSMODULES_CFLAGS) $(IPPDB_CFLAGS) 
Index: /trunk/ippTools/src/pxtree.c
===================================================================
--- /trunk/ippTools/src/pxtree.c	(revision 14493)
+++ /trunk/ippTools/src/pxtree.c	(revision 14494)
@@ -57,2 +57,39 @@
     return node;
 }
+
+
+void pxNodePrint(FILE *stream, pxNode *node)
+{
+    fprintf(stream, "node name: %s\n", node->name);
+    fprintf(stream, "node parent's name: %s\n", node->parent
+                                              ?  node->parent->name
+                                              : NULL);
+    psListIterator *iter = psListIteratorAlloc(node->children, 0, false);                                          
+    pxNode *child = NULL;
+    while ((child = psListGetAndIncrement(iter))) {
+        fprintf(stream, "node child's name: %s\n", child->name);
+    }
+    psFree(iter);
+}
+
+
+bool pxTreeCrawl(pxNode *node, pxNodeFunc func)
+{
+    // if func() returns false, stop
+    if (!func(node)) {
+        return false;
+    }
+
+    psListIterator *iter = psListIteratorAlloc(node->children, 0, false);                                          
+    pxNode *child = NULL;
+    while ((child = psListGetAndIncrement(iter))) {
+        // if func() returns false, pxTreeCrawl() well return false, and we
+        // should stop
+        if (!pxTreeCrawl(child, func)) {
+            return false;
+        }
+    }
+    psFree(iter);
+
+    return true;
+}
Index: /trunk/ippTools/src/pxtree.h
===================================================================
--- /trunk/ippTools/src/pxtree.h	(revision 14493)
+++ /trunk/ippTools/src/pxtree.h	(revision 14494)
@@ -21,5 +21,9 @@
 #define PXTREE_H 1
 
+#include <stdio.h>
+#include <stdbool.h>
+
 #include <pslib.h>
+
 
 typedef struct pxNode {
@@ -29,8 +33,20 @@
 } pxNode;
 
+typedef bool (*pxNodeFunc)(pxNode *node);
+
 pxNode *pxNodeAlloc(
     const char *name,
     pxNode  *parent
 ) PS_ATTR_MALLOC;
+
+void pxNodePrint(
+    FILE *stream,
+    pxNode  *node
+);
+
+bool pxTreeCrawl(
+    pxNode  *node,
+    pxNodeFunc func
+);
 
 /*
