From: Ethan M. <merritt@u.washington.edu> - 2004-01-08 07:59:38
|
On Wednesday 07 January 2004 15:54, Ethan Merritt wrote: > > 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 ... Trivial indeed. I was focused on the "or else", but in fact the first alternative is the easy one. The buffer is empty=20 when the program starts, so I moved the call to setvbuf() out of X11_init() and put it right at the start of plot.c where the other I/O streams are being initialized. The X11 paste buffer is now working, and piping through awk now works too. I left the call to setvbuf() protected by #ifdef X11 but I doubt that it needs to be. Are any non-X11 platforms also suffering lost characters in the input stream? =20 --=20 Ethan A Merritt merritt@u.washington.edu Biomolecular Structure Center Box 357742 University of Washington, Seattle, WA 98195 |