LISt delcares. put list at top.

SVN revision: 15074
This commit is contained in:
Carsten Haitzler 2005-06-03 02:37:26 +00:00
parent a7c8387b1e
commit d49cd726fa
1 changed files with 21 additions and 20 deletions

View File

@ -265,28 +265,29 @@ break;
GENERIC(HDL);
Evas_List *dat = NULL;
DECODE(e_ipc_codec_str_int_list_dec) {
RESPONSE(r, E_Response_Module_List, HDL);
LIST();
int count;
RESPONSE(r, E_Response_Module_List, HDL);
/* FIXME - this is a mess, needs to be merged into macros... */
int count = evas_list_count(dat);
r->modules = malloc(sizeof(E_Response_Module_Data *) * count);
r->count = count;
/* FIXME - this is a mess, needs to be merged into macros... */
count = evas_list_count(dat);
r->modules = malloc(sizeof(E_Response_Module_Data *) * count);
r->count = count;
LIST()
count = 0;
FOR(dat) {
E_Response_Module_Data *md;
E_Ipc_Str_Int *v;
v = l->data;
md = malloc(sizeof(E_Response_Module_Data));
md->name = v->str;
md->enabled = v->val;
r->modules[count] = md;
count ++;
}
END_RESPONSE(r, E_RESPONSE_MODULE_LIST); /* FIXME - need a custom free */
count = 0;
FOR(dat) {
E_Response_Module_Data *md;
E_Ipc_Str_Int *v;
v = l->data;
md = malloc(sizeof(E_Response_Module_Data));
md->name = v->str;
md->enabled = v->val;
r->modules[count] = md;
count++;
}
END_RESPONSE(r, E_RESPONSE_MODULE_LIST); /* FIXME - need a custom free */
}
END_GENERIC();
#endif