1: # include   "../pipes.h"
   2: 
   3: /*
   4: **  COPY PIPES
   5: **
   6: **	Copys pipe 'fromd' to pipe 'tod' using pipe buffers 'fromb'
   7: **	and 'tob'.
   8: **
   9: **	Neither pipe is primed or otherwise set up.  The end of pipe
  10: **	is copied.
  11: */
  12: 
  13: copypipes(fromb1, fromd, tob1, tod)
  14: struct pipfrmt  *fromb1, *tob1;
  15: int     fromd, tod;
  16: {
  17:     register struct pipfrmt *fromb, *tob;
  18:     register int        i;
  19:     char            buf[120];
  20: 
  21:     fromb = fromb1;
  22:     tob = tob1;
  23: 
  24:     while ((i = rdpipe(P_NORM, fromb, fromd, buf, sizeof buf)) > 0)
  25:         wrpipe(P_NORM, tob, tod, buf, i);
  26:     wrpipe(P_END, tob, tod);
  27: }
Last modified: 1980-12-17
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 1806
Valid CSS Valid XHTML 1.0 Strict