/* header file for standard tree functions 
   file:  /home/walker/c/prog-mgmt/bst-proc.h
*/

/* list operations utilize node definition */
#include "node.h"  

void addName(struct node ** rootPtr, char * name);
/* pre-condition:  rootPtr points to the pointer designating the root of a tree
  post-condition:  a name is read and inserted  into the binary search tree
*/

int countNodes (struct node * root);
/* pre-condition:  root designates the root of the tree 
  post-condition:  the number of items on the list is counted and returned
                   the tree itself is unchanged
*/

void deleteName(struct node ** roottPtr, char * name);
/* pre-condition:  rootPtr points to the pointer designating the root of a tree
  post-condition:  a name is read and that name is deleted from the tree
*/

int find (struct node * root, char * item);
/* pre-condition:  root designates the root of the tree 
                   item designates a data element (string)
  post-condition:  true is returned if the item is in the tree;
                   false is returned otherwise
                   the tree itself is unchanged
*/

void print(struct node * root, int level);
/* pre-condition:  root designates the root of the tree
  post-condition:  The items on the list are printed using an in-order traversal
                   printed items are indented according to their level
                   the tree itself is unchanged
*/

void printLeaves (struct node * root);
/* pre-condition:  root designates the root of the tree
  post-condition:  the leaves on the tree are printed; 
                   the tree itself is unchanged
*/
