|
From: Daniel J S. <dan...@ie...> - 2003-10-27 19:48:57
|
Petr Mikulik wrote:
>I'd a look to the patch of June 21 which made the break; even though I don't
>understand it, I've found that commenting out the "X11_waitforinput();" call
>does not produce the forgetting-pipe error:
>
>
> /* Force default font at start of plot */
>#ifdef USE_MOUSE
> /* EAM June 2003 - Flush the set font command through the pipe */
> /* to gnuplot_x11, then wait for it to return the resulting */
> /* font size information (v_char and h_char). */
> if (!default_font_size_known) {
> X11_set_default_font();
> FFLUSH();
> X11_waitforinput();
>^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> default_font_size_known = TRUE;
> }
>#else
> X11_set_default_font();
>#endif
> X11_set_font("");
>}
>
>
>Does that command have to be there?
>
My guess would be "yes" if the size of the font is to be correct
when used in Gnuplot formatting.
That is some strange code, however. Does anyone know what
the basic concept is here? Is this using a single pipe to have
traffic in both directions? If so, I might speculate that x11.trm
is sending information through the pipe then looking to get
something back perhaps grabbing characters that it just sent
into the pipe because gplt_x11 hasn't yet pulled them out.(????)
Maybe a handshaking scheme is needed. Perhaps x11.trm
should send a command through the pipe. The gplt_x11
font command doesn't send stuff immediately but waits for
another special character to be sent. On the other end,
x11.trm first sits waiting for the pipe to be completely empty.
Then it knows that gplt_x11 has received the font command
and is waiting to send something back. x11.trm then sends
the special character. But still that doesn't seem fool proof,
unless there is some way for x11.trm to know the pipe has
grown bigger than the one character it sent, say. That might
be a way of knowing that what is in the pipe came from
gplt_x11 and not its own self.
Dan
--
Dan Sebald
email: daniel . sebald @ ie ee . o rg
URL: ht tp://acer-access.c om/~dsebald @ acer-access.c om/
|