GRASS GIS 8 Programmer's Manual
8.5.0dev(2024)-602118adcc
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
}
btree.h
btree_rewind
int btree_rewind(BTREE *)
Definition:
btree/rewind.c:3
btree_next
int btree_next(BTREE *, void **, void **)
Definition:
btree/next.c:3
btree_free
int btree_free(BTREE *B)
Definition:
free.c:5
free
void free(void *)
BTREE
Definition:
btree.h:11
BTREE::node
BTREE_NODE * node
Definition:
btree.h:12
lib
btree
free.c
Generated on Mon Nov 18 2024 06:59:52 for GRASS GIS 8 Programmer's Manual by
1.9.1