option bug and hide if setting not allowed

SVN revision: 11795
This commit is contained in:
handyande 2004-10-08 22:28:27 +00:00 committed by handyande
parent 207a5af796
commit 0a8b298d6a
2 changed files with 4 additions and 2 deletions

View File

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

View File

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