jaehyun pushed a commit to branch master.

http://git.enlightenment.org/tools/enventor.git/commit/?id=86c531cad8e9737aa6fbfb3fd08616be79bcbaf6

commit 86c531cad8e9737aa6fbfb3fd08616be79bcbaf6
Author: Jaehyun Cho <jae_hyun....@samsung.com>
Date:   Tue Jun 14 15:17:43 2016 +0900

    main: Fix workspace path option not to print "TYPE: STR".
    
    ECORE_GETOPT_STORE_METAVAR_STR() prints additional information such as
    "TYPE: STR".
    Not to print "TYPE: STR", ECORE_GETOPT_APPEND_METAVAR() is used for
    workspace path option.
---
 src/bin/main.c | 17 ++++++++++++-----
 1 file changed, 12 insertions(+), 5 deletions(-)

diff --git a/src/bin/main.c b/src/bin/main.c
index ab248e1..ab36829 100644
--- a/src/bin/main.c
+++ b/src/bin/main.c
@@ -243,8 +243,7 @@ args_dispatch(int argc, char **argv,
    Eina_List *fd = NULL;
    Eina_List *sd = NULL;
    Eina_List *dd = NULL;
-
-   char *wd = NULL;
+   Eina_List *wd = NULL;
 
    Eina_Bool quit = EINA_FALSE;
    Eina_Bool help = EINA_FALSE;
@@ -270,7 +269,8 @@ args_dispatch(int argc, char **argv,
                                       "path", ECORE_GETOPT_TYPE_STR),
           ECORE_GETOPT_APPEND_METAVAR('d', "dd", "Data path",
                                       "path", ECORE_GETOPT_TYPE_STR),
-          ECORE_GETOPT_STORE_METAVAR_STR('w', "wd", "Workspace path", "path"),
+          ECORE_GETOPT_APPEND_METAVAR('w', "wd", "Workspace path",
+                                      "path", ECORE_GETOPT_TYPE_STR),
           ECORE_GETOPT_VERSION('v', "version"),
           ECORE_GETOPT_COPYRIGHT('c', "copyright"),
           ECORE_GETOPT_LICENSE('l', "license"),
@@ -285,7 +285,7 @@ args_dispatch(int argc, char **argv,
       ECORE_GETOPT_VALUE_LIST(sd),
       ECORE_GETOPT_VALUE_LIST(fd),
       ECORE_GETOPT_VALUE_LIST(dd),
-      ECORE_GETOPT_VALUE_STR(wd),
+      ECORE_GETOPT_VALUE_LIST(wd),
       ECORE_GETOPT_VALUE_BOOL(quit),
       ECORE_GETOPT_VALUE_BOOL(quit),
       ECORE_GETOPT_VALUE_BOOL(quit),
@@ -360,7 +360,14 @@ defaults:
           free(s);
        }
      dd = NULL;
-     if (wd) sprintf(workspace_path, "%s", wd);
+     if (wd)
+       {
+          sprintf(workspace_path, "%s", (char *)eina_list_data_get(wd));
+
+          EINA_LIST_FREE(wd, s)
+            free(s);
+          wd = NULL;
+       }
 }
 
 static Eina_Bool

-- 


Reply via email to