#include "jsw.h"
#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
#ifndef HEIGHT_LIMIT
#define HEIGHT_LIMIT 64 /* Tallest allowable tree */
free ( tree );
}
-void *jsw_afind ( jsw_atree_t *tree, void *data )
-{
+void *jsw_afind ( jsw_atree_t *tree, void *data) {
jsw_anode_t *it = tree->root;
+ int cmp = 0;
while ( it != tree->nil ) {
- int cmp = tree->cmp ( it->data, data );
+ cmp = tree->cmp(it->data, data);
if ( cmp == 0 )
break;