summaryrefslogtreecommitdiff
path: root/src/test.c
diff options
context:
space:
mode:
authorNikolai Kondrashov <spbnick@gmail.com>2012-08-17 13:29:10 +0300
committerPeter Hutterer <peter.hutterer@who-t.net>2012-08-20 10:44:34 +1000
commitbcfa9123b41da8048450ed27aaeffff17b8eee99 (patch)
tree399251bbc0251409df1a6d6d9773a6a538c39cf6 /src/test.c
parent9071787a1d22b256c5871897f9421ba6ea2f4f76 (diff)
Increase interactiveness of test* output
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 <spbnick@gmail.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'src/test.c')
-rw-r--r--src/test.c2
1 files changed, 2 insertions, 0 deletions
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);
+
while(1) {
XNextEvent(dpy, &Event);