Enlightenment CVS committal Author : devilhorns Project : e17 Module : apps/e
Dir : e17/apps/e/src/bin Modified Files: e_utils.c Log Message: Since most things will not be using XDG_*, reduce the number of strcmp's by first checking that we are NOT using XDG_*. Should provide a speedup for evaluating. =================================================================== RCS file: /cvs/e/e17/apps/e/src/bin/e_utils.c,v retrieving revision 1.75 retrieving revision 1.76 diff -u -3 -r1.75 -r1.76 --- e_utils.c 10 Oct 2007 09:41:58 -0000 1.75 +++ e_utils.c 10 Oct 2007 10:53:09 -0000 1.76 @@ -660,14 +660,18 @@ s = alloca(v2 - v1); strncpy(s, v1 + 1, v2 - v1 - 1); s[v2 - v1 - 1] = 0; - if (!strcmp(s, "XDG_CONFIG_HOME")) - v = (char *)efreet_config_home_get(); - else if (!strcmp(s, "XDG_CACHE_HOME")) - v = (char *)efreet_cache_home_get(); - else if (!strcmp(s, "XDG_DATA_HOME")) - v = (char *)efreet_data_home_get(); - else + if (strncmp(s, "XDG", 3)) v = getenv(s); + else + { + if (!strcmp(s, "XDG_CONFIG_HOME")) + v = (char *)efreet_config_home_get(); + else if (!strcmp(s, "XDG_CACHE_HOME")) + v = (char *)efreet_cache_home_get(); + else if (!strcmp(s, "XDG_DATA_HOME")) + v = (char *)efreet_data_home_get(); + } + if (v) { vp = v; ------------------------------------------------------------------------- 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