Subject: Re: Example: Using pipes on WIN32
From: [email-masked]

11 Jun 1998 19:58:03 -0700
Message-ID: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset=windows-1252
Content-Transfer-Encoding: 8bit
To: [email-masked]
Cc: [email-masked]

>   Earnie Boyd ([email-masked])
>   Wed, 10 Jun 1998 05:39:09 -0700 (PDT)
>   
>       
>Hello fellow analysts,
>
>Below is a sample program demonstrating a method for piping in a WIN32
>environment.  This was tested using the Mingw32 toolset.
>
>-----8<-----8<-----8<-----8<-----8<-----8<-----8<-----8<-----8<-----8<-----8<--
>/*
>   testpipe.c
>
>   Example of the use of a pipe in a WIN32 setting.
>
>   Author: Earnie Boyd, (c) 1998
>   No warranties are given, use at your own risk.
>   Permission is granted to use as you wish.
>
>   This program pipes the output of ls to the input of less.  The
>prerequesites
>   of using this program is that you have the executables for both of
>these

Your code makes an appeal to the Microsoft console, and is not the
kind of `pure' Unix-style _popen, _pclose code that you use when
porting.  The semantics of the _popen and _pclose commands of crtdll.dll
indicate that they automatically provide a Unix-style setup in which
_popen launches the application that receives the piped data via its
`stdin'.  I would be much more interested in seeing your version of
the latest slrn piped printer code (from John Davis's site) sending
character data to the lpr.bat published earlier this month on this
forum.

-
For help on using this list (especially unsubscribing), send a message to
"[email-masked]" with one line of text: "help".