1: # include   "../ingres.h"
   2: # include   "../aux.h"
   3: # include   "../symbol.h"
   4: # include   "../pipes.h"
   5: # include   "decomp.h"
   6: # include   "../unix.h"
   7: 
   8: # define    tTFLAG  'D'
   9: 
  10: struct pipfrmt  Inpipe, Outpipe;
  11: 
  12: int     Batchupd;
  13: 
  14: main(argc,argv)
  15: int argc;
  16: char    *argv[];
  17: {
  18:     register int    i;
  19:     register char   exec_id, func_id;
  20: 
  21:     tTrace(&argc, argv, tTFLAG);
  22: 
  23:     initproc("DECOMP", argv);
  24: 
  25:     Batchupd = setflag(argv, 'b', 1);
  26: 
  27:     acc_init();
  28: 
  29:     R_ovqp = R_up;
  30:     W_ovqp = W_up;
  31:     R_dbu = R_down;
  32:     W_dbu = W_down;
  33: 
  34:     /*
  35: 	** Do the necessary decomp initialization. This includes
  36: 	** buffering standard output (if i/d system) and giving
  37: 	** access methods more pages (if i/d system).
  38: 	** init_decomp is defined in either call_ovqp or call_ovqp70.
  39: 	*/
  40:     init_decomp();
  41: 
  42:     setexit();
  43: 
  44:     for (;;)
  45:     {
  46:         rdpipe(P_PRIME, &Inpipe);
  47:         exec_id = rdpipe(P_EXECID, &Inpipe, R_up);
  48:         func_id = rdpipe(P_FUNCID, &Inpipe, R_up);
  49:         if (exec_id == EXEC_DECOMP)
  50:         {
  51:             qryproc();
  52:             continue;
  53:         }
  54: 
  55:         /* copy pipes on down */
  56:         wrpipe(P_PRIME, &Outpipe, exec_id, 0, func_id);
  57:         copypipes(&Inpipe, R_up, &Outpipe, W_down);
  58: 
  59:         /* read response and send eop back up to parser */
  60:         writeback(-1);
  61:     }
  62: 
  63: }
  64: 
  65: /*
  66: **  RUBPROC -- process a rubout signal
  67: **
  68: **	Called from the principle rubout catching routine
  69: **	when a rubout is to be processed. Notice that rubproc
  70: **	must return to its caller and not call reset itself.
  71: **
  72: **	Parameters:
  73: **		none
  74: **
  75: **	Returns:
  76: **		none
  77: **
  78: **	Side Effects:
  79: **		reinitializes the state of the world.
  80: **
  81: **	Called By:
  82: **		rubcatch
  83: */
  84: 
  85: 
  86: rubproc()
  87: {
  88:     struct pipfrmt  pipebuf;
  89:     extern int  Equel;
  90: 
  91:     /*
  92: 	** Sync with equel if we have the equel pipe.
  93: 	**	This can happen only if ovqp and decomp
  94: 	**	are combined.
  95: 	*/
  96:     if (W_front >= 0 && Equel)
  97:         wrpipe(P_INT, &pipebuf, W_front);
  98: 
  99:     flush();
 100:     resyncpipes();
 101:     endovqp(RUBACK);
 102:     reinit();
 103:     return;
 104: }

Defined functions

main defined in line 14; never used
rubproc defined in line 86; never used

Defined variables

Batchupd defined in line 12; used 1 times
  • in line 25
Inpipe defined in line 10; used 4 times
Outpipe defined in line 10; used 2 times

Defined macros

tTFLAG defined in line 8; used 1 times
  • in line 21
Last modified: 1980-12-17
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 2906
Valid CSS Valid XHTML 1.0 Strict