Author: Arthur Secret, CERN. Public domain. Please mail bugs and changes to www-request@info.cern.ch
part of libWWW
#ifdef SHORT_NAMES #define HTBTree_new HTBTNew #define HTBTree_free HTBTFree #define HTBTreeAndObject_free HTBTAOFr #define HTBTree_add HTBTAdd #define HTBTree_next HTBTNext /* #define HTBTree_object HTBTObje already a macro */ #endif
typedef struct _HTBTree_element { void *object; /* User object */ struct _HTBTree_element *up; struct _HTBTree_element *left; int left_depth; struct _HTBTree_element *right; int right_depth; } HTBTElement; typedef int (*HTComparer) PARAMS((void * a, void * b)); typedef struct _HTBTree_top { HTComparer compare; struct _HTBTree_element *top; } HTBTree;
extern HTBTree * HTBTree_new PARAMS((HTComparer comp));
extern void HTBTree_free PARAMS((HTBTree* tree));
extern void HTBTreeAndObject_free PARAMS((HTBTree* tree));
extern void HTBTree_add PARAMS((HTBTree* tree, void * object));
#define HTBTree_object(element) ((element)->object)
extern HTBTElement * HTBTree_next PARAMS((HTBTree* tree, HTBTElement * ele));end