Print output messages to stderr instead of stdout 83/10183/1
authorEduardo Lima (Etrunko) <eduardo.lima@intel.com>
Mon, 23 Sep 2013 20:35:14 +0000 (17:35 -0300)
committerEduardo Lima (Etrunko) <eduardo.lima@intel.com>
Mon, 23 Sep 2013 20:38:33 +0000 (17:38 -0300)
Change-Id: I48f3c470e7e91c53792c1de5d9067f8312aa8bcb
Signed-off-by: Eduardo Lima (Etrunko) <eduardo.lima@intel.com>
packaging/weekeyboard.changes
src/wkb-ibus-config-eet-test.c
src/wkb-ibus-config-eet.c
src/wkb-ibus-test.c
src/wkb-main.c

index 3d229d0..ad11f8b 100644 (file)
@@ -1,3 +1,6 @@
+* Mon Sep 23 2013 Eduardo Lima (Etrunko) <eduardo.lima@intel.com> accepted/tizen/20130918.203201@e8b7d28
+- Print output messages to stderr instead of stdout
+
 * Wed Sep 18 2013 Eduardo Lima (Etrunko) <eduardo.lima@intel.com> upstream/0.0.1@d5a9506
 - Updated package revision
 
index a4f0ced..02cf1a0 100644 (file)
@@ -26,13 +26,13 @@ main (int argc, char *argv[])
 
    if (!eina_init())
      {
-        printf("Error initializing eina");
+        fprintf(stderr,"Error initializing eina");
         return 1;
      }
 
    if (!eet_init())
      {
-        printf("Error initializing eet");
+        fprintf(stderr,"Error initializing eet");
         return 1;
      }
 
