diff --git a/docs/rbtree.txt b/docs/rbtree.txt index dc7ee17..02173a2 100644 --- a/docs/rbtree.txt +++ b/docs/rbtree.txt @@ -22,7 +22,8 @@ Data structures ~~~~~~~~~~~~~~~ * `rbnode` - ++ +-- The binary tree node. `key`:: @@ -30,18 +31,20 @@ The binary tree node. `data`:: pointer to the data associated with the key - + `child`:: pointers to the left and right child to this node `color`:: the color, should be a value of `RB_BLACK` or `RB_RED` +-- ++++ ++++ * `rbtree` - ++ +-- Structure that holds a tree of nodes `root`:: @@ -59,6 +62,7 @@ NOTE: You may only need this if you store the data in another structure and has `cmp_fn`:: Pointer to the function that is used to compare `rbnode->data` pointers. + Shall return a value greater than zero if 'ptr1' > 'ptr2', a value less than zero if 'ptr1' < 'ptr2' and zero if 'ptr1' == 'ptr2'. +-- Functions ~~~~~~~~~