1: #
   2: /*
   3: **	BTREE.H -- type definitions and constants for B-Tree structures
   4: **
   5: **	Version :
   6: **		@(#)btree.h	8.1	12/31/84
   7: */
   8: 
   9: # include   <ingres.h>
  10: # include   <access.h>
  11: 
  12: # define        RT      0   /* page number of root */
  13: # define        MAXLID      3
  14: # define        MAXPTRS     124 /* maximum number of key/ptr pairs in
  15: 						** an interior node */
  16: # define        MAXLEAVES   82  /* maximum number of tids in a leaf */
  17: # define        BTREE       "_SYSbtree" /* temporary btree file */
  18: # define        LIDSIZE     4
  19: 
  20: typedef struct
  21: {
  22:     long    key[MAXPTRS];
  23:     long    ptr[MAXPTRS];
  24:     char    excess[4];
  25: } Interior; /* BTree interior node */
  26: 
  27: typedef struct
  28: {
  29:     long    prevleaf;
  30:     long    nextleaf;
  31:     int tid_loc[MAXLEAVES];
  32:     int back_ptr[MAXLEAVES];
  33:     long    tid_pos[MAXLEAVES];
  34:     char    excess[4];
  35: } Leaf;     /* BTree leaf node */
  36: 
  37: struct BTreeNode
  38: {
  39:     short           depth;
  40:     long            prevtree;
  41:     long            nexttree;
  42:     TID         prttree;
  43:     char            nodetype;   /* indicates node type */
  44:     int         nelmts;     /* number of elements in a node */
  45:     long            parent;     /* page number of node's parent */
  46:     union
  47:     {
  48:         Interior    intnode;
  49:         Leaf        leafnode;
  50:     } node;
  51: };
  52: 
  53: struct locator
  54: {
  55:     int         offset;     /* offset into array of node values */
  56:     struct BTreeNode    page;       /* page containing information
  57: 						** in node of BTree */
  58:     long            pageno;     /* page number of node */
  59: };
  60: 
  61: long    Prev_lid[MAXLID];
  62: long    Repl_cnt[MAXLID];

Defined variables

Prev_lid defined in line 61; never used
Repl_cnt defined in line 62; never used

Defined struct's

BTreeNode defined in line 37; used 2 times
  • in line 56(2)
locator defined in line 53; never used

Defined macros

BTREE defined in line 17; never used
LIDSIZE defined in line 18; never used
MAXLEAVES defined in line 16; used 3 times
MAXLID defined in line 13; used 2 times
MAXPTRS defined in line 14; used 2 times
RT defined in line 12; never used
Last modified: 1986-04-17
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 744
Valid CSS Valid XHTML 1.0 Strict