Taking off defined block which is not necessary anymore + indenting.

SVN revision: 54678
This commit is contained in:
Gustavo Lima Chaves 2010-11-18 10:00:41 +00:00
parent ceff604deb
commit bffe78ab3a
1 changed files with 33 additions and 37 deletions

View File

@ -402,7 +402,7 @@ _elm_config_profiles_list(void)
eina_iterator_free(file_it);
sys:
sys:
len = eina_str_join_len(buf, sizeof(buf), '/', _elm_data_dir,
strlen(_elm_data_dir), "config",
sizeof("config") - 1);
@ -414,21 +414,6 @@ _elm_config_profiles_list(void)
buf[len] = '/';
len++;
#define S_ISDIR_CASE_DO \
{ \
const Eina_List *l; \
const char *tmp; \
EINA_LIST_FOREACH(flist, l, tmp) \
if (!strcmp(info->path + info->name_start, tmp)) \
break; \
\
if (!l) \
flist = \
eina_list_sorted_insert(flist, _sort_files_cb, \
eina_stringshare_add(info->path + \
info->name_start)); \
} \
len = sizeof(buf) - len;
EINA_ITERATOR_FOREACH(file_it, info)
{
@ -438,7 +423,20 @@ _elm_config_profiles_list(void)
switch (info->type)
{
case EINA_FILE_DIR:
S_ISDIR_CASE_DO
{
const Eina_List *l;
const char *tmp;
EINA_LIST_FOREACH(flist, l, tmp)
if (!strcmp(info->path + info->name_start, tmp))
break;
if (!l)
flist =
eina_list_sorted_insert(flist, _sort_files_cb,
eina_stringshare_add(info->path +
info->name_start));
}
break;
default:
@ -447,11 +445,9 @@ _elm_config_profiles_list(void)
}
return flist;
#undef S_ISDIR_CASE_DO
eina_iterator_free(file_it);
list_free:
list_free:
EINA_LIST_FREE(flist, dir)
eina_stringshare_del(dir);