Enlightenment CVS committal

Author  : doursse
Project : e17
Module  : libs/evas

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


Modified Files:
        evas_module.c 


Log Message:
loaders are now modules
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/evas/src/lib/file/evas_module.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -3 -r1.5 -r1.6
--- evas_module.c       14 Jan 2006 15:58:01 -0000      1.5
+++ evas_module.c       14 Jan 2006 19:58:55 -0000      1.6
@@ -10,8 +10,8 @@
 # endif
 #endif
 
-#include <dirent.h>    // DIR, dirent
-#include <dlfcn.h>     // dlopen,dlclose,etc
+#include <dirent.h>    /* DIR, dirent */
+#include <dlfcn.h>     /* dlopen,dlclose,etc */
 
 #include <evas_common.h>
 #include <evas_private.h>
@@ -110,6 +110,7 @@
        /* do this on a separate function */
        /* 1. engines */
        _evas_module_path_append(EVAS_MODULE_TYPE_ENGINE, paths->data, 
"engines");
+       _evas_module_path_append(EVAS_MODULE_TYPE_IMAGE_LOADER, paths->data, 
"loaders");
        _evas_module_path_append(EVAS_MODULE_TYPE_OBJECT, paths->data, 
"objects");
        free(paths->data);
        paths = evas_list_remove_list(paths, paths);
@@ -122,9 +123,10 @@
 evas_module_init(void)
 {
    Evas_List *l;
-   int new_id = 1;
+   int new_id_engine = 1;
+   int new_id_loader = 1;
    
-//   printf("[init modules]\n");
+   /* printf("[init modules]\n"); */
    evas_module_paths_init();
    for (l = evas_module_paths; l; l = l->next)
      {
@@ -135,7 +137,7 @@
        mp = l->data;
        
        if (!(dir = opendir(mp->path))) break;
-//     printf("[evas module] searching modules on %s\n", mp->path);
+       /* printf("[evas module] searching modules on %s\n", mp->path); */
        while ((de = readdir(dir)))
          {
             char *buf;
@@ -162,12 +164,24 @@
                       eme = malloc(sizeof(Evas_Module_Engine));
                       if (eme)
                         {
-                           eme->id = new_id;
+                           eme->id = new_id_engine;
                            em->data = eme;
-                           new_id++;
+                           new_id_engine++;
                         }
                    }
-//               printf("[evas module] including module path %s/%s of type 
%d\n",em->path, em->name, em->type);
+                  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);
               }
             free(buf);




-------------------------------------------------------
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