Enlightenment CVS committal Author : doursse Project : e17 Module : libs/evas
Dir : e17/libs/evas/src/lib/file Modified Files: evas_module.c Log Message: Add EVAS_MODULES_DIR in the list of paths to search for the modules. The order and locations are: 1. ~/.evas/modules/ 2. $(EVAS_MODULE_DIR)/evas/modules/ 3. dladdr/evas/modules/ 4. PREFIX/evas/modules/ =================================================================== RCS file: /cvs/e/e17/libs/evas/src/lib/file/evas_module.c,v retrieving revision 1.27 retrieving revision 1.28 diff -u -3 -r1.27 -r1.28 --- evas_module.c 13 Aug 2007 12:13:03 -0000 1.27 +++ evas_module.c 17 Oct 2007 09:29:18 -0000 1.28 @@ -117,8 +117,9 @@ /* this will alloc a list of paths to search for the modules */ /* by now these are: */ /* 1. ~/.evas/modules/ */ -/* 2. PREFIX/evas/modules/ */ +/* 2. $(EVAS_MODULE_DIR)/evas/modules/ */ /* 3. dladdr/evas/modules/ */ +/* 4. PREFIX/evas/modules/ */ void evas_module_paths_init(void) { @@ -144,6 +145,23 @@ } } + /* 2. $(EVAS_MODULE_DIR)/evas/modules/ */ + prefix = getenv("EVAS_MODULES_DIR"); + if (prefix) + { + path = malloc(strlen(prefix) + 1 + strlen("/evas/modules")); + if (path) + { + path[0] = 0; + strcpy(path, prefix); + strcat(path, "/evas/modules"); + if (evas_file_path_exists(path)) + paths = evas_list_append(paths, path); + else + free(path); + } + } + #ifdef HAVE_DLADDR { Dl_info evas_dl; @@ -172,7 +190,7 @@ } } #else - /* 3. PREFIX/evas/modules/ */ + /* 4. PREFIX/evas/modules/ */ prefix = PACKAGE_LIB_DIR; path = malloc(strlen(prefix) + 1 + strlen("/evas/modules")); if (path) ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs