Enlightenment CVS committal Author : raster Project : e17 Module : apps/e
Dir : e17/apps/e/src/bin Modified Files: e_prefix.c Log Message: some prefix fixes for env vars =================================================================== RCS file: /cvs/e/e17/apps/e/src/bin/e_prefix.c,v retrieving revision 1.16 retrieving revision 1.17 diff -u -3 -r1.16 -r1.17 --- e_prefix.c 13 Jul 2006 16:35:46 -0000 1.16 +++ e_prefix.c 21 Jul 2006 15:55:53 -0000 1.17 @@ -37,33 +37,28 @@ { _prefix_path = strdup(getenv("E_PREFIX")); if (getenv("E_BIN_DIR")) - _prefix_path_bin = strdup(getenv("E_BIN_DIR")); + snprintf(buf, sizeof(buf), "%s/bin", getenv("E_BIN_DIR")); else - { - snprintf(buf, sizeof(buf), "%s/bin", _prefix_path); - _prefix_path_bin = strdup(buf); - } + snprintf(buf, sizeof(buf), "%s/bin", _prefix_path); + _prefix_path_bin = strdup(buf); + if (getenv("E_LIB_DIR")) - _prefix_path_bin = strdup(getenv("E_LIB_DIR")); + snprintf(buf, sizeof(buf), "%s/lib", getenv("E_LIB_DIR")); else - { - snprintf(buf, sizeof(buf), "%s/lib", _prefix_path); - _prefix_path_lib = strdup(buf); - } + snprintf(buf, sizeof(buf), "%s/lib", _prefix_path); + _prefix_path_lib = strdup(buf); + if (getenv("E_DATA_DIR")) - _prefix_path_data = strdup(getenv("E_DATA_DIR")); + snprintf(buf, sizeof(buf), "%s/"SHARE_D, getenv("E_DATA_DIR")); else - { - snprintf(buf, sizeof(buf), "%s/"SHARE_D, _prefix_path); - _prefix_path_data = strdup(buf); - } + snprintf(buf, sizeof(buf), "%s/"SHARE_D, _prefix_path); + _prefix_path_data = strdup(buf); + if (getenv("E_LOCALE_DIR")) - _prefix_path_locale = strdup(getenv("E_LOCALE_DIR")); + snprintf(buf, sizeof(buf), "%s/"LOCALE_D, getenv("E_LOCALE_DIR")); else - { - snprintf(buf, sizeof(buf), "%s/"LOCALE_D, _prefix_path); - _prefix_path_locale = strdup(buf); - } + snprintf(buf, sizeof(buf), "%s/"LOCALE_D, _prefix_path); + _prefix_path_data = strdup(buf); return 1; } /* no env var - examine process and possible argv0 */ ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs