Windows ginput function [Was: fopen doesn't return when opening a fifo!!]
David Bateman
David.Bateman at motorola.com
Tue Apr 1 07:51:21 CDT 2008
Petr Mikulik wrote:
> They do work correctly. I've tried the Windows binary from the gnuplot's
> Download section, then:
> plot x
> pause mouse any ... now click or hit a key
> show var
>
>
I presume that is a 4.2.3 binary. In any case that is good news.
>> I tried these functions with Michael's MSVC binary using gnuplot 4.2.2
>>
>
> I don't know this binary. Wherefrom have you got it?
>
>
This is the windows binary installer of Octave from sourceforge. This is
what the vast majority of Windows users are installing and it is
pre-packaged with a version of gnuplot. It can be found at
http://sourceforge.net/project/showfiles.php?group_id=2888&package_id=40078
Thinking about the issue of how to get around the lack of mkfifo on
Windows, why can't we use the existing stream that is open to the
gnuplot process to pass the data back from gnuplot to Octave rather than
opening another fifo or chat file? This would mean that the plot_stream
would be opened with popen2 rather than popen and we'd have both an
input and output stream. The major advantage of this is that there is no
loop probing the contents of a chat file under windows that causes
Octave to run at 100% during a ginput operation.
However, one issue I see is that any output that going to the output
stream needs to be read by Octave, where currently it just ends up on
the stdout.. So we'd have to tag the data we want to have gnuplot print
and get accepted by Octave with a tag of some sort, so that we can find
the date we want and throw away the rest.
Also how do we store the input and output plot stream descriptors.. At
the moment there is a single property __plot_stream__ in the figure and
its used for the pipe opened with popen. Do we make that a two element
matrix, or add a new property? What would other backends expect?
I'm tempted to try this modification to Octave out as the advantages
seem to be large for Windows users.
D.
--
David Bateman David.Bateman at motorola.com
Motorola Labs - Paris +33 1 69 35 48 04 (Ph)
Parc Les Algorithmes, Commune de St Aubin +33 6 72 01 06 33 (Mob)
91193 Gif-Sur-Yvette FRANCE +33 1 69 35 77 01 (Fax)
The information contained in this communication has been classified as:
[x] General Business Information
[ ] Motorola Internal Use Only
[ ] Motorola Confidential Proprietary
More information about the Bug-octave
mailing list