1: #
   2: /*
   3: **	This header file contains the external (global) declarations
   4: **	of variables and structures as well as the manifest constants
   5: **	particular to OVQP.
   6: **
   7: **	By convention global variable identifiers are spelled with
   8: **	an initial capital letter; manifest constants are in caps
   9: **	completely.
  10: **
  11: */
  12: 
  13: 
  14: 
  15: /*
  16: **	Manifest constants
  17: */
  18: 
  19: 
  20: # define    tTFLAG      'O' /* trace flag */
  21: 
  22: # define    LBUFSIZE    850 /* buffer size for holding query list */
  23:                     /* and concat and ascii buffers */
  24: # define    NSIMP       15  /*maximum no. of "simple clauses"
  25: 					 * allowed in Qual list
  26: 					 * (see "strategy" portion) */
  27: # ifndef    STACKSIZ
  28: # define    STACKSIZ    20  /* Stack size for interpreter */
  29: # endif
  30: # define    MAXNODES    (2 * MAXDOM) + 50   /* max nodes in Qvect */
  31: 
  32: /* symbolic values for GETNXT parameter of fcn GET */
  33: # define    CURTUP  0   /* get tuple specified by tid */
  34: # define    NXTTUP  1   /* get next tuple after one specified by tid */
  35: 
  36: 
  37: /* symbolic values for CHECKDUPS param of fcn INSERT */
  38: # define    DUPS    0   /* allow a duplicate tuple to be inserted */
  39: # define    NODUPS  1   /* check for and avoid inserting
  40: 				 * a duplicate (if possible)*/
  41: 
  42: 
  43: # define    TIDTYPE     INT
  44: # define    TIDLEN      4
  45: 
  46: # define    CNTLEN      4   /* counter for aggregate computations */
  47: # define    CNTTYPE     INT /* counter type */
  48: 
  49: # define    ANYLEN      2   /* length for opANY */
  50: # define    ANYTYPE     INT /* type for opANY */
  51: 
  52: /* error codes for errors caused by user query ie. not syserrs */
  53: 
  54: # define    LISTFULL    4100    /* postfix query list full */
  55: # define    BADCONV     4101    /* */
  56: # define    BADUOPC     4102    /* Unary operator not allowed on char fields */
  57: # define    BADMIX      4103    /* can't assign, compare or operate a numberic with a char */
  58: # define    BADSUMC     4104    /* can't sum char domains (aggregate) */
  59: # define    BADAVG      4105    /* can't avg char domains (aggregate) */
  60: # define    STACKOVER   4106    /* interpreter stack overflow */
  61: # define    CBUFULL     4107    /* not enough space for concat or ascii operation */
  62: # define    BADCHAR     4108    /* arithmetic operation on two character fields */
  63: # define    NUMERIC     4109    /* numeric field in a character operator */
  64: # define    FLOATEXCEP  4110    /* floating point exception */
  65: # define    CHARCONVERT 4111    /* bad ascii to numeric conversion */
  66: # define    NODOVFLOW   4112    /* node vector overflow */
  67: # define    BADSECINDX  4199    /* found a 6.0 sec index */
  68: 
  69: # define    cpderef(x)  (*((char **)(x)))
  70: 
  71: char        Outtup[MAXTUP];
  72: char        Intup[MAXTUP];
  73: char        *Origtup;
  74: long        Intid;
  75: long        Uptid;
  76: 
  77: int     Ov_qmode;   /* flag set to indicate mode of tuple disposition */
  78: extern int  Equel;  /* equel flag set by initproc */
  79: 
  80: 
  81: 
  82: int     Bopen;          /* TRUE if batch file is open */
  83: 
  84: struct descriptor   *Scanr,     /* pts to desc of reln to be scanned,
  85: 					 * (i.e. either Srcdesc or Indesc) */
  86:             *Source,    /* 0 if no source for qry, else points to Srcdesc */
  87:             *Result;    /* 0 if no result for qry, else points to Reldesc */
  88: 
  89: 
  90: long        *Counter;   /* cnts "gets" done in OVQP */
  91: char        *Tend;      /* pts to end of data in Outtup */
  92: 
  93: struct symbol   **Tlist,
  94:         **Alist,
  95:         **Qlist,
  96:         **Bylist;
  97: 
  98: int     Newq;           /* flags new user query to OVQP */
  99: long        Lotid, Hitid;       /* lo & hi limits of scan in OVQP */
 100: 
 101: struct stacksym
 102: {
 103:     char    type;
 104:     char    len;
 105:     int value[4];
 106: }   Stack[STACKSIZ];    /* stack for OVQP interpreter */
 107: 
 108: 
 109: int Buflag;     /* flags a batch update situation (Ov_qmode != mdRETR) */
 110: int Targvc;     /* var count in Target list (flags constant Targ. list) */
 111: int Qualvc;     /* var count in Qual list */
 112: int Userqry;    /* flags a query on the users's result rel */
 113: int Retrieve;   /* true is a retrieve, else false */
 114: int Diffrel;    /* true is Source and Result are different */
 115: int Agcount;    /* count of the # of aggregates in the query */
 116: long    Tupsfound;  /* counts # tuples which satified the query */
 117: int R_decomp;   /* file for reading info from decomp */
 118: int W_decomp;   /* file for writing to decomp */
 119: struct symbol   *Qvect [MAXNODES];
 120: int     Qvpointer;

Defined variables

Counter defined in line 90; used 12 times
Diffrel defined in line 114; used 4 times
Hitid defined in line 99; used 6 times
Lotid defined in line 99; used 7 times
Origtup defined in line 73; used 5 times
Qvpointer defined in line 120; used 4 times
Scanr defined in line 84; used 28 times
Stack defined in line 106; used 3 times
Uptid defined in line 75; used 9 times
W_decomp defined in line 118; used 4 times

Defined struct's

Defined macros

ANYLEN defined in line 49; used 1 times
ANYTYPE defined in line 50; used 1 times
BADAVG defined in line 59; used 1 times
BADCHAR defined in line 62; used 1 times
BADCONV defined in line 55; used 1 times
BADMIX defined in line 57; used 1 times
BADSECINDX defined in line 67; used 2 times
BADSUMC defined in line 58; used 1 times
BADUOPC defined in line 56; used 3 times
CBUFULL defined in line 61; used 1 times
CHARCONVERT defined in line 65; used 1 times
CNTLEN defined in line 46; used 1 times
CNTTYPE defined in line 47; used 1 times
CURTUP defined in line 33; used 2 times
DUPS defined in line 38; never used
FLOATEXCEP defined in line 64; used 1 times
MAXNODES defined in line 30; used 4 times
NODUPS defined in line 39; used 2 times
NSIMP defined in line 24; used 1 times
NUMERIC defined in line 63; used 1 times
NXTTUP defined in line 34; used 2 times
STACKOVER defined in line 60; never used
STACKSIZ defined in line 28; used 2 times
TIDLEN defined in line 44; used 3 times
TIDTYPE defined in line 43; used 1 times
tTFLAG defined in line 20; never used

Usage of this include

Last modified: 1995-02-10
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 4279
Valid CSS Valid XHTML 1.0 Strict