* edje: Use Eina_Log.

Patch from Mathieu Taillefumier.


SVN revision: 44655
devs/devilhorns/wayland_egl
Cedric BAIL 13 years ago
parent bd60dfd40e
commit 018a9dad66
  1. 1
      legacy/edje/AUTHORS
  2. 13
      legacy/edje/src/bin/edje_cc.c
  3. 17
      legacy/edje/src/bin/edje_cc.h
  4. 338
      legacy/edje/src/bin/edje_cc_handlers.c
  5. 8
      legacy/edje/src/bin/edje_cc_mem.c
  6. 30
      legacy/edje/src/bin/edje_cc_out.c
  7. 162
      legacy/edje/src/bin/edje_cc_parse.c
  8. 6
      legacy/edje/src/bin/edje_cc_sources.c
  9. 58
      legacy/edje/src/bin/edje_decc.c
  10. 16
      legacy/edje/src/bin/edje_decc.h
  11. 9
      legacy/edje/src/bin/edje_prefix.c
  12. 12
      legacy/edje/src/lib/edje_cache.c
  13. 44
      legacy/edje/src/lib/edje_calc.c
  14. 98
      legacy/edje/src/lib/edje_edit.c
  15. 20
      legacy/edje/src/lib/edje_embryo.c
  16. 8
      legacy/edje/src/lib/edje_external.c
  17. 28
      legacy/edje/src/lib/edje_load.c
  18. 9
      legacy/edje/src/lib/edje_lua.c
  19. 22
      legacy/edje/src/lib/edje_main.c
  20. 2
      legacy/edje/src/lib/edje_match.c
  21. 21
      legacy/edje/src/lib/edje_private.h
  22. 4
      legacy/edje/src/lib/edje_program.c
  23. 14
      legacy/edje/src/lib/edje_script_only.c
  24. 17
      legacy/edje/src/lib/edje_util.c

@ -3,3 +3,4 @@ Tilman Sauerbeck (tilman at code-monkey de)
ZigsMcKenzie <zigsmckenzie@gmail.com>
Cedric BAIL <cedric.bail@free.fr>
Brian Mattern <rephorm@rephorm.com>
Mathieu Taillefumier <mathieu.taillefumier@free.fr>

