On Fri, 18 Jul 2003, Marc-Antoine Ruel wrote:
> Sorry for my uncomprehension, but what do you exactly mean by piping? > In the Unix version, you can specify something like this: outputcommand=scs2ascii|enscript --output -|ps2pdf - -|lpr -Ppdf In the code, there's a popen() call (open pipe) which accepts that string as an argument. Anything written to the FILE * that popen() returns will be piped to the stdin or the scs2ascii command. Likewise, the stdout from scs2ascii is piped to stdin of enscript, etc, etc. > If you means redirecting win32 text output to a deamon (another process > and/or another computer), use a named pipe. It's quite simple to use. > GetStdHandle/SetStdHandle does the job if you want to redirect text > output. In C, we need to update a cached value (_stdout) but it's > simple. Look for "Named Pipes" in MSDN Well.. I sort of want to go to another process... really what I want is the operating system to start up a process with the command line that I've given, and send all of my output to that process's stdin, and then likewise for the next program up the chain. But, I'll take a look at that... > > It's always simpler to write than to code :) > Not in Unix... this is much simpler than my explanation was: p = popen(outputcommand, "w"); while (!tn5250_record_is_chain_end(This->rec)) fprintf(p, "%c", tn5250_record_get_byte(This->rec)); pclose(p); _______________________________________________ This is the Linux 5250 Development Project (LINUX5250) mailing list To post a message email: [EMAIL PROTECTED] To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/linux5250 or email: [EMAIL PROTECTED] Before posting, please take a moment to review the archives at http://archive.midrange.com/linux5250.