static int _efreet_init_count = 0;
static int efreet_parsed_locale = 0;
-static char *efreet_lang = NULL;
-static char *efreet_lang_country = NULL;
-static char *efreet_lang_modifier = NULL;
+static const char *efreet_lang = NULL;
+static const char *efreet_lang_country = NULL;
+static const char *efreet_lang_modifier = NULL;
int _efreet_log_domain_global = -1;
static void efreet_parse_locale(void);
static int efreet_parse_locale_setting(const char *env);
eet_shutdown();
eina_shutdown();
- IF_FREE(efreet_lang);
- IF_FREE(efreet_lang_country);
- IF_FREE(efreet_lang_modifier);
+ IF_RELEASE(efreet_lang);
+ IF_RELEASE(efreet_lang_country);
+ IF_RELEASE(efreet_lang_modifier);
efreet_parsed_locale = 0; /* reset this in case they init efreet again */
return _efreet_init_count;
if (p)
{
*p = '\0';
- efreet_lang_modifier = strdup(p + 1);
+ efreet_lang_modifier = eina_stringshare_add(p + 1);
found = 1;
}
if (p)
{
*p = '\0';
- efreet_lang_country = strdup(p + 1);
+ efreet_lang_country = eina_stringshare_add(p + 1);
found = 1;
}
if (setting && (*setting != '\0'))
{
- efreet_lang = strdup(setting);
+ efreet_lang = eina_stringshare_add(setting);
found = 1;
}
static Eina_List *efreet_util_cache_glob_list(const char *search, const char *what);
static Eina_Hash *file_id_by_desktop_path = NULL;
-static char *cache_file = NULL;
+static const char *cache_file = NULL;
static Eet_File *cache = NULL;
static int init = 0;
eina_log_domain_unregister(_efreet_utils_log_dom);
IF_FREE_HASH(file_id_by_desktop_path);
if (cache) eet_close(cache);
- IF_FREE(cache_file);
+ IF_RELEASE(cache_file);
return init;
}
else
snprintf(tmp, sizeof(tmp), "%s/.efreet/desktop_util.cache", home);
- cache_file = strdup(tmp);
+ cache_file = eina_stringshare_add(tmp);
return cache_file;
}