forked from enlightenment/enlightenment
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. SVN revision: 32034
This commit is contained in:
parent
c999ac8a20
commit
bf4118f350
|
@ -660,14 +660,18 @@ e_util_shell_env_path_eval(char *path)
|
|||
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;
|
||||
|
|
Loading…
Reference in New Issue