Remove Evas list from Edje and use Eina instead.

SVN revision: 36961
devs/devilhorns/wayland_egl
Cedric BAIL 14 years ago
parent f7283eb333
commit fa66dbf40a
  1. 12
      legacy/edje/src/bin/edje_cc.c
  2. 26
      legacy/edje/src/bin/edje_cc.h
  3. 641
      legacy/edje/src/bin/edje_cc_handlers.c
  4. 260
      legacy/edje/src/bin/edje_cc_out.c
  5. 75
      legacy/edje/src/bin/edje_cc_parse.c
  6. 12
      legacy/edje/src/bin/edje_cc_sources.c
  7. 28
      legacy/edje/src/bin/edje_decc.c
  8. 6
      legacy/edje/src/bin/edje_decc.h
  9. 10
      legacy/edje/src/lib/Edje.h
  10. 34
      legacy/edje/src/lib/Edje_Edit.h
  11. 124
      legacy/edje/src/lib/edje_cache.c
  12. 27
      legacy/edje/src/lib/edje_calc.c
  13. 41
      legacy/edje/src/lib/edje_callbacks.c
  14. 54
      legacy/edje/src/lib/edje_container.c
  15. 2
      legacy/edje/src/lib/edje_container.h
  16. 8
      legacy/edje/src/lib/edje_data.c
  17. 797
      legacy/edje/src/lib/edje_edit.c
  18. 20
      legacy/edje/src/lib/edje_embryo.c
  19. 73
      legacy/edje/src/lib/edje_entry.c
  20. 203
      legacy/edje/src/lib/edje_load.c
  21. 22
      legacy/edje/src/lib/edje_main.c
  22. 24
      legacy/edje/src/lib/edje_match.c
  23. 59
      legacy/edje/src/lib/edje_message_queue.c
  24. 72
      legacy/edje/src/lib/edje_private.h
  25. 187
      legacy/edje/src/lib/edje_program.c
  26. 24
      legacy/edje/src/lib/edje_smart.c
  27. 40
      legacy/edje/src/lib/edje_text.c
  28. 60
      legacy/edje/src/lib/edje_textblock_styles.c
  29. 160
      legacy/edje/src/lib/edje_util.c
  30. 109
      legacy/edje/src/lib/edje_var.c

