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

Defined functions

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