From 5fe32e0707958e23b9c0296376bb744245a82db2 Mon Sep 17 00:00:00 2001 From: raster Date: Mon, 26 Mar 2012 10:56:55 +0000 Subject: [PATCH] someone somewhere along the way broke evas_render_method_list(). FIX! git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/evas@69634 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- src/lib/canvas/evas_main.c | 4 +++- src/lib/file/evas_module.c | 43 +++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 44 insertions(+), 3 deletions(-) diff --git a/src/lib/canvas/evas_main.c b/src/lib/canvas/evas_main.c index 687744f..e7f06a9 100644 --- a/src/lib/canvas/evas_main.c +++ b/src/lib/canvas/evas_main.c @@ -509,7 +509,9 @@ evas_render_method_list(void) EAPI void evas_render_method_list_free(Eina_List *list) { - eina_list_free(list); + const char *s; + + EINA_LIST_FREE(list, s) eina_stringshare_del(s); } EAPI Eina_Bool diff --git a/src/lib/file/evas_module.c b/src/lib/file/evas_module.c index dc0d26b..063c479 100644 --- a/src/lib/file/evas_module.c +++ b/src/lib/file/evas_module.c @@ -293,12 +293,51 @@ Eina_List * evas_module_engine_list(void) { Evas_Module *em; - Eina_List *r = NULL; + Eina_List *r = NULL, *l, *ll; Eina_Array_Iterator iterator; + Eina_Iterator *it, *it2; unsigned int i; + const char *s, *s2; + char buf[4096]; + EINA_LIST_FOREACH(evas_module_paths, l, s) + { + snprintf(buf, sizeof(buf), "%s/engines", s); + it = eina_file_direct_ls(buf); + if (it) + { + Eina_File_Direct_Info *fi; + + EINA_ITERATOR_FOREACH(it, fi) + { + const char *fname = fi->path + fi->name_start; + snprintf(buf, sizeof(buf), "%s/engines/%s/%s", + s, fname, MODULE_ARCH); + it2 = eina_file_ls(buf); + if (it2) + { + EINA_LIST_FOREACH(r, ll, s2) + { + if (!strcmp(fname, s2)) break; + } + if (!ll) + r = eina_list_append(r, eina_stringshare_add(fname)); + eina_iterator_free(it2); + } + } + eina_iterator_free(it); + } + } + EINA_ARRAY_ITER_NEXT(evas_engines, i, em, iterator) - r = eina_list_append(r, em->definition->name); + { + EINA_LIST_FOREACH(r, ll, s2) + { + if (!strcmp(em->definition->name, s2)) break; + } + if (!ll) + r = eina_list_append(r, eina_stringshare_add(em->definition->name)); + } return r; } -- 2.7.4