1: #
   2: /*
   3: **	COPYRIGHT
   4: **
   5: **	The Regents of the University of California
   6: **
   7: **	1977
   8: **
   9: **	This program material is the property of the
  10: **	Regents of the University of California and
  11: **	may not be reproduced or disclosed without
  12: **	the prior written permission of the owner.
  13: */
  14: 
  15: 
  16: 
  17: # define    PARBUFSIZ   2000    /* size of buffer for dbu commands */
  18: # define    TREEMAX     2500    /* max number of bytes for tree */
  19: # define    MAXATT      150 /* max number of attributes in the att stash */
  20: 
  21: /* mode parameters for range table manipulation */
  22: # define    LOOKREL     1
  23: # define    LOOKVAR     2
  24: # define    R_INTERNAL  3
  25: # define    R_EXTERNAL  4
  26: 
  27: /* error numbers */
  28: # define    TREEOFLO    2118    /* over flow tree buffer */
  29: # define    PBUFOFLO    2106    /* over flow dbu arg buffer */
  30: 
  31: # define    NOATTRIN    2100    /* attrib not in relation */
  32: # define    CANTUPDATE  2107    /* can't update rel */
  33: # define    NOVBLE      2109    /* vble not declared */
  34: # define    NOPATMAT    2120    /* no pattern matching in tl */
  35: # define    RNGEXIST    2117    /* can't find rel for var */
  36: # define    REPALL      2123    /* x.all on replace */
  37: # define    BADCONSTOP  2134    /* bad constant operator */
  38: 
  39: # define    INDEXTRA    2111    /* too many atts in key */
  40: # define    RESXTRA     2130    /* too many resdoms in tl */
  41: # define    TARGXTRA    2131    /* tl larger than MAXTUP */
  42: # define    AGGXTRA     2132    /* too many aggs */
  43: 
  44: # define    MODTYPE     2119    /* type conflict for MOD */
  45: # define    CONCATTYPE  2121    /* type conflict for CONCAT */
  46: # define    AVGTYPE     2125    /* type conflict for AVG(U) */
  47: # define    SUMTYPE     2126    /* type conflict for SUM(U) */
  48: # define    FOPTYPE     2127    /* type conflict for func ops */
  49: # define    UOPTYPE     2128    /* type conflict for unary ops */
  50: # define    NUMTYPE     2129    /* type conflict for numeric ops */
  51: # define    RELTYPE     2133    /* type conflict for relatv op */
  52: 
  53: # define    RESTYPE     2103    /* result type mismatch w/expr */
  54: # define    RESAPPEX    2108    /* append res rel not exist */
  55: # define    RESEXIST    2135    /* result rel already exists */
  56: 
  57: # define    NXTCMDERR   2501    /* misspelt where problem */
  58: # define    NOQRYMOD    2139    /* no qrymod in database */
  59: 
  60: # define    BADHOURS    2136    /* no such hour */
  61: # define    BADMINS     2137    /* no such minute */
  62: # define    BAD24TIME   2138    /* only 24:00 can be used */
  63: 
  64: /* -- ASSORTED DATA STRUCTURES -- */
  65: struct atstash                  /* attribute table */
  66: {
  67:     char        atbid;          /* attribute number */
  68:     char        atbfrmt;        /* attribute form type */
  69:     char        atbfrml;        /* attribute form length */
  70:     char        atbname[MAXNAME];   /* attribute name */
  71:     struct atstash  *atbnext;       /* pointer to next entry in chain */
  72: };
  73: 
  74: struct rngtab               /* range table */
  75: {
  76:     int     rentno;         /* variable number of this table position */
  77:     char        rmark;          /* was it used in this command */
  78:     char        ractiv;         /* is entry empty */
  79:     int     rposit;         /* lru position of entry */
  80:     char        varname[MAXNAME + 1];   /* variable name */
  81:     char        relnm[MAXNAME + 1]; /* relation name */
  82:     char        relnowner[2];       /* relation owner */
  83:     int     rstat;          /* relstat field of relation relation */
  84:     int     ratts;          /* number of attributes in relation */
  85:     struct atstash  *attlist;       /* head of attrib list for this reln */
  86: };
  87: 
  88: struct constop              /* constant operator lookup table */
  89: {
  90:     char    *copname;       /* string name for identification */
  91:     int copnum;         /* op number */
  92:     char    coptype;        /* op result type for formating */
  93:     char    coplen;         /* op result length for formatting */
  94: };
  95: 
  96: struct rngtab       Rngtab[MAXVAR + 1]; /* range table */
  97: struct rngtab       *Resrng;    /* ptr to result reln entry */
  98: struct atstash      Attable[MAXATT];    /* attrib stash space, turned into a list later */
  99: struct atstash      *Freeatt;   /* free list of attrib stash */
 100: struct querytree    *Tidnode;   /* pointer to tid node of targ list
 101: 					   for REPLACE, DELETE */
 102: struct querytree    *Lastree;   /* pointer to root node of tree */
 103: struct descriptor   Reldesc;    /* descriptor for range table lookup */
 104: struct descriptor   Desc;       /* descriptor for attribute relation */
 105: extern struct atstash   Faketid;    /* atstash structure for TID node */
 106: #ifdef  DISTRIB
 107: extern struct atstash   Fakesid;    /* atstash structure for SID node */
 108: #endif
 109: 
 110: int         Rsdmno;     /* result domain number */
 111: int         Opflag;     /* operator flag contains query mode */
 112: char            *Relspec;   /* ptr to storage structure of result relation */
 113: char            *Indexspec; /* ptr to stor strctr of index */
 114: char            *Indexname; /* ptr to name of index */
 115: char            Trfrmt;     /* format for type checking */
 116: char            Trfrml;     /* format length for type checking */
 117: char            *Trname;    /* pointer to attribute name */
 118: int         Agflag;     /* how many aggs in this qry */
 119: int         Equel;      /* indicates EQUEL preprocessor on */
 120: int         Ingerr;     /* set if a query returns an error from processes below */
 121: int         Patflag;    /* signals a pattern match reduction */
 122: int         Qlflag;     /* set when processing a qual */
 123: int         Noupdt;     /* INGRES user override of no update restriction */
 124: extern int      yypflag;    /* disable action stmts if = 0 */
 125: int         yyline;     /* line counter */
 126: struct retcode      *Lastcnt;   /* ptr to last tuple count, or 0 */
 127: struct retcode      Lastcsp;    /* space for last tuple count */
 128: int         Dcase;      /* default case mapping */
 129: char            **Pv;       /* ptr to list of dbu params */
 130: char            Pbuffer[PARBUFSIZ]; /* buffer for dbu commands */
 131: int         Pc;     /* number of dbu commands */
 132: char            *Qbuf;      /* buffer which holds tree allocated on stack in main.c to get data space */
 133: int         Permcomd;
 134: int         Qrymod;     /* qrymod on in database flag */

