aboutsummaryrefslogtreecommitdiffstats
path: root/src/ensorcel_info_get.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ensorcel_info_get.c')
-rw-r--r--src/ensorcel_info_get.c20
1 files changed, 14 insertions, 6 deletions
diff --git a/src/ensorcel_info_get.c b/src/ensorcel_info_get.c
index 7f473f4..e06d9f9 100644
--- a/src/ensorcel_info_get.c
+++ b/src/ensorcel_info_get.c
@@ -65,28 +65,35 @@ Ecore_List *ensorcel_spell_info_get (Ecore_List * el_package_list, c
Ecore_List *list = NULL;
char sep = ':';
-
if (el_package_list)
{
char *line = NULL;
ecore_list_goto_first (el_package_list);
+
while ((line = ecore_list_next (el_package_list)))
{
- if (ensorcel_str_str (spell, line) == EXIT_SUCCESS)
+ if (ensorcel_str_str(spell, line) == EXIT_SUCCESS)
{
+ //printf ("BIG HEAVY DEBUG :: %s \n", line);
list = ensorcel_string_split (line, sep);
+ //printf ("I REMOVE :: %s\n",line);
+ //sleep (1);
+ ecore_list_remove(el_package_list);
break;
}
- else
- {
+ }
+ if (!list)
+ {
+ //printf ("DEBUG ================== | %s | \n", spell);
list = ecore_list_new ();
ecore_list_append (list, spell);
ecore_list_append (list, "0");
ecore_list_append (list, "-");
ecore_list_append (list, "");
- }
- }
+ ecore_list_remove (el_package_list);
+ }
+
/* VALGRIND SAYD INVALID FREE
* if (line)
* free (line);
@@ -97,6 +104,7 @@ Ecore_List *ensorcel_spell_info_get (Ecore_List * el_package_list, c
{
ensorcel_spell_details_get (list, spell_dir);
}
+ //printf('DEBUG :------------: return %p\n,list);
return (list);
}