GRASS GIS 7 Programmer's Manual  7.5.svn(2017)-r71793
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
free.c
Go to the documentation of this file.
1 #include <stdlib.h>
2 
3 #include <grass/btree.h>
4 
5 int btree_free(BTREE * B)
6 {
7  void *data, *key;
8 
9  btree_rewind(B);
10  while (btree_next(B, &key, &data)) {
11  free(key);
12  free(data);
13  }
14  free(B->node);
15 
16  return 0;
17 }
void free(void *)
int btree_rewind(BTREE *B)
Definition: btree/rewind.c:3
int btree_free(BTREE *B)
Definition: free.c:5
Definition: btree.h:12
int btree_next(BTREE *B, void **key, void **data)
Definition: btree/next.c:3
BTREE_NODE * node
Definition: btree.h:14