bin_tree.c - BINary TREE routines
Some simple handy-dandy binary tree routines.
Function
|
add_btree_node
|
Include file
|
BIN_TREE.H
|
Prototype
|
LPBTREE add_btree_node( char *key_str , void *data , int data_size )
|
Remarks
|
Allocate and initialize a binary tree node. If data_size != 0 then allocate
a buffer and copy the void *data_ptr into it. And the new node for linking
into the tree.
|
Function
|
add_2_binary_tree
|
Include file
|
BIN_TREE.H
|
Prototype
|
LPBTREE add_2_binary_tree( LPBTREE node , char *key_str , void *data , int data_size )
|
Remarks
|
Add a void *data structure into a binary tree - keyed off of key_str.
|
Function
|
add_ptr_2_binary_tree
|
Include file
|
BIN_TREE.H
|
Prototype
|
LPBTREE add_ptr_2_binary_tree( LPBTREE node , char *key_str , void *data )
|
Remarks
|
Add a new node into a binary tree - keyed off of key_str. And hook the
passed in ptr on to the node.
|
Function
|
find_btree_node
|
Include file
|
BIN_TREE.H
|
Prototype
|
LPBTREE find_btree_node( LPBTREE node , char *key_str )
|
Remarks
|
Find and return the btree node for key_str.
|
Function
|
print_btree_node
|
Include file
|
BIN_TREE.H
|
Prototype
|
void print_btree_node( LPBTREE node )
|
Remarks
|
A simple debug print routine. Suitable for calling from walk_binary_tree().
|
Function
|
walk_binary_tree
|
Include file
|
BIN_TREE.H
|
Prototype
|
void walk_binary_tree( LPBTREE node , FPTR process_routine )
|
Remarks
|
Visit all nodes of a binary tree and call the process_routine with each one.
|
Table of Contents
Function Index
generated on 22 September 1998 - 12:54:32
© 1998 Tierra del Fuego Ltd.
|