Enlightenment CVS committal

Author  : raster
Project : e17
Module  : libs/evas

Dir     : e17/libs/evas/src/lib/file


Modified Files:
        evas_module.c 


Log Message:


ok - now support a first try guess based on extension - if that fails, or the
extension is unknown to match a format, try all image loader modules until
one succeeds - if all of these fail, give up.

===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/evas/src/lib/file/evas_module.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -3 -r1.7 -r1.8
--- evas_module.c       14 Jan 2006 23:36:52 -0000      1.7
+++ evas_module.c       15 Jan 2006 05:04:32 -0000      1.8
@@ -172,15 +172,6 @@
                    }
                   else if (em->type == EVAS_MODULE_TYPE_IMAGE_LOADER)
                    {
-                      Evas_Module_Image_Loader *emil;
-                      
-                      emil = malloc(sizeof(Evas_Module_Image_Loader));
-                      if (emil)
-                        {
-                           emil->id = new_id_loader;
-                           em->data = emil;
-                           new_id_loader++;
-                        }
                    }
                  /* printf("[evas module] including module path %s/%s of type 
%d\n",em->path, em->name, em->type); */
                  evas_modules = evas_list_append(evas_modules, em);
@@ -201,7 +192,14 @@
        
        em = (Evas_Module*)l->data;
        if ((type == em->type) && (!strcmp(name,em->name)))
-         return em;
+         {
+             if (evas_modules != l)
+              {
+                 evas_modules = evas_list_remove_list(evas_modules, l);
+                 evas_modules = evas_list_prepend(evas_modules, em);
+              }
+            return em;
+         }
      }
    return NULL;
 }
@@ -281,7 +279,13 @@
        evas_module_unload(em);
        if (em->name) free(em->name);
        if (em->path) free(em->path);
-       if (em->data) free(em->data);
+       if (em->type == EVAS_MODULE_TYPE_ENGINE)
+         {
+            if (em->data) free(em->data);
+         }
+       else if (em->type == EVAS_MODULE_TYPE_IMAGE_LOADER)
+         {
+         }
        free(evas_modules->data);
        evas_modules = evas_list_remove_list(evas_modules, evas_modules);
      }




-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to