@ -13,7 +13,7 @@
#include "edje_cc.h"
#include "edje_prefix.h"
int _edje_cc_log_dom = -1;
static void main_help(void);
Eina_List *img_dirs = NULL;
@ -63,10 +63,15 @@ main(int argc, char **argv)
setlocale(LC_NUMERIC, "C");
eina_init();
_edje_cc_log_dom = eina_log_domain_register("EDJE_CC", EDJE_DEFAULT_LOG_COLOR);
if(_edje_cc_log_dom<0)
{
EINA_LOG_ERR("Enable to create a log domain.");
exit(1);
}
tmp_dir = getenv("TMPDIR");
progname = argv[0];
for (i = 1; i < argc; i++)
{
@ -210,7 +215,7 @@ main(int argc, char **argv)
data_write();
edje_shutdown();
eina_log_domain_unregister(_edje_cc_log_dom);
eina_shutdown();
return 0;

@ -12,6 +12,23 @@
# define O_BINARY 0
#endif
/* logging variables */
extern int _edje_cc_log_dom ;
#define EDJE_CC_DEFAULT_LOG_COLOR EINA_COLOR_CYAN
#ifdef ERR
# undef ERR
#endif
#define ERR(...) EINA_LOG_DOM_ERR(_edje_cc_log_dom, __VA_ARGS__)
#ifdef INF
# undef INF
#endif
#define INF(...) EINA_LOG_DOM_INFO(_edje_cc_log_dom, __VA_ARGS__)
#ifdef WRN
# undef WRN
#endif
#define WRN(...) EINA_LOG_DOM_WARN(_edje_cc_log_dom, __VA_ARGS__)
/* types */
typedef struct _New_Object_Handler New_Object_Handler;
typedef struct _New_Statement_Handler New_Statement_Handler;

@ -928,23 +928,23 @@ st_data_file(void)
fd = open(filename, O_RDONLY | O_BINARY, S_IRUSR | S_IWUSR);
if (fd < 0)
{
fprintf(stderr, "%s: Error. %s:%i when opening file \"%s\": \"%s\"\n",
progname, file_in, line, filename, strerror(errno));
ERR("%s: Error. %s:%i when opening file \"%s\": \"%s\"",
progname, file_in, line, filename, strerror(errno));
exit(-1);
}
if (fstat(fd, &buf))
{
fprintf(stderr, "%s: Error. %s:%i when stating file \"%s\": \"%s\"\n",
progname, file_in, line, filename, strerror(errno));
ERR("%s: Error. %s:%i when stating file \"%s\": \"%s\"",
progname, file_in, line, filename, strerror(errno));
exit(-1);
}
data = mmap(NULL, buf.st_size, PROT_READ, MAP_SHARED, fd, 0);
if (data == MAP_FAILED)
{
fprintf(stderr, "%s: Error. %s:%i when mapping file \"%s\": \"%s\"\n",
progname, file_in, line, filename, strerror(errno));
ERR("%s: Error. %s:%i when mapping file \"%s\": \"%s\"",
progname, file_in, line, filename, strerror(errno));
exit(-1);
}
@ -952,7 +952,7 @@ st_data_file(void)
for (i = 0; i < buf.st_size; ++i, ++over)
if (*over == '\0')
{
fprintf(stderr, "%s: Error. %s:%i file \"%s\" is a binary file.\n",
ERR("%s: Error. %s:%i file \"%s\" is a binary file.",
progname, file_in, line, filename);
exit(-1);
}
@ -1251,8 +1251,8 @@ st_styles_style_name(void)
{
if ((stl != tstl) && (!strcmp(stl->name, tstl->name)))
{
fprintf(stderr, "%s: Error. parse error %s:%i. There is already a style named \"%s\"\n",
progname, file_in, line - 1, stl->name);
ERR("%s: Error. parse error %s:%i. There is already a style named \"%s\"",
progname, file_in, line - 1, stl->name);
exit(-1);
}
}
@ -1278,8 +1278,8 @@ st_styles_style_base(void)
stl = eina_list_data_get(eina_list_last(edje_file->styles));
if (stl->tags)
{
fprintf(stderr, "%s: Error. parse error %s:%i. There is already a basic format for the style\n",
progname, file_in, line - 1);
ERR("%s: Error. parse error %s:%i. There is already a basic format for the style",
progname, file_in, line - 1);
exit(-1);
}
tag = mem_alloc(SZ(Edje_Style_Tag));
@ -1596,8 +1596,8 @@ ob_collections_group_script(void)
cd->l2 = get_verbatim_line2();
if (cd->shared)
{
fprintf(stderr, "%s: Error. parse error %s:%i. There is already an existing script section for the group\n",
progname, file_in, line - 1);
ERR("%s: Error. parse error %s:%i. There is already an existing script section for the group",
progname, file_in, line - 1);
exit(-1);
}
cd->shared = s;
@ -1628,8 +1628,8 @@ ob_collections_group_lua_script(void)
cd->l2 = get_verbatim_line2();
if (cd->shared)
{
fprintf(stderr, "%s: Error. parse error %s:%i. There is already an existing script section for the group\n",
progname, file_in, line - 1);
ERR("%s: Error. parse error %s:%i. There is already an existing script section for the group",
progname, file_in, line - 1);
exit(-1);
}
cd->shared = s;
@ -1742,8 +1742,8 @@ st_collections_group_parts_part_name(void)
{
if ((lep != ep) && (lep->name) && (!strcmp(lep->name, ep->name)))
{
fprintf(stderr, "%s: Error. parse error %s:%i. There is already a part of the name %s\n",
progname, file_in, line - 1, ep->name);
ERR("%s: Error. parse error %s:%i. There is already a part of the name %s",
progname, file_in, line - 1, ep->name);
exit(-1);
}
}
@ -2505,9 +2505,9 @@ static void ob_collections_group_parts_part_box_items_item(void)
if ((ep->type != EDJE_PART_TYPE_BOX) && (ep->type != EDJE_PART_TYPE_TABLE))
{
fprintf(stderr, "%s: Error. parse error %s:%i. "
"box attributes in non-BOX or TABLE part.\n",
progname, file_in, line - 1);
ERR("%s: Error. parse error %s:%i. "
"box attributes in non-BOX or TABLE part.",
progname, file_in, line - 1);
exit(-1);
}
@ -2569,9 +2569,9 @@ static void st_collections_group_parts_part_box_items_item_type(void)
s = parse_str(0);
if (strcmp(s, "GROUP"))
{
fprintf(stderr, "%s: Error. parse error %s:%i. "
"token %s not one of: GROUP.\n",
progname, file_in, line - 1, s);
ERR("%s: Error. parse error %s:%i. "
"token %s not one of: GROUP.",
progname, file_in, line - 1, s);
exit(-1);
}
/* FIXME: handle the enum, once everything else is supported */
@ -2892,12 +2892,12 @@ static void st_collections_group_parts_part_table_items_item_position(void)
if (ep->type != EDJE_PART_TYPE_TABLE)
{
fprintf(stderr, "%s: Error. parse error %s:%i. "
"table attributes in non-TABLE part.\n",
progname, file_in, line - 1);
ERR("%s: Error. parse error %s:%i. "
"table attributes in non-TABLE part.",
progname, file_in, line - 1);
exit(-1);
}
item = eina_list_data_get(eina_list_last(ep->items));
item->col = parse_int_range(0, 0, 0xffff);
item->row = parse_int_range(1, 0, 0xffff);
@ -2927,9 +2927,9 @@ static void st_collections_group_parts_part_table_items_item_span(void)
if (ep->type != EDJE_PART_TYPE_TABLE)
{
fprintf(stderr, "%s: Error. parse error %s:%i. "
"table attributes in non-TABLE part.\n",
progname, file_in, line - 1);
ERR("%s: Error. parse error %s:%i. "
"table attributes in non-TABLE part.",
progname, file_in, line - 1);
exit(-1);
}
@ -3088,9 +3088,9 @@ st_collections_group_parts_part_description_inherit(void)
/* inherit may not be used in the default description */
if (!ep->other_desc)
{
fprintf(stderr, "%s: Error. parse error %s:%i. "
"inherit may not be used in the default description\n",
progname, file_in, line - 1);
ERR("%s: Error. parse error %s:%i. "
"inherit may not be used in the default description",
progname, file_in, line - 1);
exit(-1);
}
@ -3098,9 +3098,9 @@ st_collections_group_parts_part_description_inherit(void)
if (!ed->state.name)
{
fprintf(stderr, "%s: Error. parse error %s:%i. "
"inherit may only be used after state\n",
progname, file_in, line - 1);
ERR("%s: Error. parse error %s:%i. "
"inherit may only be used after state",
progname, file_in, line - 1);
exit(-1);
}
@ -3139,9 +3139,9 @@ st_collections_group_parts_part_description_inherit(void)
if (!parent)
{
fprintf (stderr, "%s: Error. parse error %s:%i. "
"cannot find referenced part state %s %lf\n",
ep->name, file_in, line - 1, parent_name, parent_val);
ERR("%s: Error. parse error %s:%i. "
"cannot find referenced part state %s %lf",
ep->name, file_in, line - 1, parent_name, parent_val);
exit(-1);
}
@ -3235,9 +3235,9 @@ st_collections_group_parts_part_description_state(void)
s = parse_str(0);
if (!strcmp (s, "custom"))
{
fprintf(stderr, "%s: Error. parse error %s:%i. "
"invalid state name: '%s'.\n",
progname, file_in, line - 1, s);
ERR("%s: Error. parse error %s:%i. "
"invalid state name: '%s'.",
progname, file_in, line - 1, s);
exit(-1);
}
@ -3914,9 +3914,9 @@ st_collections_group_parts_part_description_image_normal(void)
if (ep->type != EDJE_PART_TYPE_IMAGE)
{
fprintf(stderr, "%s: Error. parse error %s:%i. "
"image attributes in non-IMAGE part.\n",
progname, file_in, line - 1);
ERR("%s: Error. parse error %s:%i. "
"image attributes in non-IMAGE part.",
progname, file_in, line - 1);
exit(-1);
}
@ -3957,9 +3957,9 @@ st_collections_group_parts_part_description_image_tween(void)
if (ep->type != EDJE_PART_TYPE_IMAGE)
{
fprintf(stderr, "%s: Error. parse error %s:%i. "
"image attributes in non-IMAGE part.\n",
progname, file_in, line - 1);
ERR("%s: Error. parse error %s:%i. "
"image attributes in non-IMAGE part.",
progname, file_in, line - 1);
exit(-1);
}
@ -4003,9 +4003,9 @@ st_collections_group_parts_part_description_image_border(void)
if (ep->type != EDJE_PART_TYPE_IMAGE)
{
fprintf(stderr, "%s: Error. parse error %s:%i. "
"image attributes in non-IMAGE part.\n",
progname, file_in, line - 1);
ERR("%s: Error. parse error %s:%i. "
"image attributes in non-IMAGE part.",
progname, file_in, line - 1);
exit(-1);
}
@ -4043,9 +4043,9 @@ st_collections_group_parts_part_description_image_middle(void)
if (ep->type != EDJE_PART_TYPE_IMAGE)
{
fprintf(stderr, "%s: Error. parse error %s:%i. "
"image attributes in non-IMAGE part.\n",
progname, file_in, line - 1);
ERR("%s: Error. parse error %s:%i. "
"image attributes in non-IMAGE part.",
progname, file_in, line - 1);
exit(-1);
}
@ -4085,9 +4085,9 @@ st_collections_group_parts_part_description_image_scale_hint(void)
if (ep->type != EDJE_PART_TYPE_IMAGE)
{
fprintf(stderr, "%s: Error. parse error %s:%i. "
"image attributes in non-IMAGE part.\n",
progname, file_in, line - 1);
ERR("%s: Error. parse error %s:%i. "
"image attributes in non-IMAGE part.",
progname, file_in, line - 1);
exit(-1);
}
@ -4149,9 +4149,9 @@ st_collections_group_parts_part_description_fill_smooth(void)
if (ep->type != EDJE_PART_TYPE_IMAGE)
{
fprintf(stderr, "%s: Error. parse error %s:%i. "
"fill.type attribute in non-IMAGE part.\n",
progname, file_in, line - 1);
ERR("%s: Error. parse error %s:%i. "
"fill.type attribute in non-IMAGE part.",
progname, file_in, line - 1);
exit(-1);
}
@ -4224,9 +4224,9 @@ st_collections_group_parts_part_description_fill_angle(void)
/* XXX this will need to include IMAGES when angle support is added to evas images */
if (ep->type != EDJE_PART_TYPE_GRADIENT)
{
fprintf(stderr, "%s: Error. parse error %s:%i. "
"gradient attributes in non-GRADIENT part.\n",
progname, file_in, line - 1);
ERR("%s: Error. parse error %s:%i. "
"gradient attributes in non-GRADIENT part.",
progname, file_in, line - 1);
exit(-1);
}
@ -4262,9 +4262,9 @@ st_collections_group_parts_part_description_fill_type(void)
if (ep->type != EDJE_PART_TYPE_IMAGE)
{
fprintf(stderr, "%s: Error. parse error %s:%i. "
"fill attributes in non-IMAGE part.\n",
progname, file_in, line - 1);
ERR("%s: Error. parse error %s:%i. "
"fill attributes in non-IMAGE part.",
progname, file_in, line - 1);
exit(-1);
}
@ -4319,9 +4319,9 @@ st_collections_group_parts_part_description_fill_origin_relative(void)
if (ep->type != EDJE_PART_TYPE_IMAGE && ep->type != EDJE_PART_TYPE_GRADIENT)
{
fprintf(stderr, "%s: Error. parse error %s:%i. "
"fill attributes in non-IMAGE part.\n",
progname, file_in, line - 1);
ERR("%s: Error. parse error %s:%i. "
"fill attributes in non-IMAGE part.",
progname, file_in, line - 1);
exit(-1);
}
@ -4355,9 +4355,9 @@ st_collections_group_parts_part_description_fill_origin_offset(void)
if (ep->type != EDJE_PART_TYPE_IMAGE && ep->type != EDJE_PART_TYPE_GRADIENT)
{
fprintf(stderr, "%s: Error. parse error %s:%i. "
"fill attributes in non-IMAGE part.\n",
progname, file_in, line - 1);
ERR("%s: Error. parse error %s:%i. "
"fill attributes in non-IMAGE part.",
progname, file_in, line - 1);
exit(-1);
}
@ -4416,9 +4416,9 @@ st_collections_group_parts_part_description_fill_size_relative(void)
if (ep->type != EDJE_PART_TYPE_IMAGE && ep->type != EDJE_PART_TYPE_GRADIENT)
{
fprintf(stderr, "%s: Error. parse error %s:%i. "
"fill attributes in non-IMAGE part.\n",
progname, file_in, line - 1);
ERR("%s: Error. parse error %s:%i. "
"fill attributes in non-IMAGE part.",
progname, file_in, line - 1);
exit(-1);
}
@ -4452,9 +4452,9 @@ st_collections_group_parts_part_description_fill_size_offset(void)
if (ep->type != EDJE_PART_TYPE_IMAGE && ep->type != EDJE_PART_TYPE_GRADIENT)
{
fprintf(stderr, "%s: Error. parse error %s:%i. "
"fill attributes in non-IMAGE part.\n",
progname, file_in, line - 1);
ERR("%s: Error. parse error %s:%i. "
"fill attributes in non-IMAGE part.",
progname, file_in, line - 1);
exit(-1);
}
@ -4515,9 +4515,9 @@ st_collections_group_parts_part_description_text_text(void)
if ((ep->type != EDJE_PART_TYPE_TEXT) &&
(ep->type != EDJE_PART_TYPE_TEXTBLOCK))
{
fprintf(stderr, "%s: Error. parse error %s:%i. "
"text attributes in non-TEXT part.\n",
progname, file_in, line - 1);
ERR("%s: Error. parse error %s:%i. "
"text attributes in non-TEXT part.",
progname, file_in, line - 1);
exit(-1);
}
@ -4567,9 +4567,9 @@ st_collections_group_parts_part_description_text_text_class(void)
if ((ep->type != EDJE_PART_TYPE_TEXT) &&
(ep->type != EDJE_PART_TYPE_TEXTBLOCK))
{
fprintf(stderr, "%s: Error. parse error %s:%i. "
"text attributes in non-TEXT part.\n",
progname, file_in, line - 1);
ERR("%s: Error. parse error %s:%i. "
"text attributes in non-TEXT part.",
progname, file_in, line - 1);
exit(-1);
}
@ -4604,9 +4604,9 @@ st_collections_group_parts_part_description_text_font(void)
if (ep->type != EDJE_PART_TYPE_TEXT)
{
fprintf(stderr, "%s: Error. parse error %s:%i. "
"text attributes in non-TEXT part.\n",
progname, file_in, line - 1);
ERR("%s: Error. parse error %s:%i. "
"text attributes in non-TEXT part.",
progname, file_in, line - 1);
exit(-1);
}
@ -4641,9 +4641,9 @@ st_collections_group_parts_part_description_text_style(void)
if (ep->type != EDJE_PART_TYPE_TEXTBLOCK)
{
fprintf(stderr, "%s: Error. parse error %s:%i. "
"text attributes in non-TEXTBLOCK part.\n",
progname, file_in, line - 1);
ERR("%s: Error. parse error %s:%i. "
"text attributes in non-TEXTBLOCK part.",
progname, file_in, line - 1);
exit(-1);
}
@ -4679,9 +4679,9 @@ st_collections_group_parts_part_description_text_repch(void)
if (ep->type != EDJE_PART_TYPE_TEXTBLOCK)
{
fprintf(stderr, "%s: Error. parse error %s:%i. "
"text attributes in non-TEXTBLOCK part.\n",
progname, file_in, line - 1);
ERR("%s: Error. parse error %s:%i. "
"text attributes in non-TEXTBLOCK part.",
progname, file_in, line - 1);
exit(-1);
}
@ -4716,9 +4716,9 @@ st_collections_group_parts_part_description_text_size(void)
if (ep->type != EDJE_PART_TYPE_TEXT)
{
fprintf(stderr, "%s: Error. parse error %s:%i. "
"text attributes in non-TEXT part.\n",
progname, file_in, line - 1);
ERR("%s: Error. parse error %s:%i. "
"text attributes in non-TEXT part.",
progname, file_in, line - 1);
exit(-1);
}
@ -4753,9 +4753,9 @@ st_collections_group_parts_part_description_text_fit(void)
if (ep->type != EDJE_PART_TYPE_TEXT)
{
fprintf(stderr, "%s: Error. parse error %s:%i. "
"text attributes in non-TEXT part.\n",
progname, file_in, line - 1);
ERR("%s: Error. parse error %s:%i. "
"text attributes in non-TEXT part.",
progname, file_in, line - 1);
exit(-1);
}
@ -4793,9 +4793,9 @@ st_collections_group_parts_part_description_text_min(void)
if ((ep->type != EDJE_PART_TYPE_TEXT) &&
(ep->type != EDJE_PART_TYPE_TEXTBLOCK))
{
fprintf(stderr, "%s: Error. parse error %s:%i. "
"text attributes in non-TEXT part.\n",
progname, file_in, line - 1);
ERR("%s: Error. parse error %s:%i. "
"text attributes in non-TEXT part.",
progname, file_in, line - 1);
exit(-1);
}
@ -4833,9 +4833,9 @@ st_collections_group_parts_part_description_text_max(void)
if ((ep->type != EDJE_PART_TYPE_TEXT) &&
(ep->type != EDJE_PART_TYPE_TEXTBLOCK))
{
fprintf(stderr, "%s: Error. parse error %s:%i. "
"text attributes in non-TEXT part.\n",
progname, file_in, line - 1);
ERR("%s: Error. parse error %s:%i. "
"text attributes in non-TEXT part.",
progname, file_in, line - 1);
exit(-1);
}
@ -4871,9 +4871,9 @@ st_collections_group_parts_part_description_text_align(void)
if (ep->type != EDJE_PART_TYPE_TEXT)
{
fprintf(stderr, "%s: Error. parse error %s:%i. "
"text attributes in non-TEXT part.\n",
progname, file_in, line - 1);
ERR("%s: Error. parse error %s:%i. "
"text attributes in non-TEXT part.",
progname, file_in, line - 1);
exit(-1);
}
@ -4910,9 +4910,9 @@ st_collections_group_parts_part_description_text_source(void)
if ((ep->type != EDJE_PART_TYPE_TEXT) &&
(ep->type != EDJE_PART_TYPE_TEXTBLOCK))
{
fprintf(stderr, "%s: Error. parse error %s:%i. "
"text attributes in non-TEXT part.\n",
progname, file_in, line - 1);
ERR("%s: Error. parse error %s:%i. "
"text attributes in non-TEXT part.",
progname, file_in, line - 1);
exit(-1);
}
@ -4954,9 +4954,9 @@ st_collections_group_parts_part_description_text_text_source(void)
if ((ep->type != EDJE_PART_TYPE_TEXT) &&
(ep->type != EDJE_PART_TYPE_TEXTBLOCK))
{
fprintf(stderr, "%s: Error. parse error %s:%i. "
"text attributes in non-TEXT part.\n",
progname, file_in, line - 1);
ERR("%s: Error. parse error %s:%i. "
"text attributes in non-TEXT part.",
progname, file_in, line - 1);
exit(-1);
}
@ -4998,9 +4998,9 @@ st_collections_group_parts_part_description_text_elipsis(void)
if (ep->type != EDJE_PART_TYPE_TEXT)
{
fprintf(stderr, "%s: Error. parse error %s:%i. "
"text attributes in non-TEXT part.\n",
progname, file_in, line - 1);
ERR("%s: Error. parse error %s:%i. "
"text attributes in non-TEXT part.",
progname, file_in, line - 1);
exit(-1);
}
@ -5068,9 +5068,9 @@ st_collections_group_parts_part_description_gradient_type(void)
if (ep->type != EDJE_PART_TYPE_GRADIENT)
{
fprintf(stderr, "%s: Error. parse error %s:%i. "
"gradient attributes in non-GRADIENT part.\n",
progname, file_in, line - 1);
ERR("%s: Error. parse error %s:%i. "
"gradient attributes in non-GRADIENT part.",
progname, file_in, line - 1);
exit(-1);
}
@ -5105,9 +5105,9 @@ st_collections_group_parts_part_description_gradient_spectrum(void)
if (ep->type != EDJE_PART_TYPE_GRADIENT)
{
fprintf(stderr, "%s: Error. parse error %s:%i. "
"gradient attributes in non-GRADIENT part.\n",
progname, file_in, line - 1);
ERR("%s: Error. parse error %s:%i. "
"gradient attributes in non-GRADIENT part.",
progname, file_in, line - 1);
exit(-1);
}
@ -5150,9 +5150,9 @@ st_collections_group_parts_part_description_gradient_rel1_relative(void)
if (ep->type != EDJE_PART_TYPE_GRADIENT)
{
fprintf(stderr, "%s: Error. parse error %s:%i. "
"gradient attributes in non-GRADIENT part.\n",
progname, file_in, line - 1);
ERR("%s: Error. parse error %s:%i. "
"gradient attributes in non-GRADIENT part.",
progname, file_in, line - 1);
exit(-1);
}
@ -5193,9 +5193,9 @@ st_collections_group_parts_part_description_gradient_rel1_offset(void)
if (ep->type != EDJE_PART_TYPE_GRADIENT)
{
fprintf(stderr, "%s: Error. parse error %s:%i. "
"gradient attributes in non-GRADIENT part.\n",
progname, file_in, line - 1);
ERR("%s: Error. parse error %s:%i. "
"gradient attributes in non-GRADIENT part.",
progname, file_in, line - 1);
exit(-1);
}
@ -5223,12 +5223,12 @@ st_collections_group_parts_part_description_gradient_rel2_relative(void)
if (ep->type != EDJE_PART_TYPE_GRADIENT)
{
fprintf(stderr, "%s: Error. parse error %s:%i. "
"gradient attributes in non-GRADIENT part.\n",
progname, file_in, line - 1);
ERR("%s: Error. parse error %s:%i. "
"gradient attributes in non-GRADIENT part.",
progname, file_in, line - 1);
exit(-1);
}
ed = ep->default_desc;
if (ep->other_desc) ed = eina_list_data_get(eina_list_last(ep->other_desc));
@ -5253,9 +5253,9 @@ st_collections_group_parts_part_description_gradient_rel2_offset(void)
if (ep->type != EDJE_PART_TYPE_GRADIENT)
{
fprintf(stderr, "%s: Error. parse error %s:%i. "
"gradient attributes in non-GRADIENT part.\n",
progname, file_in, line - 1);
ERR("%s: Error. parse error %s:%i. "
"gradient attributes in non-GRADIENT part.",
progname, file_in, line - 1);
exit(-1);
}
@ -5354,9 +5354,9 @@ static void st_collections_group_parts_part_description_box_layout(void)
if (ep->type != EDJE_PART_TYPE_BOX)
{
fprintf(stderr, "%s: Error. parse error %s:%i. "
"box attributes in non-BOX part.\n",
progname, file_in, line - 1);
ERR("%s: Error. parse error %s:%i. "
"box attributes in non-BOX part.",
progname, file_in, line - 1);
exit(-1);
}
@ -5380,9 +5380,9 @@ static void st_collections_group_parts_part_description_box_align(void)
if (ep->type != EDJE_PART_TYPE_BOX)
{
fprintf(stderr, "%s: Error. parse error %s:%i. "
"box attributes in non-BOX part.\n",
progname, file_in, line - 1);
ERR("%s: Error. parse error %s:%i. "
"box attributes in non-BOX part.",
progname, file_in, line - 1);
exit(-1);
}
@ -5405,9 +5405,9 @@ static void st_collections_group_parts_part_description_box_padding(void)
if (ep->type != EDJE_PART_TYPE_BOX)
{
fprintf(stderr, "%s: Error. parse error %s:%i. "
"box attributes in non-BOX part.\n",
progname, file_in, line - 1);
ERR("%s: Error. parse error %s:%i. "
"box attributes in non-BOX part.",
progname, file_in, line - 1);
exit(-1);
}
@ -5431,9 +5431,9 @@ st_collections_group_parts_part_description_box_min(void)
if (ep->type != EDJE_PART_TYPE_BOX)
{
fprintf(stderr, "%s: Error. parse error %s:%i. "
"box attributes in non-BOX part.\n",
progname, file_in, line - 1);
ERR("%s: Error. parse error %s:%i. "
"box attributes in non-BOX part.",
progname, file_in, line - 1);
exit(-1);
}
@ -5507,9 +5507,9 @@ static void st_collections_group_parts_part_description_table_homogeneous(void)
if (ep->type != EDJE_PART_TYPE_TABLE)
{
fprintf(stderr, "%s: Error. parse error %s:%i. "
"table attributes in non-TABLE part.\n",
progname, file_in, line - 1);
ERR("%s: Error. parse error %s:%i. "
"table attributes in non-TABLE part.",
progname, file_in, line - 1);
exit(-1);
}
@ -5535,9 +5535,9 @@ static void st_collections_group_parts_part_description_table_align(void)
if (ep->type != EDJE_PART_TYPE_TABLE)
{
fprintf(stderr, "%s: Error. parse error %s:%i. "
"table attributes in non-TABLE part.\n",
progname, file_in, line - 1);
ERR("%s: Error. parse error %s:%i. "
"table attributes in non-TABLE part.",
progname, file_in, line - 1);
exit(-1);
}
@ -5560,9 +5560,9 @@ static void st_collections_group_parts_part_description_table_padding(void)
if (ep->type != EDJE_PART_TYPE_TABLE)
{
fprintf(stderr, "%s: Error. parse error %s:%i. "
"table attributes in non-TABLE part.\n",
progname, file_in, line - 1);
ERR("%s: Error. parse error %s:%i. "
"table attributes in non-TABLE part.",
progname, file_in, line - 1);
exit(-1);
}
@ -5590,9 +5590,9 @@ _st_collections_group_parts_part_description_params(Edje_External_Param_Type typ
if (ep->type != EDJE_PART_TYPE_EXTERNAL)
{
fprintf(stderr, "%s: Error. parse error %s:%i. "
"params in non-EXTERNAL part.\n",
progname, file_in, line - 1);
ERR("%s: Error. parse error %s:%i. "
"params in non-EXTERNAL part.",
progname, file_in, line - 1);
exit(-1);
}
@ -5759,8 +5759,8 @@ st_collections_group_programs_program_name(void)
{
if ((lep != ep) && (lep->name) && (!strcmp(lep->name, ep->name)))
{
fprintf(stderr, "%s: Error. parse error %s:%i. There is already a program of the name %s\n",
progname, file_in, line - 1, ep->name);
ERR("%s: Error. parse error %s:%i. There is already a program of the name %s\n",
progname, file_in, line - 1, ep->name);
exit(-1);
}
}
@ -6002,9 +6002,9 @@ st_collections_group_programs_program_target(void)
data_queue_part_lookup(pc, name, &(et->id));
else
{
fprintf(stderr, "%s: Error. parse error %s:%i. "
"target may only be used after action\n",
progname, file_in, line - 1);
ERR("%s: Error. parse error %s:%i. "
"target may only be used after action",
progname, file_in, line - 1);
exit(-1);
}
free(name);
@ -6076,8 +6076,8 @@ ob_collections_group_programs_program_script(void)
cp->script = s;
if (cd->shared && cd->is_lua)
{
fprintf(stderr, "%s: Error. parse error %s:%i. You're trying to mix Embryo and Lua scripting in the same group\n",
progname, file_in, line - 1);
ERR("%s: Error. parse error %s:%i. You're trying to mix Embryo and Lua scripting in the same group",
progname, file_in, line - 1);
exit(-1);
}
cd->is_lua = 0;
@ -6116,8 +6116,8 @@ ob_collections_group_programs_program_lua_script(void)
cp->script = s;
if (cd->shared && !cd->is_lua)
{
fprintf(stderr, "%s: Error. parse error %s:%i. You're trying to mix Embryo and Lua scripting in the same group\n",
progname, file_in, line - 1);
ERR("%s: Error. parse error %s:%i. You're trying to mix Embryo and Lua scripting in the same group",
progname, file_in, line - 1);
exit(-1);
}
cd->is_lua = 1;

@ -18,8 +18,8 @@ mem_alloc(size_t size)
mem = calloc(1, size);
if (mem) return mem;
fprintf(stderr, "%s: Error. %s:%i memory allocation of %i bytes failed. %s\n",
progname, file_in, line, size, strerror(errno));
ERR("%s: Error. %s:%i memory allocation of %i bytes failed. %s",
progname, file_in, line, size, strerror(errno));
exit(-1);
return NULL;
}
@ -31,8 +31,8 @@ mem_strdup(const char *s)
str = strdup(s);
if (str) return str;
fprintf(stderr, "%s: Error. %s:%i memory allocation of %i bytes failed. %s. string being duplicated: \"%s\"\n",
progname, file_in, line, strlen(s) + 1, strerror(errno), s);
ERR("%s: Error. %s:%i memory allocation of %i bytes failed. %s. string being duplicated: \"%s\"",
progname, file_in, line, strlen(s) + 1, strerror(errno), s);
exit(-1);
return NULL;
}

@ -133,7 +133,7 @@ error_and_abort(Eet_File *ef, const char *fmt, ...)
{
va_list ap;
fprintf(stderr, "%s: Error. ", progname);
ERR("%s: Error. ", progname);
va_start(ap, fmt);
vfprintf(stderr, fmt, ap);
@ -979,8 +979,8 @@ data_write(void)
ef = eet_open(file_out, EET_FILE_MODE_WRITE);
if (!ef)
{
fprintf(stderr, "%s: Error. Unable to open \"%s\" for writing output\n",
progname, file_out);
ERR("%s: Error. Unable to open \"%s\" for writing output",
progname, file_out);
exit(-1);
}
@ -1169,8 +1169,8 @@ data_process_lookups(void)
}
if (!l)
{
fprintf(stderr, "%s: Error. Unable to find part name \"%s\".\n",
progname, pl->name);
ERR("%s: Error. Unable to find part name \"%s\".",
progname, pl->name);
exit(-1);
}
part_lookups = eina_list_remove(part_lookups, pl);
@ -1195,8 +1195,8 @@ data_process_lookups(void)
}
if (!l)
{
fprintf(stderr, "%s: Error. Unable to find program name \"%s\".\n",
progname, pl->name);
ERR("%s: Error. Unable to find program name \"%s\".",
progname, pl->name);
exit(-1);
}
program_lookups = eina_list_remove(program_lookups, pl);
@ -1220,8 +1220,8 @@ data_process_lookups(void)
}
if (!l)
{
fprintf(stderr, "%s: Error. Unable to find group name \"%s\".\n",
progname, gl->name);
ERR("%s: Error. Unable to find group name \"%s\".",
progname, gl->name);
exit(-1);
}
group_lookups = eina_list_remove(group_lookups, gl);
@ -1256,8 +1256,8 @@ data_process_lookups(void)
if (!l)
{
fprintf(stderr, "%s: Error. Unable to find image name \"%s\".\n",
progname, il->name);
ERR("%s: Error. Unable to find image name \"%s\".",
progname, il->name);
exit(-1);
}
image_lookups = eina_list_remove(image_lookups, il);
@ -1290,8 +1290,8 @@ data_process_lookups(void)
if (!l)
{
fprintf(stderr, "%s: Error. unable to find spectrum name %s\n",
progname, il->name);
ERR("%s: Error. unable to find spectrum name %s",
progname, il->name);
exit(-1);
}
spectrum_lookups = eina_list_remove(spectrum_lookups, il);
@ -1525,8 +1525,8 @@ data_process_script_lookups(void)
n = eina_convert_itoa(cl->val, buf);
if (n > cl->len)
{
fprintf(stderr, "%s: Error. The unexpected happened. A numeric replacement string was larger than the original!\n",
progname);
ERR("%s: Error. The unexpected happened. A numeric replacement string was larger than the original!",
progname);
exit(-1);
}
memset(cl->ptr, ' ', cl->len);

