/* --------------------------------------------------- */
/* Header-file BASIS 1.0, (C) Wabnig Harald, 25.5.2002 */
/* --------------------------------------------------- */

#ifndef TREE_INCLUDE
#define TREE_INCLUDE

/* Default-Cache-Size (if none is given in ltmeminit) for Tree-Structures */
#define DEFTREEMAX	100

#include "liste.h"

typedef struct tree_el * Tree;
typedef struct tree_el {
  int		key;
  void		*info;
  Tree		left,right;
} tree_typ;

extern void ltmeminit(int);
extern void ltinit(Tree *);
extern void Make_Tree(Tree **);

extern int ltempty(Tree);
extern int ltnumber(Tree);

extern int ltsearch(Tree, int, void **);
extern int ltinsert(Tree *, int, void *);
extern int ltdelete(Tree *, int);
extern int ltchange(Tree *, int, void *);
extern void ltfree(Tree *);
extern void ltfreeall(Tree *);

extern void ltdump(Tree, List *);
extern void ltdumpunsort(Tree, List *);
extern void ltdumpkeys(Tree, List *);
extern void ltdumpunsortkeys(Tree, List *);

#endif
