btree.h 481 B

12345678910111213141516171819202122232425
  1. #ifndef GRASS_BTREE_H
  2. #define GRASS_BTREE_H
  3. typedef struct
  4. {
  5. void *key;
  6. void *data;
  7. int left;
  8. int right;
  9. } BTREE_NODE;
  10. typedef struct
  11. {
  12. BTREE_NODE *node; /* tree of values */
  13. int tlen; /* allocated tree size */
  14. int N; /* number of actual nodes in tree */
  15. int incr; /* number of nodes to add at a time */
  16. int cur;
  17. int (*cmp) (const void *, const void *); /* routine to compare keys */
  18. } BTREE;
  19. #include <grass/defs/btree.h>
  20. #endif