ibtree.h 650 B

12345678910111213141516171819202122232425262728
  1. typedef struct
  2. {
  3. int key;
  4. int data;
  5. int left;
  6. int right;
  7. } IBTREE_NODE;
  8. typedef struct
  9. {
  10. IBTREE_NODE *node; /* tree of values */
  11. int tlen; /* allocated tree size */
  12. int N; /* number of actual nodes in tree */
  13. int incr; /* number of nodes to add at a time */
  14. int cur;
  15. int (*cmp) (); /* routine to compare keys */
  16. } IBTREE;
  17. int ibtree_create(IBTREE *, int (*)(), int);
  18. int ibtree_find(IBTREE *, int, int *);
  19. int ibtree_free(IBTREE *);
  20. int ibtree_next(IBTREE *, int *, int *);
  21. int ibtree_rewind(IBTREE *);
  22. int Btree_init();
  23. int Btree_add(int);
  24. int Btree_report();
  25. int ibtree_update(IBTREE *, int, int);