@ -6,9 +6,9 @@
static void main_help(void);
Evas_List *img_dirs = NULL;
Evas_List *fnt_dirs = NULL;
Evas_List *defines = NULL;
Eina_List *img_dirs = NULL;
Eina_List *fnt_dirs = NULL;
Eina_List *defines = NULL;
char *file_in = NULL;
char *file_out = NULL;
char *progname = NULL;
@ -79,12 +79,12 @@ main(int argc, char **argv)
else if ((!strcmp(argv[i], "-id") || !strcmp(argv[i], "--image_dir")) && (i < (argc - 1)))
{
i++;
img_dirs = evas_list_append(img_dirs, argv[i]);
img_dirs = eina_list_append(img_dirs, argv[i]);
}
else if ((!strcmp(argv[i], "-fd") || !strcmp(argv[i], "--font_dir")) && (i < (argc - 1)))
{
i++;
fnt_dirs = evas_list_append(fnt_dirs, argv[i]);
fnt_dirs = eina_list_append(fnt_dirs, argv[i]);
}
else if ((!strcmp(argv[i], "-min-quality")) && (i < (argc - 1)))
{
@ -102,7 +102,7 @@ main(int argc, char **argv)
}
else if (!strncmp(argv[i], "-D", 2))
{
defines = evas_list_append(defines, mem_strdup(argv[i]));
defines = eina_list_append(defines, mem_strdup(argv[i]));
}
else if ((!strcmp(argv[i], "-o")) && (i < (argc - 1)))
{

@ -36,7 +36,7 @@ struct _New_Statement_Handler
struct _Font_List
{
Evas_List *list;
Eina_List *list;
};
struct _Font
@ -49,7 +49,7 @@ struct _Code
{
int l1, l2;
char *shared;
Evas_List *programs;
Eina_List *programs;
};
struct _Code_Program
@ -67,7 +67,7 @@ struct _SrcFile
struct _SrcFile_List
{
Evas_List *list;
Eina_List *list;
};
/* global fn calls */
@ -112,7 +112,7 @@ void source_edd(void);
void source_fetch(void);
int source_append(Eet_File *ef);
SrcFile_List *source_load(Eet_File *ef);
int source_fontmap_save(Eet_File *ef, Evas_List *fonts);
int source_fontmap_save(Eet_File *ef, Eina_List *fonts);
Font_List *source_fontmap_load(Eet_File *ef);
void *mem_alloc(size_t size);
@ -120,8 +120,8 @@ char *mem_strdup(const char *s);
#define SZ sizeof
/* global vars */
extern Evas_List *img_dirs;
extern Evas_List *fnt_dirs;
extern Eina_List *img_dirs;
extern Eina_List *fnt_dirs;
extern char *file_in;
extern char *file_out;
extern char *progname;
@ -132,14 +132,14 @@ extern int no_raw;
extern int min_quality;
extern int max_quality;
extern int line;
extern Evas_List *stack;
extern Evas_List *params;
extern Eina_List *stack;
extern Eina_List *params;
extern Edje_File *edje_file;
extern Evas_List *edje_collections;
extern Evas_List *fonts;
extern Evas_List *codes;
extern Evas_List *defines;
extern Evas_List *aliases;
extern Eina_List *edje_collections;
extern Eina_List *fonts;
extern Eina_List *codes;
extern Eina_List *defines;
extern Eina_List *aliases;
extern New_Object_Handler object_handlers[];
extern New_Statement_Handler statement_handlers[];

File diff suppressed because it is too large Load Diff

@ -53,11 +53,11 @@ struct _Code_Lookup
static void data_process_string(Edje_Part_Collection *pc, const char *prefix, char *s, void (*func)(Edje_Part_Collection *pc, char *name, char *ptr, int len));
Edje_File *edje_file = NULL;
Evas_List *edje_collections = NULL;
Evas_List *fonts = NULL;
Evas_List *codes = NULL;
Evas_List *code_lookups = NULL;
Evas_List *aliases = NULL;
Eina_List *edje_collections = NULL;
Eina_List *fonts = NULL;
Eina_List *codes = NULL;
Eina_List *code_lookups = NULL;
Eina_List *aliases = NULL;
static Eet_Data_Descriptor *edd_edje_file = NULL;
static Eet_Data_Descriptor *edd_edje_image_directory = NULL;
@ -74,14 +74,14 @@ static Eet_Data_Descriptor *edd_edje_part_description = NULL;
static Eet_Data_Descriptor *edd_edje_part_image_id = NULL;
static Eet_Data_Descriptor *edd_edje_spectrum_color = NULL;
static Evas_List *part_lookups = NULL;
static Evas_List *program_lookups = NULL;
static Evas_List *group_lookups = NULL;
static Evas_List *image_lookups = NULL;
static Evas_List *spectrum_lookups = NULL;
static Evas_List *part_slave_lookups = NULL;
static Evas_List *image_slave_lookups= NULL;
static Evas_List *spectrum_slave_lookups= NULL;
static Eina_List *part_lookups = NULL;
static Eina_List *program_lookups = NULL;
static Eina_List *group_lookups = NULL;
static Eina_List *image_lookups = NULL;
static Eina_List *spectrum_lookups = NULL;
static Eina_List *part_slave_lookups = NULL;
static Eina_List *image_slave_lookups= NULL;
static Eina_List *spectrum_slave_lookups= NULL;
#define ABORT_WRITE(eet_file, file) \
eet_close(eet_file); \
@ -124,7 +124,8 @@ static void
check_image_part_desc (Edje_Part_Collection *pc, Edje_Part *ep,
Edje_Part_Description *epd, Eet_File *ef)
{
Evas_List *l;
Eina_List *l;
Edje_Part_Image_Id *iid;
return;
if (epd->image.id == -1)
@ -132,10 +133,8 @@ check_image_part_desc (Edje_Part_Collection *pc, Edje_Part *ep,
"part \"%s\", description \"%s\" %f\n",
pc->id, ep->name, epd->state.name, epd->state.value);
for (l = epd->image.tween_list; l; l = l->next)
EINA_LIST_FOREACH(epd->image.tween_list, l, iid)
{
Edje_Part_Image_Id *iid = l->data;
if (iid->id == -1)
error_and_abort(ef, "Collection %i: tween image id missing for "
"part \"%s\", description \"%s\" %f\n",
@ -147,7 +146,8 @@ static void
check_part (Edje_Part_Collection *pc, Edje_Part *ep, Eet_File *ef)
{
Edje_Part_Description *epd = ep->default_desc;
Evas_List *l;
Eina_List *l;
Edje_Part_Description *data;
if (!epd)
error_and_abort(ef, "Collection %i: default description missing "
@ -157,8 +157,8 @@ check_part (Edje_Part_Collection *pc, Edje_Part *ep, Eet_File *ef)
{
check_image_part_desc (pc, ep, epd, ef);
for (l = ep->other_desc; l; l = l->next)
check_image_part_desc (pc, ep, l->data, ef);
EINA_LIST_FOREACH(ep->other_desc, l, data)
check_image_part_desc (pc, ep, data, ef);
}
}
@ -204,8 +204,8 @@ data_write_header(Eet_File *ef)
/* copy aliases into collection directory */
while (aliases)
{
edje_file->collection_dir->entries = evas_list_append(edje_file->collection_dir->entries, aliases->data);
aliases = evas_list_remove_list(aliases, aliases);
edje_file->collection_dir->entries = eina_list_append(edje_file->collection_dir->entries, eina_list_data_get(aliases));
aliases = eina_list_remove_list(aliases, aliases);
}
}
bytes = eet_data_write(ef, edd_edje_file, "edje_file", edje_file, 1);
@ -226,19 +226,18 @@ data_write_header(Eet_File *ef)
static int
data_write_fonts(Eet_File *ef, int *font_num, int *input_bytes, int *input_raw_bytes)
{
Evas_List *l;;
Eina_List *l;;
int bytes = 0;
int total_bytes = 0;
Font *fn;
for (l = fonts; l; l = l->next)
EINA_LIST_FOREACH(fonts, l, fn)
{
Font *fn;
void *fdata = NULL;
int fsize = 0;
Evas_List *ll;
Eina_List *ll;
FILE *f;
fn = l->data;
f = fopen(fn->file, "rb");
if (f)
{
@ -259,11 +258,13 @@ data_write_fonts(Eet_File *ef, int *font_num, int *input_bytes, int *input_raw_b
}
else
{
for (ll = fnt_dirs; ll; ll = ll->next)
char *data;
EINA_LIST_FOREACH(fnt_dirs, ll, data)
{
char buf[4096];
snprintf(buf, sizeof(buf), "%s/%s", (char *)(ll->data), fn->file);
snprintf(buf, sizeof(buf), "%s/%s", data, fn->file);
f = fopen(buf, "rb");
if (f)
{
@ -322,7 +323,7 @@ data_write_fonts(Eet_File *ef, int *font_num, int *input_bytes, int *input_raw_b
static int
data_write_images(Eet_File *ef, int *image_num, int *input_bytes, int *input_raw_bytes)
{
Evas_List *l;
Eina_List *l;
int bytes = 0;
int total_bytes = 0;
@ -330,6 +331,7 @@ data_write_images(Eet_File *ef, int *image_num, int *input_bytes, int *input_raw
{
Ecore_Evas *ee;
Evas *evas;
Edje_Image_Directory_Entry *img;
ecore_init();
ecore_evas_init();
@ -340,26 +342,24 @@ data_write_images(Eet_File *ef, int *image_num, int *input_bytes, int *input_raw
"load.\n");
evas = ecore_evas_get(ee);
for (l = edje_file->image_dir->entries; l; l = l->next)
EINA_LIST_FOREACH(edje_file->image_dir->entries, l, img)
{
Edje_Image_Directory_Entry *img;
img = l->data;
if (img->source_type == EDJE_IMAGE_SOURCE_TYPE_EXTERNAL)
{
}
else
{
Evas_Object *im;
Evas_List *ll;
Eina_List *ll;
char *data;
im = NULL;
for (ll = img_dirs; ll; ll = ll->next)
EINA_LIST_FOREACH(img_dirs, ll, data)
{
char buf[4096];
snprintf(buf, sizeof(buf), "%s/%s",
(char *)(ll->data), img->entry);
data, img->entry);
im = evas_object_image_add(evas);
if (im)
{
@ -501,70 +501,64 @@ data_write_images(Eet_File *ef, int *image_num, int *input_bytes, int *input_raw
static void
check_groups_names(Eet_File *ef)
{
Evas_List *l;
Eina_List *l;
Edje_Part_Collection_Directory_Entry *de;
if (!edje_file->collection_dir)
return;
/* check that all groups have names */
for (l = edje_file->collection_dir->entries; l; l = l->next)
{
Edje_Part_Collection_Directory_Entry *de;
de = l->data;
EINA_LIST_FOREACH(edje_file->collection_dir->entries, l, de)
if (!de->entry)
error_and_abort(ef, "Collection %i: name missing.\n", de->id);
}
}
static void
check_spectra(Eet_File *ef)
{
Evas_List *l;
Eina_List *l;
Edje_Spectrum_Directory_Entry *se;
if (!edje_file->spectrum_dir)
return;
/* check that all spectra are valid */
for (l = edje_file->spectrum_dir->entries; l; l = l->next)
{
Edje_Spectrum_Directory_Entry *se;
se = l->data;
check_spectrum(se, ef);
}
EINA_LIST_FOREACH(edje_file->spectrum_dir->entries, l, se)
check_spectrum(se, ef);
}
static void
check_groups(Eet_File *ef)
{
Evas_List *l;
Eina_List *l;
Edje_Part_Collection *pc;
/* sanity checks for parts and programs */
for (l = edje_collections; l; l = l->next)
EINA_LIST_FOREACH(edje_collections, l, pc)
{
Edje_Part_Collection *pc;
Evas_List *ll;
pc = l->data;
for (ll = pc->parts; ll; ll = ll->next)
check_part(pc, ll->data, ef);
for (ll = pc->programs; ll; ll = ll->next)
check_program(pc, ll->data, ef);
Eina_List *ll;
Edje_Part *part;
Edje_Program *prog;
EINA_LIST_FOREACH(pc->parts, ll, part)
check_part(pc, part, ef);
EINA_LIST_FOREACH(pc->programs, ll, prog)
check_program(pc, prog, ef);
}
}
static int
data_write_groups(Eet_File *ef, int *collection_num)
{
Evas_List *l;
Eina_List *l;
Edje_Part_Collection *pc;
int bytes = 0;
int total_bytes = 0;
for (l = edje_collections; l; l = l->next)
EINA_LIST_FOREACH(edje_collections, l, pc)
{
Edje_Part_Collection *pc;
char buf[4096];
pc = l->data;
snprintf(buf, sizeof(buf), "collections/%i", pc->id);
bytes = eet_data_write(ef, edd_edje_part_collection, buf, pc, 1);
if (bytes <= 0)
@ -592,7 +586,8 @@ create_script_file(Eet_File *ef, const char *filename, const Code *cd)
error_and_abort(ef, "Unable to open temp file \"%s\" for script "
"compilation.\n", filename);
Evas_List *ll;
Eina_List *ll;
Code_Program *cp;
fprintf(f, "#include <edje>\n");
int ln = 2;
@ -624,11 +619,8 @@ create_script_file(Eet_File *ef, const char *filename, const Code *cd)
}
ln += cd->l2 - cd->l1 + 1;
}
for (ll = cd->programs; ll; ll = ll->next)
EINA_LIST_FOREACH(cd->programs, ll, cp)
{
Code_Program *cp;
cp = ll->data;
if (cp->script)
{
while (ln < (cp->l1 - 1))
@ -713,7 +705,7 @@ compile_script_file(Eet_File *ef, const char *source, const char *output,
static void
data_write_scripts(Eet_File *ef)
{
Evas_List *l;
Eina_List *l;
int i;
#ifdef HAVE_EVIL
@ -722,10 +714,10 @@ data_write_scripts(Eet_File *ef)
char *tmpdir = "/tmp";
#endif
for (i = 0, l = codes; l; l = l->next, i++)
for (i = 0, l = codes; l; l = eina_list_next(l), i++)
{
int fd;
Code *cd = l->data;
Code *cd = eina_list_data_get(l);
if ((!cd->shared) && (!cd->programs))
continue;
@ -846,7 +838,7 @@ data_queue_group_lookup(char *name)
Group_Lookup *gl;
gl = mem_alloc(SZ(Group_Lookup));
group_lookups = evas_list_append(group_lookups, gl);
group_lookups = eina_list_append(group_lookups, gl);
gl->name = mem_strdup(name);
}
@ -856,7 +848,7 @@ data_queue_part_lookup(Edje_Part_Collection *pc, char *name, int *dest)
Part_Lookup *pl;
pl = mem_alloc(SZ(Part_Lookup));
part_lookups = evas_list_append(part_lookups, pl);
part_lookups = eina_list_append(part_lookups, pl);
pl->pc = pc;
pl->name = mem_strdup(name);
pl->dest = dest;
@ -868,7 +860,7 @@ data_queue_program_lookup(Edje_Part_Collection *pc, char *name, int *dest)
Program_Lookup *pl;
pl = mem_alloc(SZ(Program_Lookup));
program_lookups = evas_list_append(program_lookups, pl);
program_lookups = eina_list_append(program_lookups, pl);
pl->pc = pc;
pl->name = mem_strdup(name);
pl->dest = dest;
@ -880,7 +872,7 @@ data_queue_image_lookup(char *name, int *dest)
Image_Lookup *il;
il = mem_alloc(SZ(Image_Lookup));
image_lookups = evas_list_append(image_lookups, il);
image_lookups = eina_list_append(image_lookups, il);
il->name = mem_strdup(name);
il->dest = dest;
}
@ -891,7 +883,7 @@ data_queue_spectrum_lookup(char *name, int *dest)
Spectrum_Lookup *sl;
sl = mem_alloc(SZ(Spectrum_Lookup));
spectrum_lookups = evas_list_append(spectrum_lookups, sl);
spectrum_lookups = eina_list_append(spectrum_lookups, sl);
sl->name = mem_strdup(name);
sl->dest = dest;
}
@ -902,7 +894,7 @@ data_queue_part_slave_lookup(int *master, int *slave)
Slave_Lookup *sl;
sl = mem_alloc(SZ(Slave_Lookup));
part_slave_lookups = evas_list_append(part_slave_lookups, sl);
part_slave_lookups = eina_list_append(part_slave_lookups, sl);
sl->master = master;
sl->slave = slave;
}
@ -913,7 +905,7 @@ data_queue_image_slave_lookup(int *master, int *slave)
Slave_Lookup *sl;
sl = mem_alloc(SZ(Slave_Lookup));
image_slave_lookups = evas_list_append(image_slave_lookups, sl);
image_slave_lookups = eina_list_append(image_slave_lookups, sl);
sl->master = master;
sl->slave = slave;
}
@ -924,41 +916,36 @@ data_queue_spectrum_slave_lookup(int *master, int *slave)
Slave_Lookup *sl;
sl = mem_alloc(SZ(Slave_Lookup));
spectrum_slave_lookups = evas_list_append(spectrum_slave_lookups, sl);
spectrum_slave_lookups = eina_list_append(spectrum_slave_lookups, sl);
sl->master = master;
sl->slave = slave;
}
void
handle_slave_lookup(Evas_List *list, int *master, int value)
handle_slave_lookup(Eina_List *list, int *master, int value)
{
Evas_List *l;
for (l = list; l; l = l->next)
{
Slave_Lookup *sl = l->data;
Eina_List *l;
Slave_Lookup *sl;
if (sl->master == master)
*sl->slave = value;
}
EINA_LIST_FOREACH(list, l, sl)
if (sl->master == master)
*sl->slave = value;
}
void
data_process_lookups(void)
{
Evas_List *l;
Eina_List *l;
while (part_lookups)
{
Part_Lookup *pl;
Edje_Part *ep;
pl = part_lookups->data;
pl = eina_list_data_get(part_lookups);
for (l = pl->pc->parts; l; l = l->next)
EINA_LIST_FOREACH(pl->pc->parts, l, ep)
{
Edje_Part *ep;
ep = l->data;
if ((ep->name) && (!strcmp(ep->name, pl->name)))
{
handle_slave_lookup(part_slave_lookups, pl->dest, ep->id);
@ -972,7 +959,7 @@ data_process_lookups(void)
progname, pl->name);
exit(-1);
}
part_lookups = evas_list_remove(part_lookups, pl);
part_lookups = eina_list_remove(part_lookups, pl);
free(pl->name);
free(pl);
}
@ -980,14 +967,12 @@ data_process_lookups(void)
while (program_lookups)
{
Program_Lookup *pl;
Edje_Program *ep;
pl = program_lookups->data;
pl = eina_list_data_get(program_lookups);
for (l = pl->pc->programs; l; l = l->next)
EINA_LIST_FOREACH(pl->pc->programs, l, ep)
{
Edje_Program *ep;
ep = l->data;
if ((ep->name) && (!strcmp(ep->name, pl->name)))
{
*(pl->dest) = ep->id;
@ -1000,7 +985,7 @@ data_process_lookups(void)
progname, pl->name);
exit(-1);
}
program_lookups = evas_list_remove(program_lookups, pl);
program_lookups = eina_list_remove(program_lookups, pl);
free(pl->name);
free(pl);
}
@ -1008,12 +993,12 @@ data_process_lookups(void)
while (group_lookups)
{
Group_Lookup *gl;
Edje_Part_Collection_Directory_Entry *de;
gl = eina_list_data_get(group_lookups);
gl = group_lookups->data;
for (l = edje_file->collection_dir->entries; l; l = l->next)
EINA_LIST_FOREACH(edje_file->collection_dir->entries, l, de)
{
Edje_Part_Collection_Directory_Entry *de;
de = l->data;
if (!strcmp(de->entry, gl->name))
{
break;
@ -1025,7 +1010,7 @@ data_process_lookups(void)
progname, gl->name);
exit(-1);
}
group_lookups = evas_list_remove(group_lookups, gl);
group_lookups = eina_list_remove(group_lookups, gl);
free(gl->name);
free(gl);
}
@ -1033,18 +1018,16 @@ data_process_lookups(void)
while (image_lookups)
{
Image_Lookup *il;
Edje_Image_Directory_Entry *de;
il = image_lookups->data;
il = eina_list_data_get(image_lookups);
if (!edje_file->image_dir)
l = NULL;
else
{
for (l = edje_file->image_dir->entries; l; l = l->next)
EINA_LIST_FOREACH(edje_file->image_dir->entries, l, de)
{
Edje_Image_Directory_Entry *de;
de = l->data;
if ((de->entry) && (!strcmp(de->entry, il->name)))
{
handle_slave_lookup(image_slave_lookups, il->dest, de->id);
@ -1063,7 +1046,7 @@ data_process_lookups(void)
progname, il->name);
exit(-1);
}
image_lookups = evas_list_remove(image_lookups, il);
image_lookups = eina_list_remove(image_lookups, il);
free(il->name);
free(il);
}
@ -1071,18 +1054,16 @@ data_process_lookups(void)
while (spectrum_lookups)
{
Spectrum_Lookup *il;
Edje_Spectrum_Directory_Entry *de;
il = spectrum_lookups->data;
il = eina_list_data_get(spectrum_lookups);
if (!edje_file->spectrum_dir)
l = NULL;
else
{
for (l = edje_file->spectrum_dir->entries; l; l = l->next)
EINA_LIST_FOREACH(edje_file->spectrum_dir->entries, l, de)
{
Edje_Spectrum_Directory_Entry *de;
de = l->data;
*(il->dest) = 1;
if ((de->entry) && (!strcmp(de->entry, il->name)))
{
@ -1099,27 +1080,27 @@ data_process_lookups(void)
progname, il->name);
exit(-1);
}
spectrum_lookups = evas_list_remove(spectrum_lookups, il);
spectrum_lookups = eina_list_remove(spectrum_lookups, il);
free(il->name);
free(il);
}
while (part_slave_lookups)
{
free(part_slave_lookups->data);
part_slave_lookups = evas_list_remove_list(part_slave_lookups, part_slave_lookups);
free(eina_list_data_get(part_slave_lookups));
part_slave_lookups = eina_list_remove_list(part_slave_lookups, part_slave_lookups);
}
while (image_slave_lookups)
{
free(image_slave_lookups->data);
image_slave_lookups = evas_list_remove_list(image_slave_lookups, image_slave_lookups);
free(eina_list_data_get(image_slave_lookups));
image_slave_lookups = eina_list_remove_list(image_slave_lookups, image_slave_lookups);
}
while (spectrum_slave_lookups)
{
free(spectrum_slave_lookups->data);
spectrum_slave_lookups = evas_list_remove_list(spectrum_slave_lookups, spectrum_slave_lookups);
free(eina_list_data_get(spectrum_slave_lookups));
spectrum_slave_lookups = eina_list_remove_list(spectrum_slave_lookups, spectrum_slave_lookups);
}
}
@ -1244,7 +1225,7 @@ _data_queue_part_lookup(Edje_Part_Collection *pc, char *name, char *ptr, int len
data_queue_part_lookup(pc, name, &(cl->val));
code_lookups = evas_list_append(code_lookups, cl);
code_lookups = eina_list_append(code_lookups, cl);
}
static void
_data_queue_program_lookup(Edje_Part_Collection *pc, char *name, char *ptr, int len)
@ -1256,7 +1237,7 @@ _data_queue_program_lookup(Edje_Part_Collection *pc, char *name, char *ptr, int
data_queue_program_lookup(pc, name, &(cl->val));
code_lookups = evas_list_append(code_lookups, cl);
code_lookups = eina_list_append(code_lookups, cl);
}
static void
_data_queue_group_lookup(Edje_Part_Collection *pc, char *name, char *ptr, int len)
@ -1273,24 +1254,25 @@ _data_queue_image_pc_lookup(Edje_Part_Collection *pc, char *name, char *ptr, int
data_queue_image_lookup(name, &(cl->val));
code_lookups = evas_list_append(code_lookups, cl);
code_lookups = eina_list_append(code_lookups, cl);
}
void
data_process_scripts(void)
{
Evas_List *l, *l2;
Eina_List *l, *l2;
for (l = codes, l2 = edje_collections; (l) && (l2); l = l->next, l2 = l2->next)
for (l = codes, l2 = edje_collections; (l) && (l2); l = eina_list_next(l), l2 = eina_list_next(l2))
{
Code *cd;
Edje_Part_Collection *pc;
cd = l->data;
pc = l2->data;
cd = eina_list_data_get(l);
pc = eina_list_data_get(l2);
if ((cd->shared) || (cd->programs))
{
Evas_List *ll;
Eina_List *ll;
Code_Program *cp;
if (cd->shared)
{
@ -1299,11 +1281,8 @@ data_process_scripts(void)
data_process_string(pc, "IMAGE", cd->shared, _data_queue_image_pc_lookup);
data_process_string(pc, "GROUP", cd->shared, _data_queue_group_lookup);
}
for (ll = cd->programs; ll; ll = ll->next)
EINA_LIST_FOREACH(cd->programs, ll, cp)
{
Code_Program *cp;
cp = ll->data;
if (cp->script)
{
data_process_string(pc, "PART", cp->script, _data_queue_part_lookup);
@ -1319,15 +1298,14 @@ data_process_scripts(void)
void
data_process_script_lookups(void)
{
Evas_List *l;
Eina_List *l;
Code_Lookup *cl;
for (l = code_lookups; l; l = l->next)
EINA_LIST_FOREACH(code_lookups, l, cl)
{
Code_Lookup *cl;
char buf[256];
int i, n;
cl = l->data;
snprintf(buf, sizeof(buf), "%i", cl->val);
n = strlen(buf);
if (n > cl->len)

@ -39,8 +39,8 @@ static int strstrip(const char *in, char *out, size_t size);
int line = 0;
Evas_List *stack = NULL;
Evas_List *params = NULL;
Eina_List *stack = NULL;
Eina_List *params = NULL;
static char file_buf[4096];
static int verbatim = 0;
@ -83,7 +83,7 @@ new_object(void)
{
fprintf(stderr, "%s: Error. %s:%i unhandled keyword %s\n",
progname, file_in, line - 1,
(char *)evas_list_data(evas_list_last(stack)));
(char *)eina_list_data_get(eina_list_last(stack)));
exit(-1);
}
free(id);
@ -113,7 +113,7 @@ new_statement(void)
{
fprintf(stderr, "%s: Error. %s:%i unhandled keyword %s\n",
progname, file_in, line - 1,
(char *)evas_list_data(evas_list_last(stack)));
(char *)eina_list_data_get(eina_list_last(stack)));
exit(-1);
}
free(id);
@ -362,17 +362,18 @@ stack_id(void)
{
char *id;
int len;
Evas_List *l;
Eina_List *l;
char *data;
len = 0;
for (l = stack; l; l = l->next)
len += strlen(l->data) + 1;
EINA_LIST_FOREACH(stack, l, data)
len += strlen(data) + 1;
id = mem_alloc(len);
id[0] = 0;
for (l = stack; l; l = l->next)
EINA_LIST_FOREACH(stack, l, data)
{
strcat(id, l->data);
if (l->next) strcat(id, ".");
strcat(id, data);
if (eina_list_next(l)) strcat(id, ".");
}
return id;
}
@ -383,11 +384,11 @@ stack_chop_top(void)
char *top;
/* remove top from stack */
top = evas_list_data(evas_list_last(stack));
top = eina_list_data_get(eina_list_last(stack));
if (top)
{
free(top);
stack = evas_list_remove(stack, top);
stack = eina_list_remove(stack, top);
}
else
{
@ -446,8 +447,8 @@ parse(char *data, off_t size)
/* clear out params */
while (params)
{
free(params->data);
params = evas_list_remove(params, params->data);
free(eina_list_data_get(params));
params = eina_list_remove(params, eina_list_data_get(params));
}
/* remove top from stack */
stack_chop_top();
@ -467,10 +468,10 @@ parse(char *data, off_t size)
else
{
if (do_params)
params = evas_list_append(params, token);
params = eina_list_append(params, token);
else
{
stack = evas_list_append(stack, token);
stack = eina_list_append(stack, token);
new_object();
if ((verbatim == 1) && (p < (end - 2)))
{
@ -638,19 +639,18 @@ compile(void)
def = mem_strdup("");
else
{
Evas_List *l;
Eina_List *l;
int len;
char *data;
len = 0;
for (l = defines; l; l = l->next)
{
len += strlen(l->data) + 1;
}
EINA_LIST_FOREACH(defines, l, data)
len += strlen(data) + 1;
def = mem_alloc(len + 1);
def[0] = 0;
for (l = defines; l; l = l->next)
EINA_LIST_FOREACH(defines, l, data)
{
strcat(def, l->data);
strcat(def, data);
strcat(def, " ");
}
}
@ -726,7 +726,7 @@ is_param(int n)
{
char *str;
str = evas_list_nth(params, n);
str = eina_list_nth(params, n);
if (str) return 1;
return 0;
}
@ -738,7 +738,7 @@ is_num(int n)
long int ret;
char *end;
str = evas_list_nth(params, n);
str = eina_list_nth(params, n);
if (!str)
{
fprintf(stderr, "%s: Error. %s:%i no parameter supplied as argument %i\n",
@ -758,7 +758,7 @@ parse_str(int n)
char *str;
char *s;
str = evas_list_nth(params, n);
str = eina_list_nth(params, n);
if (!str)
{
fprintf(stderr, "%s: Error. %s:%i no parameter supplied as argument %i\n",
@ -821,7 +821,7 @@ parse_enum(int n, ...)
int result;
va_list va;
str = evas_list_nth(params, n);
str = eina_list_nth(params, n);
if (!str)
{
fprintf(stderr, "%s: Error. %s:%i no parameter supplied as argument %i\n",
@ -839,13 +839,14 @@ parse_enum(int n, ...)
int
parse_flags(int n, ...)
{
Evas_List *lst;
Eina_List *lst;
int result = 0;
va_list va;
char *data;
va_start(va, n);
for (lst = evas_list_nth_list(params, n); lst != NULL; lst = lst->next)
result |= _parse_enum(lst->data, va);
EINA_LIST_FOREACH(eina_list_nth_list(params, n), lst, data)
result |= _parse_enum(data, va);
va_end(va);
return result;
@ -857,7 +858,7 @@ parse_int(int n)
char *str;
int i;
str = evas_list_nth(params, n);
str = eina_list_nth(params, n);
if (!str)
{
fprintf(stderr, "%s: Error. %s:%i no parameter supplied as argument %i\n",
@ -874,7 +875,7 @@ parse_int_range(int n, int f, int t)
char *str;
int i;
str = evas_list_nth(params, n);
str = eina_list_nth(params, n);
if (!str)
{
fprintf(stderr, "%s: Error. %s:%i no parameter supplied as argument %i\n",
@ -897,7 +898,7 @@ parse_bool(int n)
char *str, buf[4096];
int i;
str = evas_list_nth(params, n);
str = eina_list_nth(params, n);
if (!str)
{
fprintf(stderr, "%s: Error. %s:%i no parameter supplied as argument %i\n",
@ -933,7 +934,7 @@ parse_float(int n)
char *str;
double i;
str = evas_list_nth(params, n);
str = eina_list_nth(params, n);
if (!str)
{
fprintf(stderr, "%s: Error. %s:%i no parameter supplied as argument %i\n",
@ -950,7 +951,7 @@ parse_float_range(int n, double f, double t)
char *str;
double i;
str = evas_list_nth(params, n);
str = eina_list_nth(params, n);
if (!str)
{
fprintf(stderr, "%s: Error. %s:%i no parameter supplied as argument %i\n",
@ -970,7 +971,7 @@ parse_float_range(int n, double f, double t)
void
check_arg_count(int required_args)
{
int num_args = evas_list_count (params);
int num_args = eina_list_count (params);
if (num_args != required_args)
{
@ -983,7 +984,7 @@ check_arg_count(int required_args)
void
check_min_arg_count(int min_required_args)
{
int num_args = evas_list_count (params);
int num_args = eina_list_count (params);
if (num_args < min_required_args)
{

@ -36,10 +36,10 @@ source_edd(void)
eddc.func.mem_free = NULL;
eddc.func.str_alloc = eina_stringshare_add;
eddc.func.str_free = eina_stringshare_del;
eddc.func.list_next = evas_list_next;
eddc.func.list_append = evas_list_append;
eddc.func.list_data = evas_list_data;
eddc.func.list_free = evas_list_free;
eddc.func.list_next = eina_list_next;
eddc.func.list_append = eina_list_append;
eddc.func.list_data = eina_list_data_get;
eddc.func.list_free = eina_list_free;
eddc.func.hash_foreach = evas_hash_foreach;
eddc.func.hash_add = evas_hash_add;
eddc.func.hash_free = evas_hash_free;
@ -93,7 +93,7 @@ source_fetch_file(const char *fil, const char *filname)
fread(sf->file, sz, 1, f);
sf->file[sz] = '\0';
fseek(f, 0, SEEK_SET);
srcfiles.list = evas_list_append(srcfiles.list, sf);
srcfiles.list = eina_list_append(srcfiles.list, sf);
while (fgets(buf, sizeof(buf), f))
{
@ -244,7 +244,7 @@ source_load(Eet_File *ef)
}
int
source_fontmap_save(Eet_File *ef, Evas_List *fonts)
source_fontmap_save(Eet_File *ef, Eina_List *fonts)
{
Font_List fl;

@ -94,9 +94,9 @@ decomp(void)
eet_close(ef);
return 0;
}
if (!srcfiles->list->data || !root_filename_is_sane())
if (!eina_list_data_get(srcfiles->list) || !root_filename_is_sane())
{
printf("ERROR: Invalid root filename: '%s'\n", (char *) srcfiles->list->data);
printf("ERROR: Invalid root filename: '%s'\n", (char *) eina_list_data_get(srcfiles->list));
eet_close(ef);
return 0;
}
@ -124,8 +124,9 @@ decomp(void)
void
output(void)
{
Evas_List *l;
Eina_List *l;
Eet_File *ef;
SrcFile *sf;
char *outdir, *p;
p = strrchr(file_in, '/');
@ -142,11 +143,10 @@ output(void)
if (edje_file->image_dir)
{
for (l = edje_file->image_dir->entries; l; l = l->next)
{
Edje_Image_Directory_Entry *ei;
Edje_Image_Directory_Entry *ei;
ei = l->data;
EINA_LIST_FOREACH(edje_file->image_dir->entries, l, ei)
{
if ((ei->source_type > EDJE_IMAGE_SOURCE_TYPE_NONE) &&
(ei->source_type < EDJE_IMAGE_SOURCE_TYPE_LAST) &&
(ei->source_type != EDJE_IMAGE_SOURCE_TYPE_EXTERNAL) &&
@ -201,14 +201,12 @@ output(void)
}
}
for (l = srcfiles->list; l; l = l->next)
EINA_LIST_FOREACH(srcfiles->list, l, sf)
{
SrcFile *sf;
char out[4096];
FILE *f;
char *pp;
sf = l->data;
snprintf(out, sizeof(out), "%s/%s", outdir, sf->name);
printf("Output Source File: %s\n", out);
pp = strdup(out);
@ -241,14 +239,14 @@ output(void)
}
if (fontlist)
{
for (l = fontlist->list; l; l = l->next)
Font *fn;
EINA_LIST_FOREACH(fontlist->list, l, fn)
{
Font *fn;
void *font;
int fontsize;
char out[4096];
fn = l->data;
snprintf(out, sizeof(out), "fonts/%s", fn->name);
font = eet_read(ef, out, &fontsize);
if (font)
@ -283,7 +281,7 @@ output(void)
{
char out[4096];
FILE *f;
SrcFile *sf = srcfiles->list->data;
SrcFile *sf = eina_list_data_get(srcfiles->list);
snprintf(out, sizeof(out), "%s/build.sh", outdir);
printf("Output Build Script: %s\n", out);
@ -337,7 +335,7 @@ compiler_cmd_is_sane()
static int
root_filename_is_sane()
{
SrcFile *sf = srcfiles->list->data;
SrcFile *sf = eina_list_data_get(srcfiles->list);
char *f = sf->name, *ptr;
if (!f || !*f)

@ -17,7 +17,7 @@ struct _Font
struct _Font_List
{
Evas_List *list;
Eina_List *list;
};
struct _SrcFile
@ -28,14 +28,14 @@ struct _SrcFile
struct _SrcFile_List
{
Evas_List *list;
Eina_List *list;
};
void source_edd(void);
void source_fetch(void);
int source_append(Eet_File *ef);
SrcFile_List *source_load(Eet_File *ef);
int source_fontmap_save(Eet_File *ef, Evas_List *fonts);
int source_fontmap_save(Eet_File *ef, Eina_List *fonts);
Font_List *source_fontmap_load(Eet_File *ef);
void *mem_alloc(size_t size);

@ -175,8 +175,8 @@ extern "C" {
EAPI double edje_scale_get (void);
/* edje_load.c */
EAPI Evas_List *edje_file_collection_list (const char *file);
EAPI void edje_file_collection_list_free (Evas_List *lst);
EAPI Eina_List *edje_file_collection_list (const char *file);
EAPI void edje_file_collection_list_free (Eina_List *lst);
EAPI int edje_file_group_exists (const char *file, const char *glob);
EAPI char *edje_file_data_get (const char *file, const char *key);
EAPI void edje_file_cache_set (int count);
@ -190,10 +190,10 @@ extern "C" {
/* edje_util.c */
EAPI void edje_color_class_set(const char *color_class, int r, int g, int b, int a, int r2, int g2, int b2, int a2, int r3, int g3, int b3, int a3);