aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/ecore_evas/ecore_evas_module.c
diff options
context:
space:
mode:
authorCedric Bail <cedric.bail@free.fr>2013-03-18 23:40:03 +0100
committerCedric BAIL <cedric.bail@samsung.com>2013-03-19 15:15:46 +0900
commit9e745d4a2c8080f56d79df49b1bdffe9e41f66b6 (patch)
treeb6ec99bce90069181301c9547a37d02eae6a74c1 /src/lib/ecore_evas/ecore_evas_module.c
parentecore: fix overflow on Windows 64 bits. (diff)
downloadefl-9e745d4a2c8080f56d79df49b1bdffe9e41f66b6.tar.gz
efl: add macro to swap Windows and Unix path separators.
Diffstat (limited to 'src/lib/ecore_evas/ecore_evas_module.c')
-rw-r--r--src/lib/ecore_evas/ecore_evas_module.c37
1 files changed, 20 insertions, 17 deletions
diff --git a/src/lib/ecore_evas/ecore_evas_module.c b/src/lib/ecore_evas/ecore_evas_module.c
index 0194bd2973..90b12478ab 100644
--- a/src/lib/ecore_evas/ecore_evas_module.c
+++ b/src/lib/ecore_evas/ecore_evas_module.c
@@ -102,10 +102,10 @@ _ecore_evas_engine_init(void)
for (j = 0; j < ((sizeof (paths) / sizeof (char*)) - 1); ++j)
for (i = j + 1; i < sizeof (paths) / sizeof (char*); ++i)
if (paths[i] && paths[j] && !strcmp(paths[i], paths[j]))
- {
- free(paths[i]);
- paths[i] = NULL;
- }
+ {
+ free(paths[i]);
+ paths[i] = NULL;
+ }
for (i = 0; i < sizeof (paths) / sizeof (char*); ++i)
if (paths[i])
@@ -154,20 +154,23 @@ _ecore_evas_available_engines_get(void)
EINA_LIST_FOREACH(_engines_paths, l, path)
{
- it = eina_file_direct_ls(path);
+ it = eina_file_direct_ls(path);
- if (it)
- {
- EINA_ITERATOR_FOREACH(it, info)
- {
- char tmp[PATH_MAX];
- snprintf(tmp, sizeof (tmp), "%s/%s/" ECORE_EVAS_ENGINE_NAME,
- info->path, MODULE_ARCH);
+ if (it)
+ {
+ EINA_ITERATOR_FOREACH(it, info)
+ {
+ char tmp[PATH_MAX];
+ snprintf(tmp, sizeof (tmp), "%s/%s/" ECORE_EVAS_ENGINE_NAME,
+ info->path, MODULE_ARCH);
- if (_file_exists(tmp))
+ if (_file_exists(tmp))
{
const char *name;
-
+
+#ifdef _WIN32
+ EVIL_PATH_SEP_WIN32_TO_UNIX(info->path);
+#endif
name = strrchr(info->path, '/');
if (name) name++;
else name = info->path;
@@ -246,9 +249,9 @@ _ecore_evas_available_engines_get(void)
#endif
}
}
- }
- eina_iterator_free(it);
- }
+ }
+ eina_iterator_free(it);
+ }
}
_engines_available = result;