GRASS Programmer's Manual  6.5.svn(2014)-r66266
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
card.c
Go to the documentation of this file.
1 
2 /****************************************************************************
3 * MODULE: R-Tree library
4 *
5 * AUTHOR(S): Antonin Guttman - original code
6 * Daniel Green (green@superliminal.com) - major clean-up
7 * and implementation of bounding spheres
8 *
9 * PURPOSE: Multidimensional index
10 *
11 * COPYRIGHT: (C) 2001 by the GRASS Development Team
12 *
13 * This program is free software under the GNU General Public
14 * License (>=v2). Read the file COPYING that comes with GRASS
15 * for details.
16 *****************************************************************************/
17 
18 #include "index.h"
19 #include "card.h"
20 
23 
24 static int set_max(int *which, int new_max)
25 {
26  if (2 > new_max || new_max > MAXCARD)
27  return 0;
28  *which = new_max;
29  return 1;
30 }
31 
32 int RTreeSetNodeMax(int new_max)
33 {
34  return set_max(&NODECARD, new_max);
35 }
36 int RTreeSetLeafMax(int new_max)
37 {
38  return set_max(&LEAFCARD, new_max);
39 }
40 int RTreeGetNodeMax(void)
41 {
42  return NODECARD;
43 }
44 int RTreeGetLeafMax(void)
45 {
46  return LEAFCARD;
47 }
int RTreeGetLeafMax(void)
Definition: card.c:44
int RTreeGetNodeMax(void)
Definition: card.c:40
int RTreeSetLeafMax(int new_max)
Definition: card.c:36
int RTreeSetNodeMax(int new_max)
Definition: card.c:32
int LEAFCARD
Definition: card.c:22
int NODECARD
Definition: card.c:21
#define MAXCARD
Definition: index.h:54