Update of /cvsroot/libsysio/libsysio/include
In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv9079/include
Modified Files:
tree.h
Log Message:
Altered the, so far unused by anyone, enumerate routine to take
an extra argument and pass same to the pre, in, and post callbacks. This,
to allow the caller to pass and maintain context.
Also, the enumerate routine has been re-implemented with a de-recursed
version. Strange that has been done here first since it's badly needed
in other parts of the core and this routine is used nowhere.
Obviously, these changes are not well tested.
Index: tree.h
===================================================================
RCS file: /cvsroot/libsysio/libsysio/include/tree.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -w -b -B -p -r1.2 -r1.3
--- tree.h 19 Apr 2008 19:09:14 -0000 1.2
+++ tree.h 17 Apr 2009 14:54:35 -0000 1.3
@@ -68,8 +68,9 @@ extern struct tree_node *_sysio_tree_del
struct tree_node **rootp,
int (*compar)(const void *,
const void *));
-extern void _sysio_tree_enumerate(const struct tree_node *tn,
- void (*pre)(const struct tree_node *),
- void (*in)(const struct tree_node *),
- void (*post)(const struct tree_node *));
+extern int _sysio_tree_enumerate(const struct tree_node *tn,
+ int (*pre)(const struct tree_node *, void *),
+ int (*in)(const struct tree_node *, void *),
+ int (*post)(const struct tree_node *, void *),
+ void *);
#endif /* !defined(_TREE_H) */
|