forked from enlightenment/enlightenment
parent
b331eececb
commit
9f58d105a9
|
@ -36,35 +36,35 @@ static double t0, t1, t2;
|
||||||
* void (*__after_morecore_hook)(void);
|
* void (*__after_morecore_hook)(void);
|
||||||
*
|
*
|
||||||
|
|
||||||
static void my_init_hook(void);
|
static void my_init_hook(void);
|
||||||
static void my_free_hook(void *p, const void *caller);
|
static void my_free_hook(void *p, const void *caller);
|
||||||
|
|
||||||
static void (*old_free_hook)(void *ptr, const void *caller) = NULL;
|
static void (*old_free_hook)(void *ptr, const void *caller) = NULL;
|
||||||
void (*__free_hook)(void *ptr, const void *caller);
|
void (*__free_hook)(void *ptr, const void *caller);
|
||||||
|
|
||||||
void (*__malloc_initialize_hook) (void) = my_init_hook;
|
void (*__malloc_initialize_hook) (void) = my_init_hook;
|
||||||
static void
|
static void
|
||||||
my_init_hook(void)
|
my_init_hook(void)
|
||||||
{
|
{
|
||||||
old_free_hook = __free_hook;
|
old_free_hook = __free_hook;
|
||||||
__free_hook = my_free_hook;
|
__free_hook = my_free_hook;
|
||||||
}
|
}
|
||||||
|
|
||||||
//void *magicfree = NULL;
|
//void *magicfree = NULL;
|
||||||
|
|
||||||
static void
|
static void
|
||||||
my_free_hook(void *p, const void *caller)
|
my_free_hook(void *p, const void *caller)
|
||||||
{
|
{
|
||||||
__free_hook = old_free_hook;
|
__free_hook = old_free_hook;
|
||||||
// if ((p) && (p == magicfree))
|
// if ((p) && (p == magicfree))
|
||||||
// {
|
// {
|
||||||
// printf("CAUGHT!!!!! %p ...\n", p);
|
// printf("CAUGHT!!!!! %p ...\n", p);
|
||||||
// abort();
|
// abort();
|
||||||
// }
|
// }
|
||||||
free(p);
|
free(p);
|
||||||
__free_hook = my_free_hook;
|
__free_hook = my_free_hook;
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* local function prototypes */
|
/* local function prototypes */
|
||||||
static void _e_main_shutdown(int errcode);
|
static void _e_main_shutdown(int errcode);
|
||||||
|
@ -99,15 +99,13 @@ static Eina_Bool inloop = EINA_FALSE;
|
||||||
static jmp_buf x_fatal_buff;
|
static jmp_buf x_fatal_buff;
|
||||||
|
|
||||||
static int _e_main_lvl = 0;
|
static int _e_main_lvl = 0;
|
||||||
static int (*_e_main_shutdown_func[MAX_LEVEL])(void);
|
static int(*_e_main_shutdown_func[MAX_LEVEL]) (void);
|
||||||
|
|
||||||
static Eina_List *_idle_before_list = NULL;
|
static Eina_List *_idle_before_list = NULL;
|
||||||
static Ecore_Idle_Enterer *_idle_before = NULL;
|
static Ecore_Idle_Enterer *_idle_before = NULL;
|
||||||
static Ecore_Idle_Enterer *_idle_after = NULL;
|
static Ecore_Idle_Enterer *_idle_after = NULL;
|
||||||
static Ecore_Idle_Enterer *_idle_flush = NULL;
|
static Ecore_Idle_Enterer *_idle_flush = NULL;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* external variables */
|
/* external variables */
|
||||||
EAPI Eina_Bool e_precache_end = EINA_FALSE;
|
EAPI Eina_Bool e_precache_end = EINA_FALSE;
|
||||||
EAPI Eina_Bool x_fatal = EINA_FALSE;
|
EAPI Eina_Bool x_fatal = EINA_FALSE;
|
||||||
|
@ -681,7 +679,8 @@ main(int argc, char **argv)
|
||||||
|
|
||||||
if ((locked) && ((!e_config->show_splash) && (!after_restart)))
|
if ((locked) && ((!e_config->show_splash) && (!after_restart)))
|
||||||
e_desklock_show();
|
e_desklock_show();
|
||||||
else if (waslocked) e_desklock_show();
|
else if (waslocked)
|
||||||
|
e_desklock_show();
|
||||||
|
|
||||||
if (e_config->show_splash)
|
if (e_config->show_splash)
|
||||||
e_init_status_set(_("Setup Message Bus"));
|
e_init_status_set(_("Setup Message Bus"));
|
||||||
|
@ -1021,7 +1020,7 @@ main(int argc, char **argv)
|
||||||
|
|
||||||
/* FIXME: make safe to delete within a callback */
|
/* FIXME: make safe to delete within a callback */
|
||||||
EAPI E_Before_Idler *
|
EAPI E_Before_Idler *
|
||||||
e_main_idler_before_add(int (*func) (void *data), void *data, int once)
|
e_main_idler_before_add(int (*func)(void *data), void *data, int once)
|
||||||
{
|
{
|
||||||
E_Before_Idler *eb;
|
E_Before_Idler *eb;
|
||||||
|
|
||||||
|
@ -1275,7 +1274,7 @@ _e_main_dirs_init(void)
|
||||||
};
|
};
|
||||||
|
|
||||||
base = e_user_dir_get();
|
base = e_user_dir_get();
|
||||||
if (ecore_file_mksubdirs(base, dirs) != sizeof(dirs)/sizeof(dirs[0]) - 1)
|
if (ecore_file_mksubdirs(base, dirs) != sizeof(dirs) / sizeof(dirs[0]) - 1)
|
||||||
{
|
{
|
||||||
e_error_message_show("Could not create one of the required "
|
e_error_message_show("Could not create one of the required "
|
||||||
"subdirectories of '%s'", base);
|
"subdirectories of '%s'", base);
|
||||||
|
@ -1773,7 +1772,7 @@ _e_main_cb_idle_before(void *data __UNUSED__)
|
||||||
if (!eb->func(eb->data)) eb->delete_me = 1;
|
if (!eb->func(eb->data)) eb->delete_me = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
EINA_LIST_FOREACH_SAFE(_idle_before_list, pl, l, eb)
|
EINA_LIST_FOREACH_SAFE (_idle_before_list, pl, l, eb)
|
||||||
{
|
{
|
||||||
if ((eb->once) || (eb->delete_me))
|
if ((eb->once) || (eb->delete_me))
|
||||||
{
|
{
|
||||||
|
@ -1817,3 +1816,4 @@ _e_main_cb_startup_fake_end(void *data __UNUSED__)
|
||||||
e_init_hide();
|
e_init_hide();
|
||||||
return ECORE_CALLBACK_CANCEL;
|
return ECORE_CALLBACK_CANCEL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue