home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 9 / 09.iso / l / l200 / 6.ddi / LIB / DAPIPE.C < prev    next >
Encoding:
C/C++ Source or Header  |  1986-09-04  |  554 b   |  31 lines

  1. /*    da_pipe(name, len) opens a pipeline    to the named program
  2.  
  3.     Copyright (c) 1983,    1984, 1985 by JMI Software Consultants,    Inc.
  4.  */
  5. #include "acom.h"
  6. #include "host.h"
  7.  
  8. FILE da_pipe(filename, len,    isoutput)
  9.     TEXT *filename;
  10.     INT    len;
  11.     BOOL isoutput;
  12.     {
  13.     INT    n;
  14.  
  15.     if ((n = da_special(filename, YES))    < 0)
  16.         n =    creat(filename,    S_IWRITE);
  17.     if (n >= 0)
  18.         da_autoclos(n);
  19.     return (n);
  20.     }
  21.  
  22. /* da_p_to(name, len) -    open a pipe    for    output
  23. */
  24.  
  25. FILE da_p_to(name, len)
  26.     TEXT *name;
  27.     INT    len;
  28.     {
  29.     return (da_pipe(name, len, YES));
  30.     }
  31.