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.
This commit is contained in:
Jaehyun Cho 2016-06-14 15:17:43 +09:00
parent f889d61140
commit 86c531cad8
1 changed files with 12 additions and 5 deletions

View File

@ -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