Re: pipestream, 5th attempt

2001-11-08 Thread Andre Poenitz
On Thu, Nov 08, 2001 at 12:50:53PM +0100, Jean-Marc Lasgouttes wrote: > > "Andre" == Andre Poenitz <[EMAIL PROTECTED]> writes: > > Works well with compaq cxx 6.2 in strict_ansi mode. If I switch to > 'super fussy' mode, I get: > > cxx: Info: pipestream.C, line 158: conversion to integral typ

Re: pipestream, 5th attempt

2001-11-08 Thread Jean-Marc Lasgouttes
> "Andre" == Andre Poenitz <[EMAIL PROTECTED]> writes: Works well with compaq cxx 6.2 in strict_ansi mode. If I switch to 'super fussy' mode, I get: cxx: Info: pipestream.C, line 158: conversion to integral type of smaller size could lose data int_type rval = ::read(sock_,

Re: pipestream, 5th attempt

2001-11-07 Thread Andre Poenitz
On Wed, Nov 07, 2001 at 10:30:31AM +0100, Lars Gullik Bjønnes wrote: > How hard would it be to have > > pipestream(char const * const cmd); > > as the signature, and split it into arguments inside the create > method? Not really hard, but we can't use arguments with spaces then or we wo

Re: pipestream, 5th attempt

2001-11-06 Thread Andre Poenitz
On Tue, Nov 06, 2001 at 09:22:58PM +0100, Lars Gullik Bjønnes wrote: > | class pipestream : public std::iostream { > | public: > | /// constructor taking the external command as argument > | explicit pipestream(char const * const cmd[]); > | /// constructor taking the external command

Re: pipestream, 4th attempt

2001-11-06 Thread John Levon
On Tue, Nov 06, 2001 at 06:16:20PM +0100, Andre Poenitz wrote: > The problem is probably to find the right executable... man execvp - we should reasonably expect the prog to be on the path. I don't see why we need /bin/sh, and it's definitely a bad idea ... john -- "The Internet is a shallow

Re: pipestream, 4th attempt

2001-11-06 Thread Andre Poenitz
On Tue, Nov 06, 2001 at 06:10:48PM +0100, Lars Gullik Bjønnes wrote: > but: > > | pipebuf * pipebuf_create(const char * cmd) > | { > | // child closes sockets[1] and uses sockets[0] > | // parent closes sockets[0] and uses sockets[1] > | int sockets[2]; > | if (::socketpair(AF_UN

Re: pipestream

2001-11-06 Thread Andre Poenitz
On Tue, Nov 06, 2001 at 05:06:44PM +, John Levon wrote: > > Actually I like this variant using unix sockets a lot better... > > pipes are unidir so you need two... > > > > With unix sockets you only need one. > > so why does it use socketpair ? Did I mention that I've never seen sockets bef

Re: pipestream

2001-11-06 Thread John Levon
On Tue, Nov 06, 2001 at 06:02:33PM +0100, Lars Gullik Bjønnes wrote: > Actually I like this variant using unix sockets a lot better... > pipes are unidir so you need two... > > With unix sockets you only need one. so why does it use socketpair ? john -- "The Internet is a shallow and unrelia

Re: pipestream

2001-11-06 Thread Andre Poenitz
On Tue, Nov 06, 2001 at 04:03:34PM +, John Levon wrote: > On Tue, Nov 06, 2001 at 11:50:57AM +0100, Andre Poenitz wrote: > > > PS: Btw, I am now using yesterday's pipestream in my own (2.95 based) > > project and it is really cute... I got rid of most of the "system > > interface" stuff ;-) >

Re: pipestream

2001-11-06 Thread John Levon
On Tue, Nov 06, 2001 at 11:50:57AM +0100, Andre Poenitz wrote: > PS: Btw, I am now using yesterday's pipestream in my own (2.95 based) > project and it is really cute... I got rid of most of the "system > interface" stuff ;-) why is it using sockets instead of child-parent pipes ? how do I get s

Re: pipestream, third attempt

2001-11-06 Thread Jose Abilio Oliveira Matos
On Tue, Nov 06, 2001 at 04:21:40PM +0100, Andre Poenitz wrote: > On Tue, Nov 06, 2001 at 02:07:36PM +, Jose Abilio Oliveira Matos wrote: > > pipestream.C: In constructor pipestream::pipestream(const char*)': > > pipestream.C:263: class pipestream' does not have any field named ios' > > pipestr

Re: pipestream, third attempt

2001-11-06 Thread Andre Poenitz
On Tue, Nov 06, 2001 at 02:07:36PM +, Jose Abilio Oliveira Matos wrote: > pipestream.C: In constructor pipestream::pipestream(const char*)': > pipestream.C:263: class pipestream' does not have any field named ios' > pipestream.C:264: no matching function for call to Ok, and what happens if yo

Re: pipestream, third attempt

2001-11-06 Thread Jose Abilio Oliveira Matos
On Tue, Nov 06, 2001 at 01:47:16PM +0100, Andre Poenitz wrote: > > Could people with compiler != g++ 2.95 please try the attached > version? > > Andre' > > -- > André Pönitz .. [EMAIL PROTECTED] I get [14:03][jamatos@novalis:~]$g++ -c pipestream.C

Re: pipestream

2001-11-06 Thread Andre Poenitz
On Mon, Nov 05, 2001 at 07:57:47PM +0100, Lars Gullik Bjønnes wrote: > | So either we provide two pipestream implementations (one for "old g++" > | and one for "Standard C++") or we have to leave it. Forcing efverybody to > | upgrade is certainly not an option... > > You have seen the DebugStream

Re: pipestream

2001-11-05 Thread Andre Poenitz
On Mon, Nov 05, 2001 at 06:31:51PM +0100, Jean-Marc Lasgouttes wrote: > I tried a bit with compaq cxx and did not get very far. After a few > standard things about 'to std:: or not to std::', I get to these core > errors. I really do not know where xsetflags (for example) is supposed > to live. O