|
From: Ethan M. <merritt@u.washington.edu> - 2003-10-27 20:29:14
|
On Monday 27 October 2003 07:04, 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 =3D TRUE;
> }
> #else
> X11_set_default_font();
> #endif
> X11_set_font("");
> }
>
>
> Does that command have to be there?
Well yes. That is the whole point of the excercise.
The idea is to give X11 a chance to initialize the window data
structure and send back sizing and font information before
proceeding. That way the plot can be laid out correctly.
Daniel J Sebald <dan...@ie...> wrote>
>That is some strange code, however. =20
I will choose to take that as a compliment :-)
>Does anyone know what the basic concept is here?
See above.=20
> Maybe a handshaking scheme is needed. Perhaps x11.trm
Handshaking didn't help. What was needed was an interlock.
I added that to CVS on 23 Oct. You should not (I hope!!) be
seeing problems with Octave any more. If you are then=20
please send me another sample script that generates the
error.
As I previously noted, there is a separate problem with
buffered/unbuffered input streams. Awk is not happy=20
with the unbuffered stream. I don't know why, and I don't
know what other scripting environments might suffer from
the same problem.
--=20
Ethan A Merritt merritt@u.washington.edu
Biomolecular Structure Center Box 357742
University of Washington, Seattle, WA 98195
|