index ad9bc5e..11a2746 100644 (file)
@@ -56,7 +56,6 @@ _config_section_set_value(struct _config_section *base, const char *section, con
 {
    return base->set_value(base, section, name, value);
 }
-
 static void *
 _config_section_get_value(struct _config_section *base, const char *section, const char *name)
 {
@@ -920,7 +919,7 @@ wkb_ibus_config_eet_new(const char *path)
 
    if (!(ef = eet_open(path, mode)))
      {
-        printf("Error opening eet file '%s' for %s\n", path, mode == EET_FILE_MODE_READ ? "read" : "write");
+        fprintf(stderr,"Error opening eet file '%s' for %s\n", path, mode == EET_FILE_MODE_READ ? "read" : "write");
         wkb_ibus_config_eet_free(eet);
         return NULL;
      }
@@ -935,7 +934,7 @@ wkb_ibus_config_eet_new(const char *path)
    wkb_ibus_config_eet_set_defaults(eet);
    if (!eet_data_write(ef, eet->ibus_edd, "ibus", eet->ibus_config, EINA_TRUE))
      {
-        printf("Error creating eet file '%s'\n", path);
+        fprintf(stderr,"Error creating eet file '%s'\n", path);
         wkb_ibus_config_eet_free(eet);
         eet = NULL;
      }
index ced4700..742894e 100644 (file)
@@ -25,7 +25,7 @@
 static void
 _finish(int foo)
 {
-   printf("FINISH\n");
+   fprintf(stderr,"FINISH\n");
    wkb_ibus_shutdown();
 }
 
@@ -40,19 +40,19 @@ main (int argc, char *argv[])
 {
    if (!ecore_init())
      {
-        printf("Error initializing ecore");
+        fprintf(stderr,"Error initializing ecore");
         return 1;
      }
 
    if (!eldbus_init())
      {
-        printf("Error initializing eldbus");
+        fprintf(stderr,"Error initializing eldbus");
         return 1;
      }
 
    if (!wkb_ibus_init())
      {
-        printf("Error initializing ibus");
+        fprintf(stderr,"Error initializing ibus");
         return 1;
      }
 
index 953b283..d5f2c1b 100644 (file)
@@ -171,7 +171,7 @@ _cb_wkb_on_key_down(void *data, Evas_Object *obj, const char *emission EINA_UNUS
 
    if (_wkb_ignore_key(wkb, key))
      {
-        printf("Ignoring key '%s'\n", key);
+        fprintf(stderr,"Ignoring key '%s'\n", key);
         goto end;
      }
    else if (strcmp(key, "backspace") == 0)
@@ -197,7 +197,7 @@ _cb_wkb_on_key_down(void *data, Evas_Object *obj, const char *emission EINA_UNUS
         key = " ";
      }
 
-   printf("KEY = '%s'\n", key);
+   fprintf(stderr,"KEY = '%s'\n", key);
 
    _wkb_update_preedit_str(wkb, key);
 
@@ -210,7 +210,7 @@ _wkb_im_ctx_surrounding_text(void *data, struct wl_input_method_context *im_ctx,
 {
    struct weekeyboard *wkb = data;
 
-   printf("%s()\n", __FUNCTION__);
+   fprintf(stderr,"%s()\n", __FUNCTION__);
    free(wkb->surrounding_text);
    wkb->surrounding_text = strdup(text);
    wkb->surrounding_cursor = cursor;
@@ -221,7 +221,7 @@ _wkb_im_ctx_reset(void *data, struct wl_input_method_context *im_ctx)
 {
    struct weekeyboard *wkb = data;
 
-   printf("%s()\n", __FUNCTION__);
+   fprintf(stderr,"%s()\n", __FUNCTION__);
 
    if (strlen(wkb->preedit_str))
      {
@@ -235,7 +235,7 @@ _wkb_im_ctx_content_type(void *data, struct wl_input_method_context *im_ctx, uin
 {
    struct weekeyboard *wkb = data;
 
-   printf("%s(): im_context = %p hint = %d purpose = %d\n", __FUNCTION__, im_ctx, hint, purpose);
+   fprintf(stderr,"%s(): im_context = %p hint = %d purpose = %d\n", __FUNCTION__, im_ctx, hint, purpose);
 
    if (!wkb->context_changed)
       return;
@@ -266,7 +266,7 @@ _wkb_im_ctx_invoke_action(void *data, struct wl_input_method_context *im_ctx, ui
 {
    struct weekeyboard *wkb = data;
 
-   printf("%s()\n", __FUNCTION__);
+   fprintf(stderr,"%s()\n", __FUNCTION__);
    if (button != BTN_LEFT)
       return;
 
@@ -278,7 +278,7 @@ _wkb_im_ctx_commit_state(void *data, struct wl_input_method_context *im_ctx, uin
 {
    struct weekeyboard *wkb = data;
 
-   printf("%s()\n", __FUNCTION__);
+   fprintf(stderr,"%s()\n", __FUNCTION__);
    if (wkb->surrounding_text)
       fprintf(stderr, "Surrounding text updated: %s\n", wkb->surrounding_text);
 
@@ -305,7 +305,7 @@ _wkb_im_ctx_preferred_language(void *data, struct wl_input_method_context *im_ct
    if (language)
      {
         wkb->language = strdup(language);
-        printf("Language changed, new: '%s\n", language);
+        fprintf(stderr,"Language changed, new: '%s\n", language);
      }
 }
 
@@ -406,7 +406,7 @@ _wkb_ui_setup(struct weekeyboard *wkb)
       w = 600;
 
    sprintf(path, PKGDATADIR"/default_%d.edj", w);
-   printf("Loading edje file: '%s'\n", path);
+   fprintf(stderr,"Loading edje file: '%s'\n", path);
 
    if (!edje_object_file_set(wkb->edje_obj, path, "main"))
      {
@@ -454,11 +454,11 @@ _wkb_ui_setup(struct weekeyboard *wkb)
    ignore_keys = edje_file_data_get(path, "ignore-keys");
    if (!ignore_keys)
      {
-        printf("Special keys file not found in '%s'\n", path);
+        fprintf(stderr,"Special keys file not found in '%s'\n", path);
         goto end;
      }
 
-   printf("Got ignore keys = %s\n", ignore_keys);
+   fprintf(stderr,"Got ignore keys = %s\n", ignore_keys);
    wkb->ignore_keys = eina_str_split(ignore_keys, "\n", 0);
    free(ignore_keys);
 
@@ -530,13 +530,13 @@ _wkb_check_evas_engine(struct weekeyboard *wkb)
            env = "wayland_egl";
         else
           {
-             printf("ERROR: Ecore_Evas does must be compiled with support for Wayland engines\n");
+             fprintf(stderr,"ERROR: Ecore_Evas does must be compiled with support for Wayland engines\n");
              goto err;
           }
      }
    else if (strcmp(env, "wayland_shm") != 0 && strcmp(env, "wayland_egl") != 0)
      {
-        printf("ERROR: ECORE_EVAS_ENGINE must be set to either 'wayland_shm' or 'wayland_egl'\n");
+        fprintf(stderr,"ERROR: ECORE_EVAS_ENGINE must be set to either 'wayland_shm' or 'wayland_egl'\n");
         goto err;
      }
 
@@ -565,12 +565,12 @@ main(int argc EINA_UNUSED, char **argv EINA_UNUSED)
    if (!_wkb_check_evas_engine(&wkb))
       goto edj_err;
 
-   printf("SELECTED ENGINE = %s\n", wkb.ee_engine);
+   fprintf(stderr,"SELECTED ENGINE = %s\n", wkb.ee_engine);
    wkb.ee = ecore_evas_new(wkb.ee_engine, 0, 0, 1, 1, "frame=0");
 
    if (!wkb.ee)
      {
-        printf("ERROR: Unable to create Ecore_Evas object\n");
+        fprintf(stderr,"ERROR: Unable to create Ecore_Evas object\n");
         goto edj_err;
      }