1: # include   "../ingres.h"
   2: # include   "../tree.h"
   3: # include   "../symbol.h"
   4: # include   "decomp.h"
   5: 
   6: /*
   7: **	mklist
   8: **
   9: **	writes a list of query tree nodes in "OVQP order" --
  10: **	that is, everything in postfix (endorder) except AND's and OR's
  11: **	infixed (postorder) to OVQP.
  12: **	called by call_ovqp().
  13: */
  14: 
  15: 
  16: 
  17: mklist(tree)
  18: struct querytree *tree;
  19: {
  20:     register int            typ;
  21:     register struct querytree   *t;
  22:     register int            andor;
  23: 
  24:     t = tree;
  25:     if (!t || (typ=t->sym.type)==TREE || typ==QLEND)
  26:         return;
  27: 
  28:     andor=0;
  29:     mklist(t->left);
  30:     if (typ==AND || typ==OR)
  31:     {
  32:         andor = 1;
  33:         ovqpnod(t);
  34:     }
  35:     mklist(t->right);
  36:     if (!andor)
  37:         ovqpnod(t);
  38: }

Defined functions

mklist defined in line 17; used 12 times
Last modified: 1980-12-17
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 2138
Valid CSS Valid XHTML 1.0 Strict