From: Ethan M. <merritt@u.washington.edu> - 2004-01-07 23:54:51
|
The light dawns. Much that was murky becomes clear. I have traced down the problem, and it is not quite where I thought it would be. It may even be fixable, although I have not yet worked out how to do it. On Tuesday 06 January 2004 00:32, Arnd Baecker wrote: > Marking and pasting (with the middle mouse button) > into a freshly started gnuplot session > only the lines until `plot sin(x)` (inclusive) > are accepted (i.e. pasted) This is because the whole paste buffer is, ummm, buffered. That is, all the text is sitting in one buffer somewhere. Gnuplot starts working through it character by character, and eventually reaches a point at which it knows that a plot will be sent to the x11 terminal driver. It calls X11_init() and at x11.trm line 738 we do =09setvbuf(stdin, (char *) 0, _IONBF, 0); This command changes from buffered to unbuffered input mode, which would be OK, but..... The current buffer contents are thrown away, and you lose all the characters that have not yet been read in and acted upon. So it isn't really a race. It's just that if we are going to switch to unbuffered mode we should first make sure the buffer is empty, or else store it elsewhere for later execution. I don't yet see a trivial way of doing this, but it can probably be done with enough work. --=20 Ethan A Merritt merritt@u.washington.edu Biomolecular Structure Center Box 357742 University of Washington, Seattle, WA 98195 |