1: /*
   2: **  Definitions for the range table.
   3: **
   4: **	Version:
   5: **		@(#)range.h	8.2	1/15/85
   6: */
   7: 
   8: # ifndef MAXRANGE
   9: 
  10: # define    MAXRANGE    (MAXVAR + 1)
  11: 
  12: 
  13: /*
  14: **	DESCRIPTOR struct
  15: **
  16: **	The DESCRIPTOR struct is initialized by OPENR to describe any
  17: **	open relation.  The first part of the descriptor is the tuple
  18: **	from the RELATION relation.  The remainder contains some magic
  19: **	numbers and a template initialized from the ATTRIBUTE relation.
  20: **
  21: **	This structure also defines the range table.
  22: */
  23: 
  24: struct descriptor
  25: {
  26:     struct relation reldum;
  27:         /*the above part of the descriptor struct is identical
  28: 		  to the relation struct and the inormation in this
  29: 		  part of the struct is read directly from the
  30: 		  relation tuple by openr.  the rest of the descriptor
  31: 		  struct is calculated by openr.  */
  32:     char    relvname[MAXNAME];  /* range variable name */
  33:     i_2 relfp;      /*filep for relation , if open	*/
  34:     i_2 relopn;     /*indicates if relation is really open*/
  35:     tid_type reltid;    /*when relation is open, this indicates
  36: 				  the tid in the relation relation for
  37: 				  this relation */
  38:     i_4 reladds;    /*no. of additions of tuples during this open*/
  39:     i_2 reloff[MAXDOM]; /*reloff[i] is offset to domain i 	*/
  40:     c_1 relfrmt[MAXDOM]; /* format of domain i
  41: 				 ** INT, FLOAT, or CHAR  */
  42:     c_1 relfrml[MAXDOM]; /* relfrml[i] is an unsigned integer
  43: 				  which indicates length
  44: 				  in bytes of domain */
  45:     c_1 relxtra[MAXDOM]; /*relxtra[i] is non-zero if domain i is
  46: 				 ** a key domain for the relation */
  47:     c_1 relgiven[MAXDOM]; /*cleared by openr and set before
  48: 				  call to find to indicate value of this
  49: 				  domain has been supplied in the key*/
  50:     struct descriptor *relbtree;    /* used to store info about
  51: 					secondary btree stucture */
  52:     int btree_fd;   /* contains pointer to btree file */
  53: };
  54: 
  55: typedef struct descriptor   DESC;
  56: 
  57: /*
  58: ** Various modes to openr.
  59: */
  60: # define    OR_READ     0   /* Open relation for reading */
  61: # define    OR_WRITE    2   /* Open relation for writing */
  62: # define    OR_RELTID   -1  /* Only get relation relation
  63: 					** tuple and tid only */
  64: # define    OR_AREAD    -2  /* Open for reading after OR_RELTID */
  65: # define    OR_AWRITE   -3  /* Open for writing after OR_RELTID */
  66: # define    OR_REREAD   -4  /* Open for reading after openr()/closer() */
  67: # define    OR_REWRITE  -5  /* Open for writing after openr()/closer() */
  68: 
  69: 
  70: typedef struct
  71: {
  72:     DESC    *rngvdesc;  /* pointer to descriptor for this var */
  73:     bool    rngvmark;   /* send if marked */
  74: }  RANGEV;
  75: 
  76: 
  77: # endif MAXRANGE

Defined struct's

descriptor defined in line 24; used 4 times

Defined typedef's

DESC defined in line 55; used 1 times
  • in line 72

Defined macros

MAXRANGE defined in line 10; used 1 times
  • in line 8
OR_AREAD defined in line 64; never used
OR_AWRITE defined in line 65; never used
OR_READ defined in line 60; never used
OR_RELTID defined in line 62; never used
OR_REREAD defined in line 66; never used
OR_REWRITE defined in line 67; never used
OR_WRITE defined in line 61; never used
Last modified: 1986-04-17
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 554
Valid CSS Valid XHTML 1.0 Strict