From 6e3246aab029f1b3724b58e6facd9c184888aa76 Mon Sep 17 00:00:00 2001 From: Sung-Jin Park Date: Tue, 23 Apr 2019 11:41:19 +0900 Subject: [PATCH] headless client: set STDOUT none-buffered Change-Id: Ic3e81db21fd72d0f3d81a88ea7fac74612de8550 Signed-off-by: Sung-Jin Park --- src/samples/headless_client.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/src/samples/headless_client.c b/src/samples/headless_client.c index a00f990..e6f36fb 100644 --- a/src/samples/headless_client.c +++ b/src/samples/headless_client.c @@ -42,7 +42,7 @@ _cb_focus_in(void *data, int type EINA_UNUSED, void *event) app_data_t *client = (app_data_t *)data; Ecore_Wl2_Event_Focus_In *ev = (Ecore_Wl2_Event_Focus_In *)event; - TRACE(""); + TRACE("\n"); /* TODO */ (void) client; @@ -57,7 +57,7 @@ _cb_focus_out(void *data, int type EINA_UNUSED, void *event) app_data_t *client = (app_data_t *)data; Ecore_Wl2_Event_Focus_Out *ev = (Ecore_Wl2_Event_Focus_Out *)event; - TRACE(""); + TRACE("\n"); /* TODO */ (void) client; @@ -72,7 +72,7 @@ _cb_window_show(void *data, int type EINA_UNUSED, void *event) app_data_t *client = (app_data_t *)data; Ecore_Wl2_Event_Window_Show *ev = (Ecore_Wl2_Event_Window_Show *)event; - TRACE(""); + TRACE("\n"); /* TODO */ (void) client; @@ -87,7 +87,7 @@ _cb_window_lower(void *data, int type EINA_UNUSED, void *event) app_data_t *client = (app_data_t *)data; Ecore_Wl2_Event_Window_Lower *ev = (Ecore_Wl2_Event_Window_Lower *)event; - TRACE(""); + TRACE("\n"); /* TODO */ (void) client; @@ -102,7 +102,7 @@ _cb_window_activate(void *data, int type EINA_UNUSED, void *event) app_data_t *client = (app_data_t *)data; Ecore_Wl2_Event_Window_Activate *ev = (Ecore_Wl2_Event_Window_Activate *)event; - TRACE(""); + TRACE("\n"); /* TODO */ (void) client; @@ -117,7 +117,7 @@ _cb_window_deactivate(void *data, int type EINA_UNUSED, void *event) app_data_t *client = (app_data_t *)data; Ecore_Wl2_Event_Window_Deactivate *ev = (Ecore_Wl2_Event_Window_Deactivate *)event; - TRACE(""); + TRACE("\n"); /* TODO */ (void) client; @@ -132,7 +132,7 @@ _cb_key_down(void *data EINA_UNUSED, int type EINA_UNUSED, void *event) app_data_t *client = (app_data_t *)data; Ecore_Event_Key *ev = event; - TRACE(""); + TRACE("\n"); /* TODO */ (void) client; @@ -147,7 +147,7 @@ _cb_key_up(void *data EINA_UNUSED, int type EINA_UNUSED, void *event) app_data_t *client = (app_data_t *)data; Ecore_Event_Key *ev = event; - TRACE(""); + TRACE("\n"); /* TODO */ (void) client; @@ -192,6 +192,8 @@ int main(int argc, char **argv) int x, y, w, h; app_data_t *client = NULL; + setvbuf(stdout, NULL, _IONBF, 0); + client = (app_data_t *)calloc(1, sizeof(app_data_t)); ERROR_CHECK(client, goto shutdown, "Failed to allocate memory for app_data_t"); -- 2.7.4