GRASS Programmer's Manual
6.5.svn(2014)-r66266
Main Page
Related Pages
Namespaces
Data Structures
Files
File List
Globals
GRASS Programmer's Manual
GRASS GIS 6 Programmer's Manual
GRASS wxPython-based GUI
GRASS cluster analysis statistics Library
GRASS DBMI DataBase Management Interface
GRASS Display Library
GRASS Grid3D raster volume Library
GRASS GIS Library
GRASS Numerical math interface
GRASS partial differential equations Library (GPDE)
GRASS Imagery Library
GRASS Nviz Library
GRASS openGL gsurf OGSF Library
GRASS and the PROJ4 projection library
GRASS Python Scripting Library
GRASS Raster Graphics Library
GRASS Segment Library
Directed Graph Library
GRASS Network Analysis Library
GRASS 6 Vector Architecture
GRASS Vedit Library
Todo List
Bug List
Namespaces
Data Structures
Files
File List
Globals
•
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Pages
create.c
Go to the documentation of this file.
1
#include <stdio.h>
2
#include <stdlib.h>
3
#include <grass/btree.h>
4
5
int
btree_create
(BTREE * B,
int
(*cmp) (
const
void
*,
const
void
*),
int
incr)
6
{
7
if
(incr <= 0)
8
incr = 1;
9
10
B->N = 0;
11
B->cur = 0;
12
B->tlen = B->incr = incr;
13
14
/* must have at least 2 nodes, since node[0] is never used */
15
if
(B->tlen == 1)
16
B->tlen = 2;
17
18
B->cmp = cmp;
19
B->node = (BTREE_NODE *)
malloc
(B->tlen *
sizeof
(BTREE_NODE));
20
if
(B->node ==
NULL
)
21
return
0;
22
return
1;
23
}
malloc
void * malloc(YYSIZE_T)
NULL
return NULL
Definition:
dbfopen.c:1394
btree_create
int btree_create(BTREE *B, int(*cmp)(const void *, const void *), int incr)
Definition:
create.c:5
lib
btree
create.c
Generated on Sat Jan 2 2016 01:46:47 for GRASS Programmer's Manual by
1.8.5