fix edje error reporting for once and for all.

edje error was a mess. First someone (maybe myself) added eina log,
then people changed it to be a mix with printf()... then they replaced
eina_log with printf() + colors so it would be less verbose.

It's fixed now! Using eina log infrastructure.

If all that is wanted is specific messages for edje_cc domain, do it
with a specific log print function (eina_log_print_cb_set()). I made
it produce messages in the format:

    <levelcolor><progname>: <levelprefix><message>

Where:
 - levelcolor is defined by eina_log (I hacked the win32 version,
   since no public api to resolve level to color).
 - levelprefix is "Error. " or "Warning. " to cope with traditional
   output.

If it does not look as you wanted, let me know before stuffing some
printf() again.

Bonus point: reduced 2 global variables (progname and verbose),
removed lots of code.



SVN revision: 74701
devs/devilhorns/wayland_egl
Gustavo Sverzut Barbieri 12 years ago
parent bb43446421
commit f1e077844e
  1. 93
      legacy/edje/src/bin/edje_cc.c
  2. 41
      legacy/edje/src/bin/edje_cc.h
  3. 394
      legacy/edje/src/bin/edje_cc_handlers.c
  4. 8
      legacy/edje/src/bin/edje_cc_mem.c
  5. 249
      legacy/edje/src/bin/edje_cc_out.c
  6. 172
      legacy/edje/src/bin/edje_cc_parse.c
  7. 6
      legacy/edje/src/bin/edje_cc_sources.c
  8. 6
      legacy/edje/src/bin/edje_convert.c
  9. 5
      legacy/edje/src/bin/edje_convert_main.c
  10. 119
      legacy/edje/src/bin/edje_decc.c
  11. 9
      legacy/edje/src/bin/edje_decc.h
  12. 6
      legacy/edje/src/bin/edje_multisense_convert.c

@ -19,9 +19,9 @@ Eina_List *defines = NULL;
char *file_in = NULL;
char *tmp_dir = NULL;
char *file_out = NULL;
char *progname = NULL;
char *watchfile = NULL;
int verbose = 0;
static char *progname = NULL;
int no_lossy = 0;
int no_comp = 0;
@ -32,6 +32,86 @@ int max_quality = 100;
int compress_mode = EET_COMPRESSION_DEFAULT;
int threads = 0;
static void
_edje_cc_log_cb(const Eina_Log_Domain *d,
Eina_Log_Level level,
const char *file,
const char *fnc,
int line,
const char *fmt,
__UNUSED__ void *data,
va_list args)
{
if ((d->name) && (d->namelen == sizeof("edje_cc") - 1) &&
(memcmp(d->name, "edje_cc", sizeof("edje_cc") - 1) == 0))
{
const char *prefix;
Eina_Bool use_color = !eina_log_color_disable_get();
if (use_color)
{
#ifndef _WIN32
fputs(eina_log_level_color_get(level), stderr);
#else
int color;
switch (level)
{
case EINA_LOG_LEVEL_CRITICAL:
color = FOREGROUND_RED | FOREGROUND_INTENSITY;
break;
case EINA_LOG_LEVEL_ERR:
color = FOREGROUND_RED;
break;
case EINA_LOG_LEVEL_WARN:
color = FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_INTENSITY;
break;
case EINA_LOG_LEVEL_INFO:
color = FOREGROUND_GREEN | FOREGROUND_INTENSITY;
break;
case EINA_LOG_LEVEL_DBG:
color = FOREGROUND_BLUE | FOREGROUND_INTENSITY;
break;
default:
color = FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE;
}
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), color);
#endif
}
switch (level)
{
case EINA_LOG_LEVEL_CRITICAL:
prefix = "Critical. ";
break;
case EINA_LOG_LEVEL_ERR:
prefix = "Error. ";
break;
case EINA_LOG_LEVEL_WARN:
prefix = "Warning. ";
break;
default:
prefix = "";
}
fprintf(stderr, "%s: %s", progname, prefix);
if (use_color)
{
#ifndef _WIN32
fputs(EINA_COLOR_RESET, stderr);
#else
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),
FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE);
#endif
}
vfprintf(stderr, fmt, args);
putc('\n', stderr);
}
else
eina_log_print_cb_stderr(d, level, file, fnc, line, fmt, NULL, args);
}
static void
main_help(void)
{
@ -80,6 +160,9 @@ main(int argc, char **argv)
EINA_LOG_ERR("Enable to create a log domain.");
exit(-1);
}
progname = (char *)ecore_file_file_get(argv[0]);
eina_log_print_cb_set(_edje_cc_log_cb, NULL);
tmp_dir = getenv("TMPDIR");
img_dirs = eina_list_append(img_dirs, ".");
@ -87,7 +170,6 @@ main(int argc, char **argv)
/* add defines to epp so edc files can detect edje_cc version */
defines = eina_list_append(defines, mem_strdup("-DEDJE_VERSION_12=12"));
progname = (char *)ecore_file_file_get(argv[0]);
for (i = 1; i < argc; i++)
{
if (!strcmp(argv[i], "-h"))
@ -97,7 +179,7 @@ main(int argc, char **argv)
}
else if (!strcmp(argv[i], "-v"))
{
verbose = 1;
eina_log_domain_level_set("edje_cc", EINA_LOG_LEVEL_INFO);
}
else if (!strcmp(argv[i], "-no-lossy"))
{
@ -186,6 +268,7 @@ main(int argc, char **argv)
else if (!file_out)
file_out = argv[i];
}
if (!file_in)
{
fprintf(stderr, "%s: Error: no input file specified.\n", progname);
@ -193,6 +276,8 @@ main(int argc, char **argv)
exit(-1);
}
pfx = eina_prefix_new(argv[0], /* argv[0] value (optional) */
main, /* an optional symbol to check path of */
"EDJE", /* env var prefix to use (XXX_PREFIX, XXX_BIN_DIR etc. */

@ -18,43 +18,26 @@ extern Eina_Prefix *pfx;
extern int _edje_cc_log_dom ;
#define EDJE_CC_DEFAULT_LOG_COLOR EINA_COLOR_CYAN
#ifdef _WIN32
# define EDJE_ERR_COLOR FOREGROUND_RED | FOREGROUND_INTENSITY
# define EDJE_INF_COLOR FOREGROUND_RED | FOREGROUND_BLUE | FOREGROUND_INTENSITY
# define EDJE_WRN_COLOR FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_INTENSITY
# define EDJE_LOG(str, color, ...) do { \
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), \
color); \
printf(str); \
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), \
FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE); \
printf(": "); \
printf(__VA_ARGS__); \
printf("\n"); \
} while (0)
#else
# define EDJE_ERR_COLOR "\033[31m"
# define EDJE_INF_COLOR "\033[35m"
# define EDJE_WRN_COLOR "\033[33m"
# define EDJE_LOG(str, color, ...) do { \
printf("\033[31m"); \
printf(__VA_ARGS__); \
printf("\033[0m\n"); } \
while (0)
#endif
#ifdef ERR
# undef ERR
#endif
#define ERR(...) EDJE_LOG("ERR", EDJE_ERR_COLOR, __VA_ARGS__)
#define ERR(...) EINA_LOG_DOM_ERR(_edje_cc_log_dom, __VA_ARGS__)
#ifdef INF
# undef INF
#endif
#define INF(...) EDJE_LOG("INF", EDJE_INF_COLOR, __VA_ARGS__)
#define INF(...) EINA_LOG_DOM_INFO(_edje_cc_log_dom, __VA_ARGS__)
#ifdef WRN
# undef WRN
#endif
#define WRN(...) EDJE_LOG("WRN", EDJE_WRN_COLOR, __VA_ARGS__)
#define WRN(...) EINA_LOG_DOM_WARN(_edje_cc_log_dom, __VA_ARGS__)
#ifdef CRIT
# undef CRIT
#endif
#define CRIT(...) EINA_LOG_DOM_CRIT(_edje_cc_log_dom, __VA_ARGS__)
#ifdef DBG
# undef DBG
#endif
#define DBG(...) EINA_LOG_DOM_DBG(_edje_cc_log_dom, __VA_ARGS__)
/* types */
typedef struct _New_Object_Handler New_Object_Handler;
@ -231,9 +214,7 @@ extern Eina_List *snd_dirs;
extern char *file_in;
extern char *tmp_dir;
extern char *file_out;
extern char *progname;
extern char *watchfile;
extern int verbose;
extern int no_lossy;
extern int no_comp;
extern int no_raw;

