1: # include   "../ingres.h"
   2: # include   "../aux.h"
   3: # include   "../unix.h"
   4: # include   "../symbol.h"
   5: # include   "../tree.h"
   6: # include   "../batch.h"
   7: # include   "../pipes.h"
   8: # include   "ovqp.h"
   9: 
  10: int     Batchupd;
  11: struct pipfrmt  Inpipe, Outpipe;
  12: 
  13: main(argc, argv)
  14: int argc;
  15: char    **argv;
  16: {
  17:     register int    i;
  18:     register char   execid;
  19:     register char   funcid;
  20:     extern      proc_error();
  21: 
  22: #	ifdef xOTR1
  23:     tTrace(&argc, argv, 'O');
  24: #	endif
  25:     initproc("OVQP", argv);
  26:     R_decomp = R_down;
  27:     W_decomp = W_down;
  28:     Batchupd = setflag(argv, 'b', 1);
  29:     acc_init(); /* init access methods */
  30: 
  31:     setexit();
  32: 
  33:     for (;;)
  34:     {
  35: 
  36:         /* copy the message from parser to decomp */
  37:         rdpipe(P_PRIME, &Inpipe);
  38:         execid = rdpipe(P_EXECID, &Inpipe, R_up);
  39:         funcid = rdpipe(P_FUNCID, &Inpipe, R_up);
  40:         wrpipe(P_PRIME, &Outpipe, execid, 0, funcid);
  41:         copypipes(&Inpipe, R_up, &Outpipe, W_down);
  42: 
  43:         /* do decomp to ovqp processing */
  44:         if (execid == EXEC_DECOMP)
  45:         {
  46:             rdpipe(P_PRIME, &Inpipe);
  47:             execid = rdpipe(P_EXECID, &Inpipe, R_down);
  48:             funcid = rdpipe(P_FUNCID, &Inpipe, R_down);
  49:             if (execid == EXEC_OVQP)
  50:             {
  51:                 ovqp();
  52:                 flush();
  53:             }
  54:         }
  55: 
  56:         /* finish ovqp msg -or- do dbu return stuff */
  57:         copyreturn();
  58:     }
  59: }
  60: 
  61: 
  62: 
  63: rubproc()
  64: {
  65:     extern int  Equel;
  66:     struct pipfrmt  pipebuf;
  67: 
  68:     /* all relations must be closed before decomp
  69: 	** potentially destroys any temporaries
  70: 	*/
  71:     if (Bopen)
  72:     {
  73:         rmbatch();  /* remove the unfinished batch file */
  74:         Bopen = FALSE;
  75:     }
  76:     closeall();
  77:     unlall();   /* remove any outstanding locks */
  78: 
  79:     /* if equel then clear equel data pipe */
  80:     if (Equel)
  81:         wrpipe(P_INT, &pipebuf, W_front);
  82:     resyncpipes();
  83: 
  84:     flush();
  85: }

Defined functions

main defined in line 13; never used
rubproc defined in line 63; never used

Defined variables

Batchupd defined in line 10; used 1 times
  • in line 28
Inpipe defined in line 11; used 11 times
Outpipe defined in line 11; used 6 times
Last modified: 1995-02-07
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 3157
Valid CSS Valid XHTML 1.0 Strict