i'm porting a Linux app on Windows (Visual C++) which use bidirectional pipes.
Is it possible to open a pipe in "r" and "w" mode with pgnuplot?
And how can i do this?
The connection between pgnuplot and wgnuplot is strictly one-way:
pgnuplot sends simulated keystrokes to the wgnuplot window.
Even if all the snow were burnt, ashes would remain.
I've scanned the postings in this newsgroup about piping, and they
allready helped me a lot. I also consulted Hans-Bernhard Broekers
for description of pgnuplot. So thanks up to now.
But now I'm really stuck. Here's my problem:
I'm currently writing some interface program for a measuring system to
display data via wgnuplot. I'm using Borland C++ 4.02 on a W98
Currently I'm sampling all necessary commands in a temporary batch
file. After closing this, I'm using pgnuplot to invoke gnuplot and
have the graph plotted with the "load" command. Up to this everything
works fine. If I would be content just to see the graph flash up for
some ms, the program would finish correctly.
The problem is that I want to pause the program until the user strikes
a key. And this is impossible up to now. The point is: As soon as I
open the pgnuplot-stream, my C-program loses control of the keyboard
completely. So the proposition of the above homepage - insert some
"getchar" -command to wait - simply sends the program into Nirvana. In
fact I have to manually "kill" pgnuplot via taskman to have a clean
I allready confirmed that it is "_popen pgnuplot": A "getchar"
immediately before works fine, one immediately after is a killer. It's
the same for "_pclose" in reverse.
The other possibility would be the "pause" command of gnuplot itself.
But this one is just useless in a Windows environment, because either
a) you use a positive argument. Now you have to wait a predefined
time, no matter what you actually want.
b) you use a negative argument. This makes a large window pop up in
the middle of your plot, asking for confirmation. No go in any cerious
Has anybody seen this before? Any possibility to avoid it?
Thanks in advance.