@ -976,7 +976,8 @@ _edje_part_description_alloc(unsigned char type, const char *collection, const c
if (!result)
{
ERR("%s: Error. Unknown type %i of part %s in collection %s.", progname, type, part, collection);
ERR("Unknown type %i of part %s in collection %s.",
type, part, collection);
exit(-1);
}
@ -999,8 +1000,8 @@ _edje_program_check(const char *name, Edje_Program *me, Edje_Program **pgrms, un
epp = (Edje_Program_Parser *)pgrms[i];
if (!epp->can_override)
{
ERR("%s: Error. parse error %s:%i. There is already a program of the name %s\n",
progname, file_in, line - 1, name);
ERR("parse error %s:%i. There is already a program of the name %s",
file_in, line - 1, name);
exit(-1);
}
else
@ -1078,9 +1079,8 @@ _edje_program_copy(Edje_Program *ep, Edje_Program *ep2)
data_queue_copied_part_lookup(pc, &(et2->id), &(et->id));
else
{
ERR("%s: Error. parse error %s:%i. "
"target may only be used after action",
progname, file_in, line - 1);
ERR("parse error %s:%i. target may only be used after action",
file_in, line - 1);
exit(-1);
}
}
@ -1169,7 +1169,7 @@ st_externals_external(void)
0, sizeof (Edje_External_Directory));
if (!edje_file->external_dir->entries)
{
ERR("%s: Error. not enough memory", progname);
ERR("not enough memory");
exit(-1);
}
@ -1257,7 +1257,7 @@ st_images_image(void)
0, sizeof (Edje_Image_Directory_Entry));
if (!edje_file->image_dir->entries)
{
ERR("%s: Error. No enough memory.", progname);
ERR("No enough memory.");
exit(-1);
}
@ -1346,7 +1346,7 @@ ob_images_set(void)
0, sizeof (Edje_Image_Directory_Set));
if (!edje_file->image_dir->sets)
{
ERR("%s: Error. Not enough memory.", progname);
ERR("Not enough memory.");
exit(-1);
}
edje_file->image_dir->sets[edje_file->image_dir->sets_count - 1].id = edje_file->image_dir->sets_count - 1;
@ -1462,8 +1462,8 @@ st_images_set_image_size(void)
if (entry->size.min.w > entry->size.max.w
|| entry->size.min.h > entry->size.max.h)
{
ERR("%s: Error. parse error %s:%i. Image min and max size are not in the right order ([%i, %i] < [%i, %i])",
progname, file_in, line - 1,
ERR("parse error %s:%i. Image min and max size are not in the right order ([%i, %i] < [%i, %i])",
file_in, line - 1,
entry->size.min.w, entry->size.min.h,
entry->size.max.w, entry->size.max.h);
exit(-1);
@ -1601,23 +1601,23 @@ st_data_file(void)
fd = open(filename, O_RDONLY | O_BINARY, S_IRUSR | S_IWUSR);
if (fd < 0)
{
ERR("%s: Error. %s:%i when opening file \"%s\": \"%s\"",
progname, file_in, line, filename, strerror(errno));
ERR("%s:%i when opening file \"%s\": \"%s\"",
file_in, line, filename, strerror(errno));
exit(-1);
}
if (fstat(fd, &buf))
{
ERR("%s: Error. %s:%i when stating file \"%s\": \"%s\"",
progname, file_in, line, filename, strerror(errno));
ERR("%s:%i when stating file \"%s\": \"%s\"",
file_in, line, filename, strerror(errno));
exit(-1);
}
data = mmap(NULL, buf.st_size, PROT_READ, MAP_SHARED, fd, 0);
if (data == MAP_FAILED)
{
ERR("%s: Error. %s:%i when mapping file \"%s\": \"%s\"",
progname, file_in, line, filename, strerror(errno));
ERR("%s:%i when mapping file \"%s\": \"%s\"",
file_in, line, filename, strerror(errno));
exit(-1);
}
@ -1625,8 +1625,7 @@ st_data_file(void)
for (i = 0; i < buf.st_size; ++i, ++over)
if (*over == '\0')
{
ERR("%s: Error. %s:%i file \"%s\" is a binary file.",
progname, file_in, line, filename);
ERR("%s:%i file \"%s\" is a binary file.", file_in, line, filename);
exit(-1);
}
@ -1710,8 +1709,8 @@ st_color_class_name(void)
{
if ((cc != tcc) && (!strcmp(cc->name, tcc->name)))
{
fprintf(stderr, "%s: Error. parse error %s:%i. There is already a color class named \"%s\"\n",
progname, file_in, line - 1, cc->name);
ERR("parse error %s:%i. There is already a color class named \"%s\"",
file_in, line - 1, cc->name);
exit(-1);
}
}
@ -1841,8 +1840,8 @@ st_styles_style_name(void)
{
if (stl->name && tstl->name && (stl != tstl) && (!strcmp(stl->name, tstl->name)))
{
ERR("%s: Error. parse error %s:%i. There is already a style named \"%s\"",
progname, file_in, line - 1, stl->name);
ERR("parse error %s:%i. There is already a style named \"%s\"",
file_in, line - 1, stl->name);
exit(-1);
}
}
@ -1868,8 +1867,8 @@ st_styles_style_base(void)
stl = eina_list_data_get(eina_list_last(edje_file->styles));
if (stl->tags)
{
ERR("%s: Error. parse error %s:%i. There is already a basic format for the style",
progname, file_in, line - 1);
ERR("parse error %s:%i. There is already a basic format for the style",
file_in, line - 1);
exit(-1);
}
tag = mem_alloc(SZ(Edje_Style_Tag));
@ -2014,7 +2013,7 @@ st_collections_group_sound_sample_name(void)
if (!edje_file->sound_dir->samples)
{
ERR("%s: Error. No enough memory.", progname);
ERR("No enough memory.");
exit(-1);
}
@ -2061,7 +2060,7 @@ st_collections_group_sound_sample_source(void)
if (!edje_file->sound_dir->samples)
{
ERR("%s: Error. Invalid sound sample source definition.", progname);
ERR("Invalid sound sample source definition.");
exit(-1);
}
@ -2071,7 +2070,7 @@ st_collections_group_sound_sample_source(void)
if (!sample)
{
ERR("%s: Error. Invalid sound sample source definition.", progname);
ERR("Invalid sound sample source definition.");
exit(-1);
}
sample->snd_src = parse_str(0);
@ -2111,14 +2110,14 @@ st_collections_group_sound_tone(void)
{
if (!strcmp(edje_file->sound_dir->tones[i].name, tmp))
{
ERR("%s: Error. Tone name: %s already exist.", progname, tmp);
ERR("Tone name: %s already exist.", tmp);
free((char *)tmp);
exit(-1);
}
if (edje_file->sound_dir->tones[i].value == value)
{
ERR("%s: Error. Tone name %s with same frequency %d exist.",
progname, edje_file->sound_dir->tones[i].name, value);
ERR("Tone name %s with same frequency %d exist.",
edje_file->sound_dir->tones[i].name, value);
exit(-1);
}
}
@ -2130,7 +2129,7 @@ st_collections_group_sound_tone(void)
if (!edje_file->sound_dir->tones)
{
ERR("%s: Error. No enough memory.", progname);
ERR("No enough memory.");
exit(-1);
}
@ -2179,7 +2178,7 @@ ob_collections_group(void)
if (current_de && !current_de->entry)
{
ERR("%p: Error. A collection without a name was detected, that's not allowed.", progname);
ERR("A collection without a name was detected, that's not allowed.");
exit(-1);
}
@ -2304,16 +2303,16 @@ st_collections_group_inherit(void)
}
if (!pc2)
{
ERR("%s: Error. parse error %s:%i. There isn't a group with the name %s",
progname, file_in, line - 1, parent_name);
ERR("parse error %s:%i. There isn't a group with the name %s",
file_in, line - 1, parent_name);
exit(-1);
}
if (pc2 == pc)
{
ERR("%s: Error. parse error %s:%i. You are trying to inherit '%s' from itself. That's not possible."
ERR("parse error %s:%i. You are trying to inherit '%s' from itself. That's not possible."
"If there is another group of the same name, you want to inherit from that group and have the"
"same name as that group, there is a trick ! Just put the inherit before the directive that set"
"the name !", progname, file_in, line - 1, parent_name);
"the name !", file_in, line - 1, parent_name);
exit(-1);
}
@ -2704,8 +2703,8 @@ ob_collections_group_script(void)
cd->l2 = get_verbatim_line2();
if (cd->shared)
{
ERR("%s: Error. parse error %s:%i. There is already an existing script section for the group",
progname, file_in, line - 1);
ERR("parse error %s:%i. There is already an existing script section for the group",
file_in, line - 1);
exit(-1);
}
cd->shared = s;
@ -2735,8 +2734,8 @@ ob_collections_group_lua_script(void)
cd->l2 = get_verbatim_line2();
if (cd->shared)
{
ERR("%s: Error. parse error %s:%i. There is already an existing script section for the group",
progname, file_in, line - 1);
ERR("parse error %s:%i. There is already an existing script section for the group",
file_in, line - 1);
exit(-1);
}
cd->shared = s;
@ -2845,7 +2844,7 @@ st_collections_group_limits_vertical(void)
pc->limits.vertical = realloc(pc->limits.vertical, pc->limits.vertical_count * sizeof (Edje_Limit *));
if (!pc->limits.vertical || !el)
{
ERR("%s: Error. Not enough memory.", progname);
ERR("Not enough memory.");
exit(-1);
}
@ -2883,7 +2882,7 @@ st_collections_group_limits_horizontal(void)
pc->limits.horizontal = realloc(pc->limits.horizontal, pc->limits.horizontal_count * sizeof (Edje_Limit *));
if (!pc->limits.horizontal || !el)
{
ERR("%s: Error. Not enough memory.", progname);
ERR("Not enough memory.");
exit(-1);
}
@ -2977,7 +2976,7 @@ ob_collections_group_parts_part(void)
pc->parts = realloc(pc->parts, pc->parts_count * sizeof (Edje_Part *));
if (!pc->parts)
{
ERR("%s: Error. Not enough memory.", progname);
ERR("Not enough memory.");
exit(-1);
}
current_part = pc->parts[pc->parts_count - 1] = ep;
@ -3044,8 +3043,8 @@ st_collections_group_parts_part_name(void)
epp = (Edje_Part_Parser *)pc->parts[i];
if (!epp->can_override)
{
ERR("%s: Error. parse error %s:%i. There is already a part of the name %s",
progname, file_in, line - 1, ep->name);
ERR("parse error %s:%i. There is already a part of the name %s",
file_in, line - 1, ep->name);
exit(-1);
}
else
@ -3866,9 +3865,8 @@ static void ob_collections_group_parts_part_box_items_item(void)
if ((ep->type != EDJE_PART_TYPE_BOX) && (ep->type != EDJE_PART_TYPE_TABLE))
{
ERR("%s: Error. parse error %s:%i. "
"box attributes in non-BOX or TABLE part.",
progname, file_in, line - 1);
ERR("parse error %s:%i. box attributes in non-BOX or TABLE part.",
file_in, line - 1);
exit(-1);
}
@ -3876,7 +3874,7 @@ static void ob_collections_group_parts_part_box_items_item(void)
ep->items = realloc(ep->items, sizeof (Edje_Pack_Element*) * ep->items_count);
if (!ep->items)
{
ERR("%s: Error. Not enough memory.", progname);
ERR("Not enough memory.");
exit(-1);
}
@ -3931,9 +3929,8 @@ static void st_collections_group_parts_part_box_items_item_type(void)
s = parse_str(0);
if (strcmp(s, "GROUP"))
{
ERR("%s: Error. parse error %s:%i. "
"token %s not one of: GROUP.",
progname, file_in, line - 1, s);
ERR("parse error %s:%i. token %s not one of: GROUP.",
file_in, line - 1, s);
exit(-1);
}
/* FIXME: handle the enum, once everything else is supported */
@ -3974,8 +3971,8 @@ static void st_collections_group_parts_part_box_items_item_name(void)
pitem = (Edje_Pack_Element_Parser *)ep->items[i];
if (!pitem->can_override)
{
ERR("%s: Error. parse error %s:%i. There is already a item of the name %s",
progname, file_in, line - 1, item->name);
ERR("parse error %s:%i. There is already a item of the name %s",
file_in, line - 1, item->name);
exit(-1);
}
else
@ -4193,9 +4190,8 @@ static void st_collections_group_parts_part_table_items_item_position(void)
if (current_part->type != EDJE_PART_TYPE_TABLE)
{
ERR("%s: Error. parse error %s:%i. "
"table attributes in non-TABLE part.",
progname, file_in, line - 1);
ERR("parse error %s:%i. table attributes in non-TABLE part.",
file_in, line - 1);
exit(-1);
}
@ -4220,9 +4216,8 @@ static void st_collections_group_parts_part_table_items_item_span(void)
if (current_part->type != EDJE_PART_TYPE_TABLE)
{
ERR("%s: Error. parse error %s:%i. "
"table attributes in non-TABLE part.",
progname, file_in, line - 1);
ERR("parse error %s:%i. table attributes in non-TABLE part.",
file_in, line - 1);
exit(-1);
}
@ -4367,9 +4362,8 @@ st_collections_group_parts_part_description_inherit(void)
if (!ed->state.name)
{
ERR("%s: Error. parse error %s:%i. "
"inherit may only be used after state",
progname, file_in, line - 1);
ERR("parse error %s:%i. inherit may only be used after state",
file_in, line - 1);
exit(-1);
}
@ -4381,9 +4375,9 @@ st_collections_group_parts_part_description_inherit(void)
/* inherit may not be used in the default description */
if (!ep->other.desc_count)
{
ERR("%s: Error. parse error %s:%i. "
ERR("parse error %s:%i. "
"inherit may not be used in the default description",
progname, file_in, line - 1);
file_in, line - 1);
exit(-1);
}
@ -4429,9 +4423,9 @@ st_collections_group_parts_part_description_inherit(void)
if (!parent)
{
ERR("%s: Error. parse error %s:%i. "
"cannot find referenced part state %s %lf",
ep->name, file_in, line - 1, parent_name, parent_val);
ERR("parse error %s:%i. "
"cannot find referenced part %s state %s %lf",
file_in, line - 1, ep->name, parent_name, parent_val);
exit(-1);
}
@ -4590,9 +4584,8 @@ st_collections_group_parts_part_description_source(void)
if (current_part->type != EDJE_PART_TYPE_PROXY)
{
ERR("%s: Error. parse error %s:%i. "
"source attributes in non-PROXY part.",
progname, file_in, line - 1);
ERR("parse error %s:%i. source attributes in non-PROXY part.",
file_in, line - 1);
exit(-1);
}
@ -4635,9 +4628,8 @@ st_collections_group_parts_part_description_state(void)
s = parse_str(0);
if (!strcmp (s, "custom"))
{
ERR("%s: Error. parse error %s:%i. "
"invalid state name: '%s'.",
progname, file_in, line - 1, s);
ERR("parse error %s:%i. invalid state name: '%s'.",
file_in, line - 1, s);
exit(-1);
}
@ -4701,9 +4693,8 @@ st_collections_group_parts_part_description_visible(void)
if (current_part->type == EDJE_PART_TYPE_SPACER)
{
ERR("%s: Error. parse error %s:%i. "
"SPACER part can't have a visibility defined",
progname, file_in, line - 1);
ERR("parse error %s:%i. SPACER part can't have a visibility defined",
file_in, line - 1);
exit(-1);
}
@ -4820,9 +4811,9 @@ st_collections_group_parts_part_description_min(void)
if ((current_part->type != EDJE_PART_TYPE_IMAGE && current_part->type != EDJE_PART_TYPE_GROUP) ||
!tmp || strcmp(tmp, "SOURCE") != 0)
{
ERR("%s: Error. parse error %s:%i. "
ERR("parse error %s:%i. "
"Only IMAGE and GROUP part can have a min: SOURCE; defined",
progname, file_in, line - 1);
file_in, line - 1);
exit(-1);
}
@ -4880,9 +4871,9 @@ st_collections_group_parts_part_description_max(void)
if (current_part->type != EDJE_PART_TYPE_IMAGE ||
!tmp || strcmp(tmp, "SOURCE") != 0)
{
ERR("%s: Error. parse error %s:%i. "
ERR("parse error %s:%i. "
"Only IMAGE part can have a max: SOURCE; defined",
progname, file_in, line - 1);
file_in, line - 1);
exit(-1);
}
@ -4978,9 +4969,8 @@ st_collections_group_parts_part_description_color_class(void)
if (current_part->type == EDJE_PART_TYPE_SPACER)
{
ERR("%s: Error. parse error %s:%i. "
"SPACER part can't have a color defined",
progname, file_in, line - 1);
ERR("parse error %s:%i. SPACER part can't have a color defined",
file_in, line - 1);
exit(-1);
}
@ -5004,9 +4994,8 @@ st_collections_group_parts_part_description_color(void)
if (current_part->type == EDJE_PART_TYPE_SPACER)
{
ERR("%s: Error. parse error %s:%i. "
"SPACER part can't have a color defined",
progname, file_in, line - 1);
ERR("parse error %s:%i. SPACER part can't have a color defined",
file_in, line - 1);
exit(-1);
}
@ -5033,9 +5022,8 @@ st_collections_group_parts_part_description_color2(void)
if (current_part->type == EDJE_PART_TYPE_SPACER)
{
ERR("%s: Error. parse error %s:%i. "
"SPACER part can't have a color defined",
progname, file_in, line - 1);
ERR("parse error %s:%i. SPACER part can't have a color defined",
file_in, line - 1);
exit(-1);
}
@ -5068,7 +5056,8 @@ st_collections_group_parts_part_description_color3(void)
if (current_part->type != EDJE_PART_TYPE_TEXT
&& current_part->type != EDJE_PART_TYPE_TEXTBLOCK)
{
ERR("%s: Error. Setting color3 in part %s from %s not of type TEXT or TEXTBLOCK.", progname, current_part->name, pc->part);
ERR("Setting color3 in part %s from %s not of type TEXT or TEXTBLOCK.",
current_part->name, pc->part);
exit(-1);
}
@ -5349,9 +5338,9 @@ st_collections_group_parts_part_description_image_normal(void)
if (current_part->type != EDJE_PART_TYPE_IMAGE)
{
ERR("%s: Error. parse error %s:%i. "
ERR("parse error %s:%i. "
"image attributes in non-IMAGE part.",
progname, file_in, line - 1);
file_in, line - 1);
exit(-1);
}
@ -5389,9 +5378,8 @@ st_collections_group_parts_part_description_image_tween(void)
if (current_part->type != EDJE_PART_TYPE_IMAGE)
{
ERR("%s: Error. parse error %s:%i. "
"image attributes in non-IMAGE part.",
progname, file_in, line - 1);
ERR("parse error %s:%i. image attributes in non-IMAGE part.",
file_in, line - 1);
exit(-1);
}
@ -5434,9 +5422,8 @@ st_collections_group_parts_part_description_image_border(void)
if (current_part->type != EDJE_PART_TYPE_IMAGE)
{
ERR("%s: Error. parse error %s:%i. "
"image attributes in non-IMAGE part.",
progname, file_in, line - 1);
ERR("parse error %s:%i. image attributes in non-IMAGE part.",
file_in, line - 1);
exit(-1);
}
@ -5469,9 +5456,8 @@ st_collections_group_parts_part_description_image_middle(void)
if (current_part->type != EDJE_PART_TYPE_IMAGE)
{
ERR("%s: Error. parse error %s:%i. "
"image attributes in non-IMAGE part.",
progname, file_in, line - 1);
ERR("parse error %s:%i. image attributes in non-IMAGE part.",
file_in, line - 1);
exit(-1);
}
@ -5512,9 +5498,8 @@ st_collections_group_parts_part_description_image_border_scale_by(void)
if (current_part->type != EDJE_PART_TYPE_IMAGE)
{
ERR("%s: Error. parse error %s:%i. "
"image attributes in non-IMAGE part.",
progname, file_in, line - 1);
ERR("parse error %s:%i. image attributes in non-IMAGE part.",
file_in, line - 1);
exit(-1);
}
@ -5543,9 +5528,8 @@ st_collections_group_parts_part_description_image_border_scale(void)
if (current_part->type != EDJE_PART_TYPE_IMAGE)
{
ERR("%s: Error. parse error %s:%i. "
"image attributes in non-IMAGE part.",
progname, file_in, line - 1);
ERR("parse error %s:%i. image attributes in non-IMAGE part.",
file_in, line - 1);
exit(-1);
}
@ -5577,9 +5561,8 @@ st_collections_group_parts_part_description_image_scale_hint(void)
if (current_part->type != EDJE_PART_TYPE_IMAGE)
{
ERR("%s: Error. parse error %s:%i. "
"image attributes in non-IMAGE part.",
progname, file_in, line - 1);
ERR("parse error %s:%i. image attributes in non-IMAGE part.",
file_in, line - 1);
exit(-1);
}
@ -5659,9 +5642,9 @@ st_collections_group_parts_part_description_fill_smooth(void)
}
default:
{
ERR("%s: Error. parse error %s:%i. "
ERR("parse error %s:%i. "
"image and proxy attributes in non-IMAGE, non-PROXY `%s` part (%i).",
progname, file_in, line - 1, current_part->name, current_part->type);
file_in, line - 1, current_part->name, current_part->type);
exit(-1);
}
}
@ -5693,9 +5676,8 @@ st_collections_group_parts_part_description_fill_spread(void)
/* XXX this will need to include IMAGES when spread support is added to evas images */
{
ERR("%s: Error. parse error %s:%i. "
"fill.spread not supported yet.",
progname, file_in, line - 1);
ERR("parse error %s:%i. fill.spread not supported yet.",
file_in, line - 1);
exit(-1);
}
@ -5706,9 +5688,8 @@ st_collections_group_parts_part_description_fill_spread(void)
if (ep->type != EDJE_PART_TYPE_IMAGE)
{
ERR("%s: Error. parse error %s:%i. "
"image attributes in non-IMAGE part.",
progname, file_in, line - 1);
ERR("parse error %s:%i. image attributes in non-IMAGE part.",
file_in, line - 1);
exit(-1);
}
@ -5759,9 +5740,9 @@ st_collections_group_parts_part_description_fill_type(void)
}
default:
{
ERR("%s: Error. parse error %s:%i. "
ERR("parse error %s:%i. "
"image and proxy attributes in non-IMAGE, non-PROXY part.",
progname, file_in, line - 1);
file_in, line - 1);
exit(-1);
}
}
@ -5832,9 +5813,9 @@ st_collections_group_parts_part_description_fill_origin_relative(void)
}
default:
{
ERR("%s: Error. parse error %s:%i. "
ERR("parse error %s:%i. "
"image and proxy attributes in non-IMAGE, non-PROXY part.",
progname, file_in, line - 1);
file_in, line - 1);
exit(-1);
}
}
@ -5882,9 +5863,9 @@ st_collections_group_parts_part_description_fill_origin_offset(void)
}
default:
{
ERR("%s: Error. parse error %s:%i. "
ERR("parse error %s:%i. "
"image and proxy attributes in non-IMAGE, non-PROXY part.",
progname, file_in, line - 1);
file_in, line - 1);
exit(-1);
}
}
@ -5955,9 +5936,9 @@ st_collections_group_parts_part_description_fill_size_relative(void)
}
default:
{
ERR("%s: Error. parse error %s:%i. "
ERR("parse error %s:%i. "
"image and proxy attributes in non-IMAGE, non-PROXY part.",
progname, file_in, line - 1);
file_in, line - 1);
exit(-1);
}
}
@ -6005,9 +5986,9 @@ st_collections_group_parts_part_description_fill_size_offset(void)
}
default:
{
ERR("%s: Error. parse error %s:%i. "
ERR("parse error %s:%i. "
"image and proxy attributes in non-IMAGE, non-PROXY part.",
progname, file_in, line - 1);
file_in, line - 1);
exit(-1);
}
}
@ -6069,9 +6050,8 @@ st_collections_group_parts_part_description_text_text(void)
if ((current_part->type != EDJE_PART_TYPE_TEXT) &&
(current_part->type != EDJE_PART_TYPE_TEXTBLOCK))
{
ERR("%s: Error. parse error %s:%i. "
"text attributes in non-TEXT part.",
progname, file_in, line - 1);
ERR("parse error %s:%i. text attributes in non-TEXT part.",
file_in, line - 1);
exit(-1);
}
@ -6116,9 +6096,8 @@ st_collections_group_parts_part_description_text_text_class(void)
if ((current_part->type != EDJE_PART_TYPE_TEXT) &&
(current_part->type != EDJE_PART_TYPE_TEXTBLOCK))
{
ERR("%s: Error. parse error %s:%i. "
"text attributes in non-TEXT part.",
progname, file_in, line - 1);
ERR("parse error %s:%i. text attributes in non-TEXT part.",
file_in, line - 1);
exit(-1);
}
@ -6149,9 +6128,8 @@ st_collections_group_parts_part_description_text_font(void)
if ((current_part->type != EDJE_PART_TYPE_TEXT) &&
(current_part->type != EDJE_PART_TYPE_TEXTBLOCK))
{
ERR("%s: Error. parse error %s:%i. "
"text attributes in non-TEXT part.",
progname, file_in, line - 1);
ERR("parse error %s:%i. text attributes in non-TEXT part.",
file_in, line - 1);
exit(-1);
}
@ -6182,9 +6160,8 @@ st_collections_group_parts_part_description_text_style(void)
if ((current_part->type != EDJE_PART_TYPE_TEXT) &&
(current_part->type != EDJE_PART_TYPE_TEXTBLOCK))
{
ERR("%s: Error. parse error %s:%i. "
"text attributes in non-TEXT part.",
progname, file_in, line - 1);
ERR("parse error %s:%i. text attributes in non-TEXT part.",
file_in, line - 1);
exit(-1);
}
@ -6216,9 +6193,8 @@ st_collections_group_parts_part_description_text_repch(void)
if ((current_part->type != EDJE_PART_TYPE_TEXT) &&
(current_part->type != EDJE_PART_TYPE_TEXTBLOCK))
{
ERR("%s: Error. parse error %s:%i. "
"text attributes in non-TEXT part.",
progname, file_in, line - 1);
ERR("parse error %s:%i. text attributes in non-TEXT part.",
file_in, line - 1);
exit(-1);
}
@ -6249,9 +6225,8 @@ st_collections_group_parts_part_description_text_size(void)
if ((current_part->type != EDJE_PART_TYPE_TEXT) &&
(current_part->type != EDJE_PART_TYPE_TEXTBLOCK))
{
ERR("%s: Error. parse error %s:%i. "
"text attributes in non-TEXT part.",
progname, file_in, line - 1);
ERR("parse error %s:%i. text attributes in non-TEXT part.",
file_in, line - 1);
exit(-1);
}
@ -6283,9 +6258,8 @@ st_collections_group_parts_part_description_text_size_range(void)
if ((current_part->type != EDJE_PART_TYPE_TEXT) &&
(current_part->type != EDJE_PART_TYPE_TEXTBLOCK))
{
ERR("%s: Error. parse error %s:%i. "
"text attributes in non-TEXT part.",
progname, file_in, line - 1);
ERR("parse error %s:%i. text attributes in non-TEXT part.",
file_in, line - 1);
exit(-1);
}
@ -6295,9 +6269,8 @@ st_collections_group_parts_part_description_text_size_range(void)
ed->text.size_range_max = parse_int_range(1, 0, 255);
if (ed->text.size_range_min > ed->text.size_range_max)
{
ERR("%s: Error. parse error %s:%i. "
"min size is bigger than max size.",
progname, file_in, line - 1);
ERR("parse error %s:%i. min size is bigger than max size.",
file_in, line - 1);
exit(-1);
}
}
@ -6324,9 +6297,8 @@ st_collections_group_parts_part_description_text_fit(void)
if ((current_part->type != EDJE_PART_TYPE_TEXT) &&
(current_part->type != EDJE_PART_TYPE_TEXTBLOCK))
{
ERR("%s: Error. parse error %s:%i. "
"text attributes in non-TEXT part.",
progname, file_in, line - 1);
ERR("parse error %s:%i. text attributes in non-TEXT part.",
file_in, line - 1);
exit(-1);
}
@ -6359,9 +6331,8 @@ st_collections_group_parts_part_description_text_min(void)
if ((current_part->type != EDJE_PART_TYPE_TEXT) &&
(current_part->type != EDJE_PART_TYPE_TEXTBLOCK))
{
ERR("%s: Error. parse error %s:%i. "
"text attributes in non-TEXT part.",
progname, file_in, line - 1);
ERR("parse error %s:%i. text attributes in non-TEXT part.",
file_in, line - 1);
exit(-1);
}
@ -6394,9 +6365,8 @@ st_collections_group_parts_part_description_text_max(void)
if ((current_part->type != EDJE_PART_TYPE_TEXT) &&
(current_part->type != EDJE_PART_TYPE_TEXTBLOCK))
{
ERR("%s: Error. parse error %s:%i. "
"text attributes in non-TEXT part.",
progname, file_in, line - 1);
ERR("parse error %s:%i. text attributes in non-TEXT part.",
file_in, line - 1);
exit(-1);
}
@ -6428,9 +6398,8 @@ st_collections_group_parts_part_description_text_align(void)
if ((current_part->type != EDJE_PART_TYPE_TEXT) &&
(current_part->type != EDJE_PART_TYPE_TEXTBLOCK))
{
ERR("%s: Error. parse error %s:%i. "
"text attributes in non-TEXT part.",
progname, file_in, line - 1);
ERR("parse error %s:%i. text attributes in non-TEXT part.",
file_in, line - 1);
exit(-1);
}
@ -6465,9 +6434,8 @@ st_collections_group_parts_part_description_text_source(void)
if ((current_part->type != EDJE_PART_TYPE_TEXT) &&
(current_part->type != EDJE_PART_TYPE_TEXTBLOCK))
{
ERR("%s: Error. parse error %s:%i. "
"text attributes in non-TEXT part.",
progname, file_in, line - 1);
ERR("parse error %s:%i. text attributes in non-TEXT part.",
file_in, line - 1);
exit(-1);
}
@ -6507,9 +6475,8 @@ st_collections_group_parts_part_description_text_text_source(void)
if ((current_part->type != EDJE_PART_TYPE_TEXT) &&
(current_part->type != EDJE_PART_TYPE_TEXTBLOCK))
{
ERR("%s: Error. parse error %s:%i. "
"text attributes in non-TEXT part.",
progname, file_in, line - 1);
ERR("parse error %s:%i. text attributes in non-TEXT part.",
file_in, line - 1);
exit(-1);
}
@ -6547,9 +6514,8 @@ st_collections_group_parts_part_description_text_elipsis(void)
if ((current_part->type != EDJE_PART_TYPE_TEXT) &&
(current_part->type != EDJE_PART_TYPE_TEXTBLOCK))
{
ERR("%s: Error. parse error %s:%i. "
"text attributes in non-TEXT part.",
progname, file_in, line - 1);
ERR("parse error %s:%i. text attributes in non-TEXT part.",
file_in, line - 1);
exit(-1);
}
@ -6643,9 +6609,8 @@ static void st_collections_group_parts_part_description_box_layout(void)
if (current_part->type != EDJE_PART_TYPE_BOX)
{
ERR("%s: Error. parse error %s:%i. "
"box attributes in non-BOX part.",
progname, file_in, line - 1);
ERR("parse error %s:%i. box attributes in non-BOX part.",
file_in, line - 1);
exit(-1);
}
@ -6664,9 +6629,8 @@ static void st_collections_group_parts_part_description_box_align(void)
if (current_part->type != EDJE_PART_TYPE_BOX)
{
ERR("%s: Error. parse error %s:%i. "
"box attributes in non-BOX part.",
progname, file_in, line - 1);
ERR("parse error %s:%i. box attributes in non-BOX part.",
file_in, line - 1);
exit(-1);
}
@ -6684,9 +6648,8 @@ static void st_collections_group_parts_part_description_box_padding(void)
if (current_part->type != EDJE_PART_TYPE_BOX)
{
ERR("%s: Error. parse error %s:%i. "
"box attributes in non-BOX part.",
progname, file_in, line - 1);
ERR("parse error %s:%i. box attributes in non-BOX part.",
file_in, line - 1);
exit(-1);
}
@ -6705,9 +6668,8 @@ st_collections_group_parts_part_description_box_min(void)
if (current_part->type != EDJE_PART_TYPE_BOX)
{
ERR("%s: Error. parse error %s:%i. "
"box attributes in non-BOX part.",
progname, file_in, line - 1);
ERR("parse error %s:%i. box attributes in non-BOX part.",
file_in, line - 1);
exit(-1);
}
@ -6792,9 +6754,8 @@ static void st_collections_group_parts_part_description_table_homogeneous(void)
if (current_part->type != EDJE_PART_TYPE_TABLE)
{
ERR("%s: Error. parse error %s:%i. "
"table attributes in non-TABLE part.",
progname, file_in, line - 1);
ERR("parse error %s:%i. table attributes in non-TABLE part.",
file_in, line - 1);
exit(-1);
}
@ -6815,9 +6776,8 @@ static void st_collections_group_parts_part_description_table_align(void)
if (current_part->type != EDJE_PART_TYPE_TABLE)
{
ERR("%s: Error. parse error %s:%i. "
"table attributes in non-TABLE part.",
progname, file_in, line - 1);
ERR("parse error %s:%i. table attributes in non-TABLE part.",
file_in, line - 1);
exit(-1);
}
@ -6835,9 +6795,8 @@ static void st_collections_group_parts_part_description_table_padding(void)
if (current_part->type != EDJE_PART_TYPE_TABLE)
{
ERR("%s: Error. parse error %s:%i. "
"table attributes in non-TABLE part.",
progname, file_in, line - 1);
ERR("parse error %s:%i. table attributes in non-TABLE part.",
file_in, line - 1);
exit(-1);
}
@ -6856,9 +6815,8 @@ st_collections_group_parts_part_description_table_min(void)
if (current_part->type != EDJE_PART_TYPE_TABLE)
{
ERR("%s: Error. parse error %s:%i. "
"box attributes in non-TABLE part.",
progname, file_in, line - 1);
ERR("parse error %s:%i. box attributes in non-TABLE part.",
file_in, line - 1);
exit(-1);
}