Move Ecore_Oldlist to Ecore_List2 and rename the funcs from _list_

to _list2_


SVN revision: 16425
This commit is contained in:
sebastid 2005-08-30 10:05:27 +00:00 committed by sebastid
parent d2d9f29e1a
commit 19d9aa1452
20 changed files with 223 additions and 223 deletions

View File

@ -36,7 +36,7 @@ ecore_animator_add(int (*func) (void *data), const void *data)
ECORE_MAGIC_SET(animator, ECORE_MAGIC_ANIMATOR);
animator->func = func;
animator->data = (void *)data;
animators = _ecore_list_append(animators, animator);
animators = _ecore_list2_append(animators, animator);
if (!timer)
timer = ecore_timer_add(animators_frametime, _ecore_animator, NULL);
return animator;
@ -115,7 +115,7 @@ _ecore_animator_shutdown(void)
Ecore_Animator *animator;
animator = animators;
animators = _ecore_list_remove(animators, animator);
animators = _ecore_list2_remove(animators, animator);
ECORE_MAGIC_SET(animator, ECORE_MAGIC_NONE);
free(animator);
}
@ -124,9 +124,9 @@ _ecore_animator_shutdown(void)
static int
_ecore_animator(void *data __UNUSED__)
{
Ecore_Oldlist *l;
Ecore_List2 *l;
for (l = (Ecore_Oldlist *)animators; l;)
for (l = (Ecore_List2 *)animators; l;)
{
Ecore_Animator *animator;
@ -144,7 +144,7 @@ _ecore_animator(void *data __UNUSED__)
if (animators_delete_me)
{
for (l = (Ecore_Oldlist *)animators; l;)
for (l = (Ecore_List2 *)animators; l;)
{
Ecore_Animator *animator;
@ -152,7 +152,7 @@ _ecore_animator(void *data __UNUSED__)
l = l->next;
if (animator->delete_me)
{
animators = _ecore_list_remove(animators, animator);
animators = _ecore_list2_remove(animators, animator);
ECORE_MAGIC_SET(animator, ECORE_MAGIC_NONE);
free(animator);
animators_delete_me--;

View File

@ -7,7 +7,7 @@ static Ecore_Event *events = NULL;
static Ecore_Event_Handler **event_handlers = NULL;
static int event_handlers_num = 0;
static int event_handlers_alloc_num = 0;
static Ecore_Oldlist_Data *event_handlers_delete_list = NULL;
static Ecore_List2_Data *event_handlers_delete_list = NULL;
static Ecore_Event_Filter *event_filters = NULL;
static int event_filters_delete_me = 0;
@ -76,7 +76,7 @@ ecore_event_handler_add(int type, int (*func) (void *data, int type, void *event
event_handlers[i] = NULL;
}
}
event_handlers[type] = _ecore_list_append(event_handlers[type], eh);
event_handlers[type] = _ecore_list2_append(event_handlers[type], eh);
return eh;
}
@ -93,7 +93,7 @@ ecore_event_handler_add(int type, int (*func) (void *data, int type, void *event
void *
ecore_event_handler_del(Ecore_Event_Handler *event_handler)
{
Ecore_Oldlist_Data *node;
Ecore_List2_Data *node;
if (!ECORE_MAGIC_CHECK(event_handler, ECORE_MAGIC_EVENT_HANDLER))
{
@ -102,9 +102,9 @@ ecore_event_handler_del(Ecore_Event_Handler *event_handler)
return NULL;
}
event_handler->delete_me = 1;
node = calloc(1, sizeof(Ecore_Oldlist_Data));
node = calloc(1, sizeof(Ecore_List2_Data));
node->data = event_handler;
event_handlers_delete_list = _ecore_list_append(event_handlers_delete_list, node);
event_handlers_delete_list = _ecore_list2_append(event_handlers_delete_list, node);
return event_handler->data;
}
@ -215,7 +215,7 @@ ecore_event_filter_add(void * (*func_start) (void *data), int (*func_filter) (vo
ef->func_filter = func_filter;
ef->func_end = func_end;
ef->data = (void *)data;
event_filters = _ecore_list_append(event_filters, ef);
event_filters = _ecore_list2_append(event_filters, ef);
return ef;
}
@ -295,17 +295,17 @@ _ecore_event_shutdown(void)
Ecore_Event_Handler *eh;
eh = event_handlers[i];
event_handlers[i] = _ecore_list_remove(event_handlers[i], eh);
event_handlers[i] = _ecore_list2_remove(event_handlers[i], eh);
ECORE_MAGIC_SET(eh, ECORE_MAGIC_NONE);
free(eh);
}
}
while (event_handlers_delete_list)
{
Ecore_Oldlist_Data *ehd;
Ecore_List2_Data *ehd;
ehd = event_handlers_delete_list;
event_handlers_delete_list = _ecore_list_remove(event_handlers_delete_list, ehd);
event_handlers_delete_list = _ecore_list2_remove(event_handlers_delete_list, ehd);
free(ehd);
}
if (event_handlers) free(event_handlers);
@ -317,7 +317,7 @@ _ecore_event_shutdown(void)
Ecore_Event_Filter *ef;
ef = event_filters;
event_filters = _ecore_list_remove(event_filters, ef);
event_filters = _ecore_list2_remove(event_filters, ef);
ECORE_MAGIC_SET(ef, ECORE_MAGIC_NONE);
free(ef);
}
@ -343,7 +343,7 @@ _ecore_event_add(int type, void *ev, void (*func_free) (void *data, void *ev), v
e->event = ev;
e->func_free = func_free;
e->data = data;
events = _ecore_list_append(events, e);
events = _ecore_list2_append(events, e);
events_num++;
return e;
}
@ -355,7 +355,7 @@ _ecore_event_del(Ecore_Event *event)
data = event->data;
event->func_free(event->data, event->event);
events = _ecore_list_remove(events, event);
events = _ecore_list2_remove(events, event);
ECORE_MAGIC_SET(event, ECORE_MAGIC_NONE);
free(event);
events_num--;
@ -365,21 +365,21 @@ _ecore_event_del(Ecore_Event *event)
void
_ecore_event_call(void)
{
Ecore_Oldlist *l, *ll;
Ecore_List2 *l, *ll;
Ecore_Event *e;
Ecore_Event_Filter *ef;
Ecore_Event_Handler *eh;
Ecore_Oldlist_Data *ehd;
Ecore_List2_Data *ehd;
int handle_count;
for (l = (Ecore_Oldlist *)event_filters; l; l = l->next)
for (l = (Ecore_List2 *)event_filters; l; l = l->next)
{
ef = (Ecore_Event_Filter *)l;
if (!ef->delete_me)
{
if (ef->func_start)
ef->loop_data = ef->func_start(ef->data);
for (ll = (Ecore_Oldlist *)events; ll; ll = ll->next)
for (ll = (Ecore_List2 *)events; ll; ll = ll->next)
{
Ecore_Event *e;
@ -397,13 +397,13 @@ _ecore_event_call(void)
}
if (event_filters_delete_me)
{
for (l = (Ecore_Oldlist *)event_filters; l;)
for (l = (Ecore_List2 *)event_filters; l;)
{
ef = (Ecore_Event_Filter *)l;
l = l->next;
if (ef->delete_me)
{
event_filters = _ecore_list_remove(event_filters, ef);
event_filters = _ecore_list2_remove(event_filters, ef);
ECORE_MAGIC_SET(ef, ECORE_MAGIC_NONE);
free(ef);
}
@ -411,7 +411,7 @@ _ecore_event_call(void)
event_filters_delete_me = 0;
}
// printf("EVENT BATCH...\n");
for (l = (Ecore_Oldlist *)events; l; l = l->next)
for (l = (Ecore_List2 *)events; l; l = l->next)
{
e = (Ecore_Event *)l;
if (!e->delete_me)
@ -422,7 +422,7 @@ _ecore_event_call(void)
// printf("HANDLE ev type %i, %p\n", e->type, e->event);
if ((e->type >= 0) && (e->type < event_handlers_num))
{
for (ll = (Ecore_Oldlist *)event_handlers[e->type]; ll; ll = ll->next)
for (ll = (Ecore_List2 *)event_handlers[e->type]; ll; ll = ll->next)
{
eh = (Ecore_Event_Handler *)ll;
if (!eh->delete_me)
@ -447,8 +447,8 @@ _ecore_event_call(void)
{
ehd = event_handlers_delete_list;
eh = ehd->data;
event_handlers[eh->type] = _ecore_list_remove(event_handlers[eh->type], eh);
event_handlers_delete_list = _ecore_list_remove(event_handlers_delete_list, ehd);
event_handlers[eh->type] = _ecore_list2_remove(event_handlers[eh->type], eh);
event_handlers_delete_list = _ecore_list2_remove(event_handlers_delete_list, ehd);
ECORE_MAGIC_SET(eh, ECORE_MAGIC_NONE);
free(eh);
free(ehd);

View File

@ -47,7 +47,7 @@ ecore_exe_run(const char *exe_cmd, const void *data)
ECORE_MAGIC_SET(exe, ECORE_MAGIC_EXE);
exe->pid = pid;
exe->data = (void *)data;
exes = _ecore_list_append(exes, exe);
exes = _ecore_list2_append(exes, exe);
return exe;
}
setsid();
@ -237,9 +237,9 @@ _ecore_exe_shutdown(void)
Ecore_Exe *
_ecore_exe_find(pid_t pid)
{
Ecore_Oldlist *l;
Ecore_List2 *l;
for (l = (Ecore_Oldlist *)exes; l; l = l->next)
for (l = (Ecore_List2 *)exes; l; l = l->next)
{
Ecore_Exe *exe;
@ -255,7 +255,7 @@ _ecore_exe_free(Ecore_Exe *exe)
void *data;
data = exe->data;
exes = _ecore_list_remove(exes, exe);
exes = _ecore_list2_remove(exes, exe);
ECORE_MAGIC_SET(exe, ECORE_MAGIC_NONE);
free(exe);
return data;

View File

@ -23,7 +23,7 @@ ecore_idle_enterer_add(int (*func) (void *data), const void *data)
ECORE_MAGIC_SET(ie, ECORE_MAGIC_IDLE_ENTERER);
ie->func = func;
ie->data = (void *)data;
idle_enterers = _ecore_list_append(idle_enterers, ie);
idle_enterers = _ecore_list2_append(idle_enterers, ie);
return ie;
}
@ -56,7 +56,7 @@ _ecore_idle_enterer_shutdown(void)
Ecore_Idle_Enterer *ie;
ie = idle_enterers;
idle_enterers = _ecore_list_remove(idle_enterers, ie);
idle_enterers = _ecore_list2_remove(idle_enterers, ie);
ECORE_MAGIC_SET(ie, ECORE_MAGIC_NONE);
free(ie);
}
@ -66,9 +66,9 @@ _ecore_idle_enterer_shutdown(void)
void
_ecore_idle_enterer_call(void)
{
Ecore_Oldlist *l;
Ecore_List2 *l;
for (l = (Ecore_Oldlist *)idle_enterers; l; l = l->next)
for (l = (Ecore_List2 *)idle_enterers; l; l = l->next)
{
Ecore_Idle_Enterer *ie;
@ -80,7 +80,7 @@ _ecore_idle_enterer_call(void)
}
if (idle_enterers_delete_me)
{
for (l = (Ecore_Oldlist *)idle_enterers; l;)
for (l = (Ecore_List2 *)idle_enterers; l;)
{
Ecore_Idle_Enterer *ie;
@ -88,7 +88,7 @@ _ecore_idle_enterer_call(void)
l = l->next;
if (ie->delete_me)
{
idle_enterers = _ecore_list_remove(idle_enterers, ie);
idle_enterers = _ecore_list2_remove(idle_enterers, ie);
ECORE_MAGIC_SET(ie, ECORE_MAGIC_NONE);
free(ie);
}

View File

@ -22,7 +22,7 @@ ecore_idle_exiter_add(int (*func) (void *data), const void *data)
ECORE_MAGIC_SET(ie, ECORE_MAGIC_IDLE_EXITER);
ie->func = func;
ie->data = (void *)data;
idle_exiters = _ecore_list_append(idle_exiters, ie);
idle_exiters = _ecore_list2_append(idle_exiters, ie);
return ie;
}
@ -55,7 +55,7 @@ _ecore_idle_exiter_shutdown(void)
Ecore_Idle_Exiter *ie;
ie = idle_exiters;
idle_exiters = _ecore_list_remove(idle_exiters, ie);
idle_exiters = _ecore_list2_remove(idle_exiters, ie);
ECORE_MAGIC_SET(ie, ECORE_MAGIC_NONE);
free(ie);
}
@ -65,9 +65,9 @@ _ecore_idle_exiter_shutdown(void)
void
_ecore_idle_exiter_call(void)
{
Ecore_Oldlist *l;
Ecore_List2 *l;
for (l = (Ecore_Oldlist *)idle_exiters; l; l = l->next)
for (l = (Ecore_List2 *)idle_exiters; l; l = l->next)
{
Ecore_Idle_Exiter *ie;
@ -79,7 +79,7 @@ _ecore_idle_exiter_call(void)
}
if (idle_exiters_delete_me)
{
for (l = (Ecore_Oldlist *)idle_exiters; l;)
for (l = (Ecore_List2 *)idle_exiters; l;)
{
Ecore_Idle_Exiter *ie;
@ -87,7 +87,7 @@ _ecore_idle_exiter_call(void)
l = l->next;
if (ie->delete_me)
{
idle_exiters = _ecore_list_remove(idle_exiters, ie);
idle_exiters = _ecore_list2_remove(idle_exiters, ie);
ECORE_MAGIC_SET(ie, ECORE_MAGIC_NONE);
free(ie);
}

View File

@ -22,7 +22,7 @@ ecore_idler_add(int (*func) (void *data), const void *data)
ECORE_MAGIC_SET(ie, ECORE_MAGIC_IDLER);
ie->func = func;
ie->data = (void *)data;
idlers = _ecore_list_append(idlers, ie);
idlers = _ecore_list2_append(idlers, ie);
return ie;
}
@ -55,7 +55,7 @@ _ecore_idler_shutdown(void)
Ecore_Idler *ie;
ie = idlers;
idlers = _ecore_list_remove(idlers, ie);
idlers = _ecore_list2_remove(idlers, ie);
ECORE_MAGIC_SET(ie, ECORE_MAGIC_NONE);
free(ie);
}
@ -65,9 +65,9 @@ _ecore_idler_shutdown(void)
int
_ecore_idler_call(void)
{
Ecore_Oldlist *l;
Ecore_List2 *l;
for (l = (Ecore_Oldlist *)idlers; l; l = l->next)
for (l = (Ecore_List2 *)idlers; l; l = l->next)
{
Ecore_Idler *ie;
@ -79,7 +79,7 @@ _ecore_idler_call(void)
}
if (idlers_delete_me)
{
for (l = (Ecore_Oldlist *)idlers; l;)
for (l = (Ecore_List2 *)idlers; l;)
{
Ecore_Idler *ie;
@ -87,7 +87,7 @@ _ecore_idler_call(void)
l = l->next;
if (ie->delete_me)
{
idlers = _ecore_list_remove(idlers, ie);
idlers = _ecore_list2_remove(idlers, ie);
ECORE_MAGIC_SET(ie, ECORE_MAGIC_NONE);
free(ie);
}

View File

@ -32,10 +32,10 @@ static void *_ecore_dlist_goto_index(Ecore_DList *list, int index);
/* XXX: Begin deprecated code */
void *
_ecore_list_append(void *in_list, void *in_item)
_ecore_list2_append(void *in_list, void *in_item)
{
Ecore_Oldlist *l, *new_l;
Ecore_Oldlist *list, *item;
Ecore_List2 *l, *new_l;
Ecore_List2 *list, *item;
list = in_list;
item = in_item;
@ -56,10 +56,10 @@ _ecore_list_append(void *in_list, void *in_item)
}
void *
_ecore_list_prepend(void *in_list, void *in_item)
_ecore_list2_prepend(void *in_list, void *in_item)
{
Ecore_Oldlist *new_l;
Ecore_Oldlist *list, *item;
Ecore_List2 *new_l;
Ecore_List2 *list, *item;
list = in_list;
item = in_item;
@ -79,10 +79,10 @@ _ecore_list_prepend(void *in_list, void *in_item)
}
void *
_ecore_list_append_relative(void *in_list, void *in_item, void *in_relative)
_ecore_list2_append_relative(void *in_list, void *in_item, void *in_relative)
{
Ecore_Oldlist *l;
Ecore_Oldlist *list, *item, *relative;
Ecore_List2 *l;
Ecore_List2 *list, *item, *relative;
list = in_list;
item = in_item;
@ -91,7 +91,7 @@ _ecore_list_append_relative(void *in_list, void *in_item, void *in_relative)
{
if (l == relative)
{
Ecore_Oldlist *new_l;
Ecore_List2 *new_l;
new_l = item;
if (l->next)
@ -108,14 +108,14 @@ _ecore_list_append_relative(void *in_list, void *in_item, void *in_relative)
return list;
}
}
return _ecore_list_append(list, item);
return _ecore_list2_append(list, item);
}
void *
_ecore_list_prepend_relative(void *in_list, void *in_item, void *in_relative)
_ecore_list2_prepend_relative(void *in_list, void *in_item, void *in_relative)
{
Ecore_Oldlist *l;
Ecore_Oldlist *list, *item, *relative;
Ecore_List2 *l;
Ecore_List2 *list, *item, *relative;
list = in_list;
item = in_item;
@ -124,7 +124,7 @@ _ecore_list_prepend_relative(void *in_list, void *in_item, void *in_relative)
{
if (l == relative)
{
Ecore_Oldlist *new_l;
Ecore_List2 *new_l;
new_l = item;
new_l->prev = l->prev;
@ -150,14 +150,14 @@ _ecore_list_prepend_relative(void *in_list, void *in_item, void *in_relative)
}
}
}
return _ecore_list_prepend(list, item);
return _ecore_list2_prepend(list, item);
}
void *
_ecore_list_remove(void *in_list, void *in_item)
_ecore_list2_remove(void *in_list, void *in_item)
{
Ecore_Oldlist *return_l;
Ecore_Oldlist *list, *item;
Ecore_List2 *return_l;
Ecore_List2 *list, *item;
/* checkme */
if(!in_list)
@ -187,10 +187,10 @@ _ecore_list_remove(void *in_list, void *in_item)
}
void *
_ecore_list_find(void *in_list, void *in_item)
_ecore_list2_find(void *in_list, void *in_item)
{
Ecore_Oldlist *l;
Ecore_Oldlist *list, *item;
Ecore_List2 *l;
Ecore_List2 *list, *item;
list = in_list;
item = in_item;

View File

@ -140,7 +140,7 @@ ecore_main_fd_handler_add(int fd, Ecore_Fd_Handler_Flags flags, int (*func) (voi
fdh->data = (void *)data;
fdh->buf_func = buf_func;
fdh->buf_data = (void *)buf_data;
fd_handlers = _ecore_list_append(fd_handlers, fdh);
fd_handlers = _ecore_list2_append(fd_handlers, fdh);
return fdh;
}
@ -257,7 +257,7 @@ _ecore_main_shutdown(void)
Ecore_Fd_Handler *fdh;
fdh = fd_handlers;
fd_handlers = _ecore_list_remove(fd_handlers, fdh);
fd_handlers = _ecore_list2_remove(fd_handlers, fdh);
ECORE_MAGIC_SET(fdh, ECORE_MAGIC_NONE);
free(fdh);
}
@ -271,7 +271,7 @@ _ecore_main_select(double timeout)
fd_set rfds, wfds, exfds;
int max_fd;
int ret;
Ecore_Oldlist *l;
Ecore_List2 *l;
t = NULL;
if (timeout > 0.0)
@ -302,7 +302,7 @@ _ecore_main_select(double timeout)
FD_ZERO(&exfds);
/* call the prepare callback for all handlers */
for (l = (Ecore_Oldlist *)fd_handlers; l; l = l->next)
for (l = (Ecore_List2 *)fd_handlers; l; l = l->next)
{
Ecore_Fd_Handler *fdh;
@ -311,7 +311,7 @@ _ecore_main_select(double timeout)
if (fdh->prep_func)
fdh->prep_func (fdh->prep_data, fdh);
}
for (l = (Ecore_Oldlist *)fd_handlers; l; l = l->next)
for (l = (Ecore_List2 *)fd_handlers; l; l = l->next)
{
Ecore_Fd_Handler *fdh;
@ -342,7 +342,7 @@ _ecore_main_select(double timeout)
}
if (ret > 0)
{
for (l = (Ecore_Oldlist *)fd_handlers; l; l = l->next)
for (l = (Ecore_List2 *)fd_handlers; l; l = l->next)
{
Ecore_Fd_Handler *fdh;
@ -366,10 +366,10 @@ _ecore_main_select(double timeout)
static void
_ecore_main_fd_handlers_cleanup(void)
{
Ecore_Oldlist *l;
Ecore_List2 *l;
if (!fd_handlers_delete_me) return;
for (l = (Ecore_Oldlist *)fd_handlers; l;)
for (l = (Ecore_List2 *)fd_handlers; l;)
{
Ecore_Fd_Handler *fdh;
@ -377,7 +377,7 @@ _ecore_main_fd_handlers_cleanup(void)
l = l->next;
if (fdh->delete_me)
{
fd_handlers = _ecore_list_remove(fd_handlers, fdh);
fd_handlers = _ecore_list2_remove(fd_handlers, fdh);
ECORE_MAGIC_SET(fdh, ECORE_MAGIC_NONE);
free(fdh);
}
@ -388,9 +388,9 @@ _ecore_main_fd_handlers_cleanup(void)
static void
_ecore_main_fd_handlers_call(void)
{
Ecore_Oldlist *l;
Ecore_List2 *l;
for (l = (Ecore_Oldlist *)fd_handlers; l; l = l->next)
for (l = (Ecore_List2 *)fd_handlers; l; l = l->next)
{
Ecore_Fd_Handler *fdh;
@ -417,11 +417,11 @@ _ecore_main_fd_handlers_call(void)
static int
_ecore_main_fd_handlers_buf_call(void)
{
Ecore_Oldlist *l;
Ecore_List2 *l;
int ret;
ret = 0;
for (l = (Ecore_Oldlist *)fd_handlers; l; l = l->next)
for (l = (Ecore_List2 *)fd_handlers; l; l = l->next)
{
Ecore_Fd_Handler *fdh;

View File

@ -44,18 +44,18 @@
typedef unsigned int Ecore_Magic;
typedef struct _Ecore_Oldlist Ecore_Oldlist;
typedef struct _Ecore_Oldlist_Data Ecore_Oldlist_Data;
typedef struct _Ecore_List2 Ecore_List2;
typedef struct _Ecore_List2_Data Ecore_List2_Data;
struct _Ecore_Oldlist
struct _Ecore_List2
{
Ecore_Oldlist *next, *prev;
Ecore_Oldlist *last;
Ecore_List2 *next, *prev;
Ecore_List2 *last;
};
struct _Ecore_Oldlist_Data
struct _Ecore_List2_Data
{
Ecore_Oldlist __list_data;
Ecore_List2 __list_data;
void *data;
};
@ -84,7 +84,7 @@ typedef struct _Ecore_Animator Ecore_Animator;
#ifndef WIN32
struct _Ecore_Exe
{
Ecore_Oldlist __list_data;
Ecore_List2 __list_data;
ECORE_MAGIC;
pid_t pid;
void *data;
@ -93,7 +93,7 @@ struct _Ecore_Exe
struct _Ecore_Timer
{
Ecore_Oldlist __list_data;
Ecore_List2 __list_data;
ECORE_MAGIC;
double in;
double at;
@ -105,7 +105,7 @@ struct _Ecore_Timer
struct _Ecore_Idler
{
Ecore_Oldlist __list_data;
Ecore_List2 __list_data;
ECORE_MAGIC;
int delete_me : 1;
int (*func) (void *data);
@ -114,7 +114,7 @@ struct _Ecore_Idler
struct _Ecore_Idle_Enterer
{
Ecore_Oldlist __list_data;
Ecore_List2 __list_data;
ECORE_MAGIC;
int delete_me : 1;
int (*func) (void *data);
@ -123,7 +123,7 @@ struct _Ecore_Idle_Enterer
struct _Ecore_Idle_Exiter
{
Ecore_Oldlist __list_data;
Ecore_List2 __list_data;
ECORE_MAGIC;
int delete_me : 1;
int (*func) (void *data);
@ -132,7 +132,7 @@ struct _Ecore_Idle_Exiter
struct _Ecore_Fd_Handler
{
Ecore_Oldlist __list_data;
Ecore_List2 __list_data;
ECORE_MAGIC;
int fd;
Ecore_Fd_Handler_Flags flags;
@ -150,7 +150,7 @@ struct _Ecore_Fd_Handler
struct _Ecore_Event_Handler
{
Ecore_Oldlist __list_data;
Ecore_List2 __list_data;
ECORE_MAGIC;
int type;
int delete_me : 1;
@ -160,7 +160,7 @@ struct _Ecore_Event_Handler
struct _Ecore_Event_Filter
{
Ecore_Oldlist __list_data;
Ecore_List2 __list_data;
ECORE_MAGIC;
int delete_me : 1;
void * (*func_start) (void *data);
@ -172,7 +172,7 @@ struct _Ecore_Event_Filter
struct _Ecore_Event
{
Ecore_Oldlist __list_data;
Ecore_List2 __list_data;
ECORE_MAGIC;
int type;
void *event;
@ -183,7 +183,7 @@ struct _Ecore_Event
struct _Ecore_Animator
{
Ecore_Oldlist __list_data;
Ecore_List2 __list_data;
ECORE_MAGIC;
signed char delete_me : 1;
int (*func) (void *data);
@ -244,12 +244,12 @@ void *_ecore_exe_free(Ecore_Exe *exe);
void _ecore_animator_shutdown(void);
void *_ecore_list_append (void *in_list, void *in_item);
void *_ecore_list_prepend (void *in_list, void *in_item);
void *_ecore_list_append_relative (void *in_list, void *in_item, void *in_relative);
void *_ecore_list_prepend_relative (void *in_list, void *in_item, void *in_relative);
void *_ecore_list_remove (void *in_list, void *in_item);
void *_ecore_list_find (void *in_list, void *in_item);
void *_ecore_list2_append (void *in_list, void *in_item);
void *_ecore_list2_prepend (void *in_list, void *in_item);
void *_ecore_list2_append_relative (void *in_list, void *in_item, void *in_relative);
void *_ecore_list2_prepend_relative (void *in_list, void *in_item, void *in_relative);
void *_ecore_list2_remove (void *in_list, void *in_item);
void *_ecore_list2_find (void *in_list, void *in_item);
void _ecore_fps_debug_init(void);
void _ecore_fps_debug_shutdown(void);

View File

@ -90,7 +90,7 @@ _ecore_timer_shutdown(void)
Ecore_Timer *timer;
timer = timers;
timers = _ecore_list_remove(timers, timer);
timers = _ecore_list2_remove(timers, timer);
ECORE_MAGIC_SET(timer, ECORE_MAGIC_NONE);
free(timer);
}
@ -99,10 +99,10 @@ _ecore_timer_shutdown(void)
void
_ecore_timer_cleanup(void)
{
Ecore_Oldlist *l;
Ecore_List2 *l;
if (!timers_delete_me) return;
for (l = (Ecore_Oldlist *)timers; l;)
for (l = (Ecore_List2 *)timers; l;)
{
Ecore_Timer *timer;
@ -110,7 +110,7 @@ _ecore_timer_cleanup(void)
l = l->next;
if (timer->delete_me)
{
timers = _ecore_list_remove(timers, timer);
timers = _ecore_list2_remove(timers, timer);
ECORE_MAGIC_SET(timer, ECORE_MAGIC_NONE);
free(timer);
timers_delete_me--;
@ -123,11 +123,11 @@ _ecore_timer_cleanup(void)
void
_ecore_timer_enable_new(void)
{
Ecore_Oldlist *l;
Ecore_List2 *l;
if (!timers_added) return;
timers_added = 0;
for (l = (Ecore_Oldlist *)timers; l; l = l->next)
for (l = (Ecore_List2 *)timers; l; l = l->next)
{
Ecore_Timer *timer;
@ -152,28 +152,28 @@ _ecore_timer_next_get(void)
int
_ecore_timer_call(double when)
{
Ecore_Oldlist *l;
Ecore_List2 *l;
Ecore_Timer *timer;
if (!timers) return 0;
if (last_check > when)
{
/* User set time backwards */
for (l = (Ecore_Oldlist *)timers; l; l = l->next)
for (l = (Ecore_List2 *)timers; l; l = l->next)
{
timer = (Ecore_Timer *)l;
timer->at -= (last_check - when);
}
}
last_check = when;
for (l = (Ecore_Oldlist *)timers; l; l = l->next)
for (l = (Ecore_List2 *)timers; l; l = l->next)
{
timer = (Ecore_Timer *)l;
if ((timer->at <= when) &&
(!timer->just_added) &&
(!timer->delete_me))
{
timers = _ecore_list_remove(timers, timer);
timers = _ecore_list2_remove(timers, timer);
_ecore_timer_call(when);
if ((!timer->delete_me) && (timer->func(timer->data)))
{
@ -197,7 +197,7 @@ _ecore_timer_call(double when)
static void
_ecore_timer_set(Ecore_Timer *timer, double at, double in, int (*func) (void *data), void *data)
{
Ecore_Oldlist *l;
Ecore_List2 *l;
timers_added = 1;
timer->at = at;
@ -207,17 +207,17 @@ _ecore_timer_set(Ecore_Timer *timer, double at, double in, int (*func) (void *da
timer->just_added = 1;
if (timers)
{
for (l = ((Ecore_Oldlist *)(timers))->last; l; l = l->prev)
for (l = ((Ecore_List2 *)(timers))->last; l; l = l->prev)
{
Ecore_Timer *t2;
t2 = (Ecore_Timer *)l;
if (timer->at > t2->at)
{
timers = _ecore_list_append_relative(timers, timer, t2);
timers = _ecore_list2_append_relative(timers, timer, t2);
return;
}
}
}
timers = _ecore_list_prepend(timers, timer);
timers = _ecore_list2_prepend(timers, timer);
}

View File

@ -48,7 +48,7 @@ typedef struct _Ecore_Con_Dns_Query Ecore_Con_Dns_Query;
typedef struct _Ecore_Con_Dns_Cache Ecore_Con_Dns_Cache;
struct _Ecore_Con_Dns_Query {
Ecore_Oldlist list;
Ecore_List2 list;
/* Can ask three servers */
unsigned int id[SERVERS];
@ -70,7 +70,7 @@ struct _Ecore_Con_Dns_Query {
};
struct _Ecore_Con_Dns_Cache {
Ecore_Oldlist list;
Ecore_List2 list;
int ttl;
double time;
@ -251,12 +251,12 @@ ecore_con_dns_lookup(const char *name,
{
Ecore_Con_Dns_Query *query;
Ecore_Con_Dns_Cache *current;
Ecore_Oldlist *l;
Ecore_List2 *l;
if (!_server_count) return 0;
if ((!name) || (!*name)) return 0;
for (l = (Ecore_Oldlist *)_cache; l;)
for (l = (Ecore_List2 *)_cache; l;)
{
double time;
int i;
@ -267,7 +267,7 @@ ecore_con_dns_lookup(const char *name,
time = ecore_time_get();
if ((time - current->time) > current->ttl)
{
_cache = _ecore_list_remove(_cache, current);
_cache = _ecore_list2_remove(_cache, current);
_ecore_con_dns_cache_free(current);
}
else
@ -277,8 +277,8 @@ ecore_con_dns_lookup(const char *name,
{
if (done_cb)
done_cb(data, current->he);
_cache = _ecore_list_remove(_cache, current);
_cache = _ecore_list_prepend(_cache, current);
_cache = _ecore_list2_remove(_cache, current);
_cache = _ecore_list2_prepend(_cache, current);
return 1;
}
for (i = 0; current->he->h_aliases[i]; i++)
@ -287,8 +287,8 @@ ecore_con_dns_lookup(const char *name,
{
if (done_cb)
done_cb(data, current->he);
_cache = _ecore_list_remove(_cache, current);
_cache = _ecore_list_prepend(_cache, current);
_cache = _ecore_list2_remove(_cache, current);
_cache = _ecore_list2_prepend(_cache, current);
return 1;
}
}
@ -579,24 +579,24 @@ _ecore_con_cb_fd_handler(void *data, Ecore_Fd_Handler *fd_handler)
cache = malloc(sizeof(Ecore_Con_Dns_Cache));
if (cache)
{
Ecore_Oldlist *l;
Ecore_List2 *l;
cache->ttl = ttl;
cache->time = ecore_time_get();
cache->he = he;
_cache = _ecore_list_prepend(_cache, cache);
_cache = _ecore_list2_prepend(_cache, cache);
/* Check cache size */
i = 1;
l = (Ecore_Oldlist *)_cache;
l = (Ecore_List2 *)_cache;
while ((l = l->next))
i++;
/* Remove old stuff if cache to big */
if (i > 16)
{
cache = (Ecore_Con_Dns_Cache *)((Ecore_Oldlist *)_cache)->last;
_cache = _ecore_list_remove(_cache, cache);
cache = (Ecore_Con_Dns_Cache *)((Ecore_List2 *)_cache)->last;
_cache = _ecore_list2_remove(_cache, cache);
_ecore_con_dns_cache_free(cache);
}
}

View File

@ -44,7 +44,7 @@
static int ecore_dbus_server_send(Ecore_DBus_Server * svr,
char *command, int length);
Ecore_Oldlist *_ecore_dbus_message_print_field(Ecore_Oldlist * l,
Ecore_List2 *_ecore_dbus_message_print_field(Ecore_List2 * l,
unsigned char *buf);
void _ecore_dbus_message_print_raw(unsigned char *msg,
unsigned int msg_len);
@ -204,8 +204,8 @@ void
_ecore_dbus_message_free(void *data, void *ev)
{
Ecore_DBus_Message *msg = ev;
Ecore_Oldlist *l = (Ecore_Oldlist *) msg->body_fields;
Ecore_Oldlist *next;
Ecore_List2 *l = (Ecore_List2 *) msg->body_fields;
Ecore_List2 *next;
while (l)
{
@ -213,7 +213,7 @@ _ecore_dbus_message_free(void *data, void *ev)
free(l);
l = next;
}
l = (Ecore_Oldlist *) msg->header_fields;
l = (Ecore_List2 *) msg->header_fields;
while (l)
{
next = l->next;
@ -525,7 +525,7 @@ _ecore_dbus_message_unmarshal(Ecore_DBus_Server * svr, unsigned char *message)
while ((msg->hpos + 8 - (msg->hpos % 8)) < msg->hlength)
{
f = _ecore_dbus_message_unmarshal_custom_header(message, &msg->hpos);
msg->header_fields = _ecore_list_append(msg->header_fields, f);
msg->header_fields = _ecore_list2_append(msg->header_fields, f);
}
msg->hpos = msg->hlength;
/* message body */
@ -536,7 +536,7 @@ _ecore_dbus_message_unmarshal(Ecore_DBus_Server * svr, unsigned char *message)
while (msg->bpos < msg->blength)
{
f = _ecore_dbus_message_unmarshal_data(message, &msg->bpos);
msg->body_fields = _ecore_list_append(msg->body_fields, f);
msg->body_fields = _ecore_list2_append(msg->body_fields, f);
}
return msg;
@ -591,10 +591,10 @@ void *
ecore_dbus_get_body_field(Ecore_DBus_Message * m, Ecore_DBus_Message_Field * mf,
unsigned int pos)
{
Ecore_Oldlist *l, *list;
unsigned int i = 0;
Ecore_List2 *l, *list;
unsigned int i = 0;
list = (Ecore_Oldlist *) mf;
list = (Ecore_List2 *) mf;
for (l = list; l; l = l->next)
{
@ -611,9 +611,9 @@ ecore_dbus_get_header_field(Ecore_DBus_Message * m,
Ecore_DBus_Message_Field * mf,
Ecore_DBus_Message_Header_Field hft)
{
Ecore_Oldlist *l, *list;
Ecore_List2 *l, *list;
list = (Ecore_Oldlist *) mf;
list = (Ecore_List2 *) mf;
for (l = list; l; l = l->next)
if (((Ecore_DBus_Message_Field *) l)->hfield == hft)
return _ecore_dbus_get_field(m->header,
@ -623,8 +623,8 @@ ecore_dbus_get_header_field(Ecore_DBus_Message * m,
/* printing functions */
/**********************/
Ecore_Oldlist *
_ecore_dbus_message_print_field(Ecore_Oldlist * l, unsigned char *buf)
Ecore_List2 *
_ecore_dbus_message_print_field(Ecore_List2 * l, unsigned char *buf)
{
int i;
Ecore_DBus_Message_Field *f;
@ -675,8 +675,8 @@ _ecore_dbus_message_print_field(Ecore_Oldlist * l, unsigned char *buf)
return l->next;
}
Ecore_Oldlist *
_ecore_dbus_message_print_header_field(Ecore_Oldlist * l, unsigned char *buf)
Ecore_List2 *
_ecore_dbus_message_print_header_field(Ecore_List2 * l, unsigned char *buf)
{
static const char *header_fields[] =
{ "INVALID", "PATH", "INTERFACE", "MEMBER", "ERROR_NAME", "REPLY_SERIAL",
@ -692,10 +692,10 @@ _ecore_dbus_message_print_header_field(Ecore_Oldlist * l, unsigned char *buf)
void
_ecore_dbus_message_print_fields(Ecore_DBus_Message_Field * f)
{
int i = 0;
Ecore_Oldlist *l;
int i = 0;
Ecore_List2 *l;
l = (Ecore_Oldlist *) f;
l = (Ecore_List2 *) f;
while (l)
{
printf("%d\n", i);
@ -727,7 +727,7 @@ _ecore_dbus_message_print_raw(unsigned char *msg, unsigned int msg_len)
void
ecore_dbus_message_print(Ecore_DBus_Message * msg)
{
Ecore_Oldlist *list;
Ecore_List2 *list;
static const char *msg_type[] =
{ "INVALID", "METHOD_CALL", "METHOD_RETURN", "ERROR", "SIGNAL" };
printf("[ecore_dbus] per field message:\n");
@ -743,14 +743,14 @@ ecore_dbus_message_print(Ecore_DBus_Message * msg)
printf("[ecore_dbus] header serial : %lu\n", msg->serial);
/* header custom fields */
list = (Ecore_Oldlist *) msg->header_fields;
list = (Ecore_List2 *) msg->header_fields;
while (list)
{
list = _ecore_dbus_message_print_header_field(list, msg->header);
}
/* body fields */
printf("[ecore_dbus] body fields:\n");
list = (Ecore_Oldlist *) msg->body_fields;
list = (Ecore_List2 *) msg->body_fields;
while (list)
{
list = _ecore_dbus_message_print_field(list, msg->body);
@ -787,7 +787,7 @@ ecore_dbus_message_new_method_call(Ecore_DBus_Server * svr, char *service,
1,
ECORE_DBUS_DATA_TYPE_OBJECT_PATH,
path);
msg->header_fields = _ecore_list_append(msg->header_fields, f);
msg->header_fields = _ecore_list2_append(msg->header_fields, f);
}
if (interface)
@ -796,7 +796,7 @@ ecore_dbus_message_new_method_call(Ecore_DBus_Server * svr, char *service,
2,
ECORE_DBUS_DATA_TYPE_STRING,
interface);
msg->header_fields = _ecore_list_append(msg->header_fields, f);
msg->header_fields = _ecore_list2_append(msg->header_fields, f);
}
if (method)
{
@ -804,7 +804,7 @@ ecore_dbus_message_new_method_call(Ecore_DBus_Server * svr, char *service,
3,
ECORE_DBUS_DATA_TYPE_STRING,
method);
msg->header_fields = _ecore_list_append(msg->header_fields, f);
msg->header_fields = _ecore_list2_append(msg->header_fields, f);
}
if (service)
{
@ -812,7 +812,7 @@ ecore_dbus_message_new_method_call(Ecore_DBus_Server * svr, char *service,
6,
ECORE_DBUS_DATA_TYPE_STRING,
service);
msg->header_fields = _ecore_list_append(msg->header_fields, f);
msg->header_fields = _ecore_list2_append(msg->header_fields, f);
}
if (fmt)
{
@ -820,7 +820,7 @@ ecore_dbus_message_new_method_call(Ecore_DBus_Server * svr, char *service,
8,
ECORE_DBUS_DATA_TYPE_STRING,
fmt);
msg->header_fields = _ecore_list_append(msg->header_fields, f);
msg->header_fields = _ecore_list2_append(msg->header_fields, f);
}
_ecore_dbus_message_8byte_padding(&msg->header, &msg->hpos);
/* header length */
@ -834,17 +834,17 @@ ecore_dbus_message_new_method_call(Ecore_DBus_Server * svr, char *service,
case ECORE_DBUS_DATA_TYPE_UINT32:
f = _ecore_dbus_message_marshal_uint32(&msg->body, &msg->bpos,
va_arg(ap, unsigned long));
msg->body_fields = _ecore_list_append(msg->body_fields, f);
msg->body_fields = _ecore_list2_append(msg->body_fields, f);
break;
case ECORE_DBUS_DATA_TYPE_STRING:
f = _ecore_dbus_message_marshal_string(&msg->body, &msg->bpos,
(unsigned char *)va_arg(ap, char *));
msg->body_fields = _ecore_list_append(msg->body_fields, f);
msg->body_fields = _ecore_list2_append(msg->body_fields, f);
break;
case ECORE_DBUS_DATA_TYPE_OBJECT_PATH:
f = _ecore_dbus_message_marshal_path(&msg->body, &msg->bpos,
(unsigned char *)va_arg(ap, char *));
msg->body_fields = _ecore_list_append(msg->body_fields, f);
msg->body_fields = _ecore_list2_append(msg->body_fields, f);
break;
case ECORE_DBUS_DATA_TYPE_INVALID:
case ECORE_DBUS_DATA_TYPE_BYTE:
@ -1064,7 +1064,7 @@ ecore_dbus_server_connect(Ecore_DBus_Type compl_type, char *name, int port,
svr->cnt_msg = 0;
svr->auth_type = -1;
svr->auth_type_transaction = 0;
servers = _ecore_list_append(servers, svr);
servers = _ecore_list2_append(servers, svr);
return svr;
}
@ -1103,7 +1103,7 @@ _ecore_dbus_event_server_add(void *data, int ev_type, void *ev)
Ecore_DBus_Event_Server_Add *e;
e = ev;
if (!_ecore_list_find(servers, ecore_con_server_data_get(e->server)))
if (!_ecore_list2_find(servers, ecore_con_server_data_get(e->server)))
return 1;
{
Ecore_DBus_Server *svr;
@ -1122,7 +1122,7 @@ _ecore_dbus_event_server_del(void *udata, int ev_type, void *ev)
Ecore_Con_Event_Server_Del *e;
e = ev;
if (!_ecore_list_find(servers, ecore_con_server_data_get(e->server)))
if (!_ecore_list2_find(servers, ecore_con_server_data_get(e->server)))
return 1;
{
Ecore_DBus_Server *svr;
@ -1155,7 +1155,7 @@ _ecore_dbus_event_server_data(void *udata, int ev_type, void *ev)
Ecore_Con_Event_Server_Data *e;
e = ev;
if (!_ecore_list_find(servers, ecore_con_server_data_get(e->server)))
if (!_ecore_list2_find(servers, ecore_con_server_data_get(e->server)))
return 1;
{

View File

@ -32,7 +32,7 @@ _ecore_evas_buffer_init(void)
static void
_ecore_evas_buffer_free(Ecore_Evas *ee)
{
ecore_evases = _ecore_list_remove(ecore_evases, ee);
ecore_evases = _ecore_list2_remove(ecore_evases, ee);
_ecore_evas_buffer_shutdown();
if (ee->engine.buffer.image)
{
@ -494,7 +494,7 @@ ecore_evas_buffer_new(int w, int h)
evas_event_feed_mouse_in(ee->evas, 0, NULL);
ecore_evases = _ecore_list_prepend(ecore_evases, ee);
ecore_evases = _ecore_list2_prepend(ecore_evases, ee);
return ee;
#else
return NULL;

View File

@ -57,9 +57,9 @@ _ecore_evas_mouse_move_process(Ecore_Evas *ee, int x, int y, unsigned int timest
static Ecore_Evas *
_ecore_evas_fb_match(void)