On Tue, Jul 2, 2013 at 18:13:53 +0100, Jon TURNEY wrote: > On 20/08/2012 01:45, Peter Hutterer wrote: > > From: Nikolai Kondrashov <[email protected]> > > > > Force line buffering for test and test_xi2 to increase interactiveness and > > avoid losing data with non-terminal stdout. This fixes capturing xinput > > test* output into a file. > > > > Signed-off-by: Nikolai Kondrashov > > <[email protected]> > > Signed-off-by: Peter Hutterer > > <[email protected]> > > --- > > src/test.c | 2 ++ > > src/test_xi2.c | 2 ++ > > 2 files changed, 4 insertions(+) > > > > diff --git a/src/test.c b/src/test.c > > index 97305c5..0c95501 100644 > > --- a/src/test.c > > +++ b/src/test.c > > @@ -98,6 +98,8 @@ print_events(Display *dpy) > > { > > XEvent Event; > > > > + setlinebuf(stdout); > > I think this just got pushed, but it seems break building xinput for MinGW > (see [1]) > > It looks like using setvbuf() rather than setlinebuf() should be more > portable. Patch attached. > Or call fflush(stdout) in every loop before sleeping in XNextEvent?
Cheers, Julien _______________________________________________ [email protected]: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