@ -114,9 +114,9 @@ new_object(void)
}
if (!handled)
{
fprintf(stderr, "%s: Error. %s:%i unhandled keyword %s\n",
progname, file_in, line - 1,
(char *)eina_list_data_get(eina_list_last(stack)));
ERR("%s: Error. %s:%i unhandled keyword %s",
progname, file_in, line - 1,
(char *)eina_list_data_get(eina_list_last(stack)));
exit(-1);
}
free(id);
@ -144,9 +144,9 @@ new_statement(void)
}
if (!handled)
{
fprintf(stderr, "%s: Error. %s:%i unhandled keyword %s\n",
progname, file_in, line - 1,
(char *)eina_list_data_get(eina_list_last(stack)));
ERR("%s: Error. %s:%i unhandled keyword %s",
progname, file_in, line - 1,
(char *)eina_list_data_get(eina_list_last(stack)));
exit(-1);
}
free(id);
@ -247,8 +247,8 @@ next_token(char *p, char *end, char **new_p, int *delim)
tmpstr = alloca(l + 1);
if (!tmpstr)
{
fprintf(stderr, "%s: Error. %s:%i malloc %i bytes failed\n",
progname, file_in, line - 1, l + 1);
ERR("%s: Error. %s:%i malloc %i bytes failed",
progname, file_in, line - 1, l + 1);
exit(-1);
}
strncpy(tmpstr, p, l);
@ -424,8 +424,8 @@ stack_chop_top(void)
}
else
{
fprintf(stderr, "%s: Error. parse error %s:%i. } marker without matching { marker\n",
progname, file_in, line - 1);
ERR("%s: Error. parse error %s:%i. } marker without matching { marker",
progname, file_in, line - 1);
exit(-1);
}
}
@ -439,8 +439,8 @@ parse(char *data, off_t size)
if (verbose)
{
printf("%s: Parsing input file\n",
progname);
INF("%s: Parsing input file",
progname);
}
p = data;
end = data + size;
@ -452,8 +452,8 @@ parse(char *data, off_t size)
*/
if (do_params && delim && *token != ';')
{
fprintf(stderr, "%s: Error. parse error %s:%i. %c marker before ; marker\n",
progname, file_in, line - 1, *token);
ERR("%s: Error. parse error %s:%i. %c marker before ; marker",
progname, file_in, line - 1, *token);
exit(-1);
}
else if (delim)
@ -463,7 +463,7 @@ parse(char *data, off_t size)
{
if (do_params)
{
fprintf(stderr, "%s: Error. parse error %s:%i. } marker before ; marker\n",
ERR("%s: Error. parse error %s:%i. } marker before ; marker",
progname, file_in, line - 1);
exit(-1);
}
@ -490,8 +490,8 @@ parse(char *data, off_t size)
{
if (do_params)
{
fprintf(stderr, "%s: Error. parse error %s:%i. { marker before ; marker\n",
progname, file_in, line - 1);
ERR("%s: Error. parse error %s:%i. { marker before ; marker",
progname, file_in, line - 1);
exit(-1);
}
}
@ -573,8 +573,8 @@ parse(char *data, off_t size)
}
else
{
fprintf(stderr, "%s: Error. parse error %s:%i. { marker does not have matching } marker\n",
progname, file_in, line - 1);
ERR("%s: Error. parse error %s:%i. { marker does not have matching } marker",
progname, file_in, line - 1);
exit(-1);
}
new_object();
@ -585,7 +585,7 @@ parse(char *data, off_t size)
}
if (verbose)
{
printf("%s: Parsing done\n",
INF("%s: Parsing done",
progname);
}
}
@ -766,13 +766,13 @@ compile(void)
fd = open(file_in, O_RDONLY | O_BINARY, S_IRUSR | S_IWUSR);
if (fd < 0)
{
fprintf(stderr, "%s: Error. cannot open file \"%s\" for input. %s\n",
progname, file_in, strerror(errno));
ERR("%s: Error. cannot open file \"%s\" for input. %s",
progname, file_in, strerror(errno));
exit(-1);
}
if (verbose)
{
printf("%s: Opening \"%s\" for input\n",
INF("%s: Opening \"%s\" for input",
progname, file_in);
}
@ -783,8 +783,8 @@ compile(void)
parse(data, size);
else
{
fprintf(stderr, "%s: Error. cannot read file \"%s\". %s\n",
progname, file_in, strerror(errno));
ERR("%s: Error. cannot read file \"%s\". %s",
progname, file_in, strerror(errno));
exit(-1);
}
free(data);
@ -811,7 +811,7 @@ is_num(int n)
str = eina_list_nth(params, n);
if (!str)
{
fprintf(stderr, "%s: Error. %s:%i no parameter supplied as argument %i\n",
ERR("%s: Error. %s:%i no parameter supplied as argument %i",
progname, file_in, line - 1, n + 1);
exit(-1);
}
@ -831,8 +831,8 @@ parse_str(int n)
str = eina_list_nth(params, n);
if (!str)
{
fprintf(stderr, "%s: Error. %s:%i no parameter supplied as argument %i\n",
progname, file_in, line - 1, n + 1);
ERR("%s: Error. %s:%i no parameter supplied as argument %i",
progname, file_in, line - 1, n + 1);
exit(-1);
}
s = mem_strdup(str);
@ -855,8 +855,8 @@ _parse_enum(char *str, va_list va)
/* End of the list, nothing matched. */
if (!s)
{
fprintf(stderr, "%s: Error. %s:%i token %s not one of:",
progname, file_in, line - 1, str);
fprintf(stderr, "%s: Error. %s:%i token %s not one of:",
progname, file_in, line - 1, str);
s = va_arg(va2, char *);
while (s)
{
@ -894,7 +894,7 @@ parse_enum(int n, ...)
str = eina_list_nth(params, n);
if (!str)
{
fprintf(stderr, "%s: Error. %s:%i no parameter supplied as argument %i\n",
ERR("%s: Error. %s:%i no parameter supplied as argument %i",
progname, file_in, line - 1, n + 1);
exit(-1);
}
@ -931,8 +931,8 @@ parse_int(int n)
str = eina_list_nth(params, n);
if (!str)
{
fprintf(stderr, "%s: Error. %s:%i no parameter supplied as argument %i\n",
progname, file_in, line - 1, n + 1);
ERR("%s: Error. %s:%i no parameter supplied as argument %i",
progname, file_in, line - 1, n + 1);
exit(-1);
}
i = my_atoi(str);
@ -948,15 +948,15 @@ parse_int_range(int n, int f, int t)
str = eina_list_nth(params, n);