1: # include   "../ingres.h"
   2: # include   "../aux.h"
   3: # include   "../pipes.h"
   4: # include   "parser.h"
   5: # include   "../symbol.h"
   6: 
   7: /*
   8: ** CALL_P -- send the buffered command
   9: **	the execid and funcid are given.
  10: */
  11: call_p(qmode, execid)
  12: int qmode;
  13: int execid;
  14: {
  15:     struct pipfrmt      p;
  16:     register struct pipfrmt *pp;
  17:     register int        i;
  18: 
  19:     pp = &p;
  20:     wrpipe(P_PRIME, pp, execid, 0, qmode);
  21:     for (i = 0; i < Pc; i++)
  22:     {
  23: #		ifdef    xPTR2
  24:         tTfp(6, 0, "Pv[%d]=%s\n", i, Pv[i]);
  25: #		endif
  26:         wrpipe(P_NORM, pp, W_down, Pv[i], 0);
  27:     }
  28:     wrpipe(P_END, pp, W_down);
  29:     initp();
  30:     syncdn();
  31: }
  32: 
  33: # define    PARGSIZE    (MAXDOM * 2 + 10)   /* max no of params to dbu */
  34: 
  35: setp(msg)
  36: char    *msg;
  37: {
  38:     register char   *p;
  39:     register char   *s;
  40:     char        *need();
  41: 
  42:     s = msg;
  43:     p = need(Pbuffer, length(s) + 1);
  44:     smove(s, p);
  45: 
  46:     Pv[Pc++] = p;
  47: 
  48:     if (Pc >= PARGSIZE)
  49:         syserr("SETP: oflo args=%d", Pc);
  50: }
  51: 
  52: initp()
  53: {
  54:     extern int  neederr();
  55:     char        *need();
  56: 
  57:     initbuf(Pbuffer, PARBUFSIZ, PBUFOFLO, &neederr);
  58:     Pv = (char **) need(Pbuffer, PARGSIZE * (sizeof(*Pv)));
  59:     Pc = 0;
  60: }

Defined functions

initp defined in line 52; used 4 times
setp defined in line 35; used 66 times

Defined macros

PARGSIZE defined in line 33; used 2 times
Last modified: 1995-02-19
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 2834
Valid CSS Valid XHTML 1.0 Strict