Defined variables

Agflag defined in line 118; used 2 times
Attable defined in line 98; used 2 times
Freeatt defined in line 99; used 8 times
Indexspec defined in line 113; used 6 times
Lastcnt defined in line 126; used 6 times
Lastcsp defined in line 127; used 2 times
Pbuffer defined in line 130; used 3 times
Pc defined in line 131; used 6 times
Pv defined in line 129; used 8 times
Reldesc defined in line 103; used 10 times
Relspec defined in line 112; used 6 times
Rngtab defined in line 96; used 10 times
Tidnode defined in line 100; used 3 times
Trfrml defined in line 116; used 25 times
yyline defined in line 125; used 1 times

Defined struct's

atstash defined in line 65; used 66 times
constop defined in line 88; used 8 times
rngtab defined in line 74; used 62 times

Defined macros

AGGXTRA defined in line 42; used 1 times
AVGTYPE defined in line 46; used 1 times
BAD24TIME defined in line 62; used 1 times
BADCONSTOP defined in line 37; used 1 times
BADHOURS defined in line 60; used 1 times
BADMINS defined in line 61; used 1 times
CANTUPDATE defined in line 32; used 1 times
CONCATTYPE defined in line 45; used 1 times
FOPTYPE defined in line 48; used 2 times
INDEXTRA defined in line 39; used 1 times
MAXATT defined in line 19; used 2 times
MODTYPE defined in line 44; used 1 times
NOATTRIN defined in line 31; used 3 times
NOPATMAT defined in line 34; used 1 times
NOQRYMOD defined in line 58; used 8 times
NOVBLE defined in line 33; used 3 times
NUMTYPE defined in line 50; used 2 times
NXTCMDERR defined in line 57; used 1 times
PARBUFSIZ defined in line 17; used 2 times
PBUFOFLO defined in line 29; used 1 times
RELTYPE defined in line 51; used 1 times
REPALL defined in line 36; used 1 times
RESAPPEX defined in line 54; used 1 times
RESEXIST defined in line 55; used 1 times
RESTYPE defined in line 53; used 1 times
RESXTRA defined in line 40; used 1 times
RNGEXIST defined in line 35; used 1 times
SUMTYPE defined in line 47; used 1 times
TARGXTRA defined in line 41; never used
TREEOFLO defined in line 28; used 1 times
UOPTYPE defined in line 49; used 1 times

Usage of this include

Last modified: 1980-12-17
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 4412
Valid CSS Valid XHTML 1.0 Strict