From 0a8b298d6a8315e427b1538ea7d3aca8ad00683f Mon Sep 17 00:00:00 2001 From: handyande Date: Fri, 8 Oct 2004 22:28:27 +0000 Subject: [PATCH] option bug and hide if setting not allowed SVN revision: 11795 --- legacy/ecore/src/lib/ecore_config/convenience.c | 3 ++- legacy/ecore/src/lib/ecore_config/ecore_config.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/legacy/ecore/src/lib/ecore_config/convenience.c b/legacy/ecore/src/lib/ecore_config/convenience.c index 8694409797..8c106b930e 100644 --- a/legacy/ecore/src/lib/ecore_config/convenience.c +++ b/legacy/ecore/src/lib/ecore_config/convenience.c @@ -543,7 +543,8 @@ ecore_config_args_display(void) props = __ecore_config_bundle_local->data; while (props) { - if (props->flags & PF_SYSTEM) + /* if it is a system prop, or cannot be set on command line hide it */ + if (props->flags & PF_SYSTEM || (!props->short_opt && !props->long_opt)) { props = props->next; continue; diff --git a/legacy/ecore/src/lib/ecore_config/ecore_config.c b/legacy/ecore/src/lib/ecore_config/ecore_config.c index 00f5ff3492..dd728c752e 100644 --- a/legacy/ecore/src/lib/ecore_config/ecore_config.c +++ b/legacy/ecore/src/lib/ecore_config/ecore_config.c @@ -648,7 +648,8 @@ ecore_config_long_opt_set(const char *key, char *long_opt) return ECORE_CONFIG_ERR_NODATA; if (e->long_opt) free(e->long_opt); - e->long_opt = strdup(long_opt); + if (long_opt) + e->long_opt = strdup(long_opt); return ECORE_CONFIG_ERR_SUCC; }