home *** CD-ROM | disk | FTP | other *** search
- #include <stdio.h>
- #include "avl.h"
-
- static void fa(root)
- HEADER *root;
- {
- /* Delete the entire tree pointed to by root. Note that unlike
- * tfree(), this routine is passed a pointer to a HEADER rather
- * than to the memory just below the header.
- */
-
- if(root)
- {
- fa( root->left );
- fa( root->right );
- free(root);
- }
- }
-
- void freeall(root)
- HEADER **root;
- {
- fa(*root);
- *root = NULL;
- }