summaryrefslogtreecommitdiff
path: root/legacy
diff options
context:
space:
mode:
authorGustavo Sverzut Barbieri <barbieri@gmail.com>2012-07-31 22:42:03 +0000
committerGustavo Sverzut Barbieri <barbieri@gmail.com>2012-07-31 22:42:03 +0000
commitf1e077844e58fd00a0f1dec43aae459890db2f14 (patch)
tree25120defdda32a0686c1ef60bceb33c5d29cd958 /legacy
parentbb4344642179302e7d712eb8550292a2bfb5efa4 (diff)
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
Diffstat (limited to 'legacy')
-rw-r--r--legacy/edje/src/bin/edje_cc.c93
-rw-r--r--legacy/edje/src/bin/edje_cc.h41
-rw-r--r--legacy/edje/src/bin/edje_cc_handlers.c394
-rw-r--r--legacy/edje/src/bin/edje_cc_mem.c8
-rw-r--r--legacy/edje/src/bin/edje_cc_out.c249
-rw-r--r--legacy/edje/src/bin/edje_cc_parse.c172
-rw-r--r--legacy/edje/src/bin/edje_cc_sources.c6
-rw-r--r--legacy/edje/src/bin/edje_convert.c6
-rw-r--r--legacy/edje/src/bin/edje_convert_main.c5
-rw-r--r--legacy/edje/src/bin/edje_decc.c119
-rw-r--r--legacy/edje/src/bin/edje_decc.h9
-rw-r--r--legacy/edje/src/bin/edje_multisense_convert.c6
12 files changed, 572 insertions, 536 deletions
diff --git a/legacy/edje/src/bin/edje_cc.c b/legacy/edje/src/bin/edje_cc.c
index bbd52035cd..d0ec3bd6fc 100644
--- a/legacy/edje/src/bin/edje_cc.c
+++ b/legacy/edje/src/bin/edje_cc.c
@@ -19,9 +19,9 @@ Eina_List *defines = NULL;
19char *file_in = NULL; 19char *file_in = NULL;
20char *tmp_dir = NULL; 20char *tmp_dir = NULL;
21char *file_out = NULL; 21char *file_out = NULL;
22char *progname = NULL;
23char *watchfile = NULL; 22char *watchfile = NULL;
24int verbose = 0; 23
24static char *progname = NULL;
25 25
26int no_lossy = 0; 26int no_lossy = 0;
27int no_comp = 0; 27int no_comp = 0;
@@ -33,6 +33,86 @@ int compress_mode = EET_COMPRESSION_DEFAULT;
33int threads = 0; 33int threads = 0;
34 34
35static void 35static void
36_edje_cc_log_cb(const Eina_Log_Domain *d,
37 Eina_Log_Level level,
38 const char *file,
39 const char *fnc,
40 int line,
41 const char *fmt,
42 __UNUSED__ void *data,
43 va_list args)
44{
45 if ((d->name) && (d->namelen == sizeof("edje_cc") - 1) &&
46 (memcmp(d->name, "edje_cc", sizeof("edje_cc") - 1) == 0))
47 {
48 const char *prefix;
49 Eina_Bool use_color = !eina_log_color_disable_get();
50
51 if (use_color)
52 {
53#ifndef _WIN32
54 fputs(eina_log_level_color_get(level), stderr);
55#else
56 int color;
57 switch (level)
58 {
59 case EINA_LOG_LEVEL_CRITICAL:
60 color = FOREGROUND_RED | FOREGROUND_INTENSITY;
61 break;
62 case EINA_LOG_LEVEL_ERR:
63 color = FOREGROUND_RED;
64 break;
65 case EINA_LOG_LEVEL_WARN:
66 color = FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_INTENSITY;
67 break;
68 case EINA_LOG_LEVEL_INFO:
69 color = FOREGROUND_GREEN | FOREGROUND_INTENSITY;
70 break;
71 case EINA_LOG_LEVEL_DBG:
72 color = FOREGROUND_BLUE | FOREGROUND_INTENSITY;
73 break;
74 default:
75 color = FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE;
76 }
77 SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), color);
78#endif
79 }
80
81 switch (level)
82 {
83 case EINA_LOG_LEVEL_CRITICAL:
84 prefix = "Critical. ";
85 break;
86 case EINA_LOG_LEVEL_ERR:
87 prefix = "Error. ";
88 break;
89 case EINA_LOG_LEVEL_WARN:
90 prefix = "Warning. ";
91 break;
92 default:
93 prefix = "";
94 }
95 fprintf(stderr, "%s: %s", progname, prefix);
96
97 if (use_color)
98 {
99#ifndef _WIN32
100 fputs(EINA_COLOR_RESET, stderr);
101#else
102 SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),
103 FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE);
104#endif
105 }
106
107
108 vfprintf(stderr, fmt, args);
109 putc('\n', stderr);
110 }
111 else
112 eina_log_print_cb_stderr(d, level, file, fnc, line, fmt, NULL, args);
113}
114
115static void
36main_help(void) 116main_help(void)
37{ 117{
38 printf 118 printf
@@ -80,6 +160,9 @@ main(int argc, char **argv)
80 EINA_LOG_ERR("Enable to create a log domain."); 160 EINA_LOG_ERR("Enable to create a log domain.");
81 exit(-1); 161 exit(-1);
82 } 162 }
163 progname = (char *)ecore_file_file_get(argv[0]);
164 eina_log_print_cb_set(_edje_cc_log_cb, NULL);
165
83 tmp_dir = getenv("TMPDIR"); 166 tmp_dir = getenv("TMPDIR");
84 167
85 img_dirs = eina_list_append(img_dirs, "."); 168 img_dirs = eina_list_append(img_dirs, ".");
@@ -87,7 +170,6 @@ main(int argc, char **argv)
87 /* add defines to epp so edc files can detect edje_cc version */ 170 /* add defines to epp so edc files can detect edje_cc version */
88 defines = eina_list_append(defines, mem_strdup("-DEDJE_VERSION_12=12")); 171 defines = eina_list_append(defines, mem_strdup("-DEDJE_VERSION_12=12"));
89 172
90 progname = (char *)ecore_file_file_get(argv[0]);
91 for (i = 1; i < argc; i++) 173 for (i = 1; i < argc; i++)
92 { 174 {
93 if (!strcmp(argv[i], "-h")) 175 if (!strcmp(argv[i], "-h"))
@@ -97,7 +179,7 @@ main(int argc, char **argv)
97 } 179 }
98 else if (!strcmp(argv[i], "-v")) 180 else if (!strcmp(argv[i], "-v"))
99 { 181 {
100 verbose = 1; 182 eina_log_domain_level_set("edje_cc", EINA_LOG_LEVEL_INFO);
101 } 183 }
102 else if (!strcmp(argv[i], "-no-lossy")) 184 else if (!strcmp(argv[i], "-no-lossy"))
103 { 185 {
@@ -186,6 +268,7 @@ main(int argc, char **argv)
186 else if (!file_out) 268 else if (!file_out)
187 file_out = argv[i]; 269 file_out = argv[i];
188 } 270 }
271
189 if (!file_in) 272 if (!file_in)
190 { 273 {
191 fprintf(stderr, "%s: Error: no input file specified.\n", progname); 274 fprintf(stderr, "%s: Error: no input file specified.\n", progname);
@@ -193,6 +276,8 @@ main(int argc, char **argv)
193 exit(-1); 276 exit(-1);
194 } 277 }
195 278
279
280
196 pfx = eina_prefix_new(argv[0], /* argv[0] value (optional) */ 281 pfx = eina_prefix_new(argv[0], /* argv[0] value (optional) */
197 main, /* an optional symbol to check path of */ 282 main, /* an optional symbol to check path of */
198 "EDJE", /* env var prefix to use (XXX_PREFIX, XXX_BIN_DIR etc. */ 283 "EDJE", /* env var prefix to use (XXX_PREFIX, XXX_BIN_DIR etc. */
diff --git a/legacy/edje/src/bin/edje_cc.h b/legacy/edje/src/bin/edje_cc.h
index 4b78382d35..d9468b6bcf 100644
--- a/legacy/edje/src/bin/edje_cc.h
+++ b/legacy/edje/src/bin/edje_cc.h
@@ -18,43 +18,26 @@ extern Eina_Prefix *pfx;
18extern int _edje_cc_log_dom ; 18extern int _edje_cc_log_dom ;
19#define EDJE_CC_DEFAULT_LOG_COLOR EINA_COLOR_CYAN 19#define EDJE_CC_DEFAULT_LOG_COLOR EINA_COLOR_CYAN
20 20
21#ifdef _WIN32
22# define EDJE_ERR_COLOR FOREGROUND_RED | FOREGROUND_INTENSITY
23# define EDJE_INF_COLOR FOREGROUND_RED | FOREGROUND_BLUE | FOREGROUND_INTENSITY
24# define EDJE_WRN_COLOR FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_INTENSITY
25# define EDJE_LOG(str, color, ...) do { \
26 SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), \
27 color); \
28 printf(str); \
29 SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), \
30 FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE); \
31 printf(": "); \
32 printf(__VA_ARGS__); \
33 printf("\n"); \
34 } while (0)
35#else
36# define EDJE_ERR_COLOR "\033[31m"
37# define EDJE_INF_COLOR "\033[35m"
38# define EDJE_WRN_COLOR "\033[33m"
39# define EDJE_LOG(str, color, ...) do { \
40 printf("\033[31m"); \
41 printf(__VA_ARGS__); \
42 printf("\033[0m\n"); } \
43 while (0)
44#endif
45
46#ifdef ERR 21#ifdef ERR
47# undef ERR 22# undef ERR
48#endif 23#endif
49#define ERR(...) EDJE_LOG("ERR", EDJE_ERR_COLOR, __VA_ARGS__) 24#define ERR(...) EINA_LOG_DOM_ERR(_edje_cc_log_dom, __VA_ARGS__)
50#ifdef INF 25#ifdef INF
51# undef INF 26# undef INF
52#endif 27#endif
53#define INF(...) EDJE_LOG("INF", EDJE_INF_COLOR, __VA_ARGS__) 28#define INF(...) EINA_LOG_DOM_INFO(_edje_cc_log_dom, __VA_ARGS__)
54#ifdef WRN 29#ifdef WRN
55# undef WRN 30# undef WRN
56#endif 31#endif
57#define WRN(...) EDJE_LOG("WRN", EDJE_WRN_COLOR, __VA_ARGS__) 32#define WRN(...) EINA_LOG_DOM_WARN(_edje_cc_log_dom, __VA_ARGS__)
33#ifdef CRIT
34# undef CRIT
35#endif
36#define CRIT(...) EINA_LOG_DOM_CRIT(_edje_cc_log_dom, __VA_ARGS__)
37#ifdef DBG
38# undef DBG
39#endif
40#define DBG(...) EINA_LOG_DOM_DBG(_edje_cc_log_dom, __VA_ARGS__)
58 41
59/* types */ 42/* types */
60typedef struct _New_Object_Handler New_Object_Handler; 43typedef struct _New_Object_Handler New_Object_Handler;
@@ -231,9 +214,7 @@ extern Eina_List *snd_dirs;
231extern char *file_in; 214extern char *file_in;
232extern char *tmp_dir; 215extern char *tmp_dir;
233extern char *file_out; 216extern char *file_out;
234extern char *progname;
235extern char *watchfile; 217extern char *watchfile;
236extern int verbose;
237extern int no_lossy; 218extern int no_lossy;
238extern int no_comp; 219extern int no_comp;
239extern int no_raw; 220extern int no_raw;
diff --git a/legacy/edje/src/bin/edje_cc_handlers.c b/legacy/edje/src/bin/edje_cc_handlers.c
index ce4b6952c2..eb91ed4320 100644
--- a/legacy/edje/src/bin/edje_cc_handlers.c
+++ b/legacy/edje/src/bin/edje_cc_handlers.c
@@ -976,7 +976,8 @@ _edje_part_description_alloc(unsigned char type, const char *collection, const c
976 976
977 if (!result) 977 if (!result)
978 { 978 {
979 ERR("%s: Error. Unknown type %i of part %s in collection %s.", progname, type, part, collection); 979 ERR("Unknown type %i of part %s in collection %s.",
980 type, part, collection);
980 exit(-1); 981 exit(-1);
981 } 982 }
982 983
@@ -999,8 +1000,8 @@ _edje_program_check(const char *name, Edje_Program *me, Edje_Program **pgrms, un
999 epp = (Edje_Program_Parser *)pgrms[i]; 1000 epp = (Edje_Program_Parser *)pgrms[i];
1000 if (!epp->can_override) 1001 if (!epp->can_override)
1001 { 1002 {
1002 ERR("%s: Error. parse error %s:%i. There is already a program of the name %s\n", 1003 ERR("parse error %s:%i. There is already a program of the name %s",
1003 progname, file_in, line - 1, name); 1004 file_in, line - 1, name);
1004 exit(-1); 1005 exit(-1);
1005 } 1006 }
1006 else 1007 else
@@ -1078,9 +1079,8 @@ _edje_program_copy(Edje_Program *ep, Edje_Program *ep2)
1078 data_queue_copied_part_lookup(pc, &(et2->id), &(et->id)); 1079 data_queue_copied_part_lookup(pc, &(et2->id), &(et->id));
1079 else 1080 else
1080 { 1081 {
1081 ERR("%s: Error. parse error %s:%i. " 1082 ERR("parse error %s:%i. target may only be used after action",
1082 "target may only be used after action", 1083 file_in, line - 1);
1083 progname, file_in, line - 1);
1084 exit(-1); 1084 exit(-1);
1085 } 1085 }
1086 } 1086 }
@@ -1169,7 +1169,7 @@ st_externals_external(void)
1169 0, sizeof (Edje_External_Directory)); 1169 0, sizeof (Edje_External_Directory));
1170 if (!edje_file->external_dir->entries) 1170 if (!edje_file->external_dir->entries)
1171 { 1171 {
1172 ERR("%s: Error. not enough memory", progname); 1172 ERR("not enough memory");
1173 exit(-1); 1173 exit(-1);
1174 } 1174 }
1175 1175
@@ -1257,7 +1257,7 @@ st_images_image(void)
1257 0, sizeof (Edje_Image_Directory_Entry)); 1257 0, sizeof (Edje_Image_Directory_Entry));
1258 if (!edje_file->image_dir->entries) 1258 if (!edje_file->image_dir->entries)
1259 { 1259 {
1260 ERR("%s: Error. No enough memory.", progname); 1260 ERR("No enough memory.");
1261 exit(-1); 1261 exit(-1);
1262 } 1262 }
1263 1263
@@ -1346,7 +1346,7 @@ ob_images_set(void)
1346 0, sizeof (Edje_Image_Directory_Set)); 1346 0, sizeof (Edje_Image_Directory_Set));
1347 if (!edje_file->image_dir->sets) 1347 if (!edje_file->image_dir->sets)
1348 { 1348 {
1349 ERR("%s: Error. Not enough memory.", progname); 1349 ERR("Not enough memory.");
1350 exit(-1); 1350 exit(-1);
1351 } 1351 }
1352 edje_file->image_dir->sets[edje_file->image_dir->sets_count - 1].id = edje_file->image_dir->sets_count - 1; 1352 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)
1462 if (entry->size.min.w > entry->size.max.w 1462 if (entry->size.min.w > entry->size.max.w
1463 || entry->size.min.h > entry->size.max.h) 1463 || entry->size.min.h > entry->size.max.h)
1464 { 1464 {
1465 ERR("%s: Error. parse error %s:%i. Image min and max size are not in the right order ([%i, %i] < [%i, %i])", 1465 ERR("parse error %s:%i. Image min and max size are not in the right order ([%i, %i] < [%i, %i])",
1466 progname, file_in, line - 1, 1466 file_in, line - 1,
1467 entry->size.min.w, entry->size.min.h, 1467 entry->size.min.w, entry->size.min.h,
1468 entry->size.max.w, entry->size.max.h); 1468 entry->size.max.w, entry->size.max.h);
1469 exit(-1); 1469 exit(-1);
@@ -1601,23 +1601,23 @@ st_data_file(void)
1601 fd = open(filename, O_RDONLY | O_BINARY, S_IRUSR | S_IWUSR); 1601 fd = open(filename, O_RDONLY | O_BINARY, S_IRUSR | S_IWUSR);
1602 if (fd < 0) 1602 if (fd < 0)
1603 { 1603 {
1604 ERR("%s: Error. %s:%i when opening file \"%s\": \"%s\"", 1604 ERR("%s:%i when opening file \"%s\": \"%s\"",
1605 progname, file_in, line, filename, strerror(errno)); 1605 file_in, line, filename, strerror(errno));
1606 exit(-1); 1606 exit(-1);
1607 } 1607 }
1608 1608
1609 if (fstat(fd, &buf)) 1609 if (fstat(fd, &buf))
1610 { 1610 {
1611 ERR("%s: Error. %s:%i when stating file \"%s\": \"%s\"", 1611 ERR("%s:%i when stating file \"%s\": \"%s\"",
1612 progname, file_in, line, filename, strerror(errno)); 1612 file_in, line, filename, strerror(errno));
1613 exit(-1); 1613 exit(-1);
1614 } 1614 }
1615 1615
1616 data = mmap(NULL, buf.st_size, PROT_READ, MAP_SHARED, fd, 0); 1616 data = mmap(NULL, buf.st_size, PROT_READ, MAP_SHARED, fd, 0);
1617 if (data == MAP_FAILED) 1617 if (data == MAP_FAILED)
1618 { 1618 {
1619 ERR("%s: Error. %s:%i when mapping file \"%s\": \"%s\"", 1619 ERR("%s:%i when mapping file \"%s\": \"%s\"",
1620 progname, file_in, line, filename, strerror(errno)); 1620 file_in, line, filename, strerror(errno));
1621 exit(-1); 1621 exit(-1);
1622 } 1622 }
1623 1623
@@ -1625,8 +1625,7 @@ st_data_file(void)
1625 for (i = 0; i < buf.st_size; ++i, ++over) 1625 for (i = 0; i < buf.st_size; ++i, ++over)
1626 if (*over == '\0') 1626 if (*over == '\0')
1627 { 1627 {
1628 ERR("%s: Error. %s:%i file \"%s\" is a binary file.", 1628 ERR("%s:%i file \"%s\" is a binary file.", file_in, line, filename);
1629 progname, file_in, line, filename);
1630 exit(-1); 1629 exit(-1);
1631 } 1630 }
1632 1631
@@ -1710,8 +1709,8 @@ st_color_class_name(void)
1710 { 1709 {
1711 if ((cc != tcc) && (!strcmp(cc->name, tcc->name))) 1710 if ((cc != tcc) && (!strcmp(cc->name, tcc->name)))
1712 { 1711 {
1713 fprintf(stderr, "%s: Error. parse error %s:%i. There is already a color class named \"%s\"\n", 1712 ERR("parse error %s:%i. There is already a color class named \"%s\"",
1714 progname, file_in, line - 1, cc->name); 1713 file_in, line - 1, cc->name);
1715 exit(-1); 1714 exit(-1);
1716 } 1715 }
1717 } 1716 }
@@ -1841,8 +1840,8 @@ st_styles_style_name(void)
1841 { 1840 {
1842 if (stl->name && tstl->name && (stl != tstl) && (!strcmp(stl->name, tstl->name))) 1841 if (stl->name && tstl->name && (stl != tstl) && (!strcmp(stl->name, tstl->name)))
1843 { 1842 {
1844 ERR("%s: Error. parse error %s:%i. There is already a style named \"%s\"", 1843 ERR("parse error %s:%i. There is already a style named \"%s\"",
1845 progname, file_in, line - 1, stl->name); 1844 file_in, line - 1, stl->name);
1846 exit(-1); 1845 exit(-1);
1847 } 1846 }
1848 } 1847 }
@@ -1868,8 +1867,8 @@ st_styles_style_base(void)
1868 stl = eina_list_data_get(eina_list_last(edje_file->styles)); 1867 stl = eina_list_data_get(eina_list_last(edje_file->styles));
1869 if (stl->tags) 1868 if (stl->tags)
1870 { 1869 {
1871 ERR("%s: Error. parse error %s:%i. There is already a basic format for the style", 1870 ERR("parse error %s:%i. There is already a basic format for the style",
1872 progname, file_in, line - 1); 1871 file_in, line - 1);
1873 exit(-1); 1872 exit(-1);
1874 } 1873 }
1875 tag = mem_alloc(SZ(Edje_Style_Tag)); 1874 tag = mem_alloc(SZ(Edje_Style_Tag));
@@ -2014,7 +2013,7 @@ st_collections_group_sound_sample_name(void)
2014 2013
2015 if (!edje_file->sound_dir->samples) 2014 if (!edje_file->sound_dir->samples)
2016 { 2015 {
2017 ERR("%s: Error. No enough memory.", progname); 2016 ERR("No enough memory.");
2018 exit(-1); 2017 exit(-1);
2019 } 2018 }
2020 2019
@@ -2061,7 +2060,7 @@ st_collections_group_sound_sample_source(void)
2061 2060
2062 if (!edje_file->sound_dir->samples) 2061 if (!edje_file->sound_dir->samples)
2063 { 2062 {
2064 ERR("%s: Error. Invalid sound sample source definition.", progname); 2063 ERR("Invalid sound sample source definition.");
2065 exit(-1); 2064 exit(-1);
2066 } 2065 }
2067 2066
@@ -2071,7 +2070,7 @@ st_collections_group_sound_sample_source(void)
2071 2070
2072 if (!sample) 2071 if (!sample)
2073 { 2072 {
2074 ERR("%s: Error. Invalid sound sample source definition.", progname); 2073 ERR("Invalid sound sample source definition.");
2075 exit(-1); 2074 exit(-1);
2076 } 2075 }
2077 sample->snd_src = parse_str(0); 2076 sample->snd_src = parse_str(0);
@@ -2111,14 +2110,14 @@ st_collections_group_sound_tone(void)
2111 { 2110 {
2112 if (!strcmp(edje_file->sound_dir->tones[i].name, tmp)) 2111 if (!strcmp(edje_file->sound_dir->tones[i].name, tmp))
2113 { 2112 {
2114 ERR("%s: Error. Tone name: %s already exist.", progname, tmp); 2113 ERR("Tone name: %s already exist.", tmp);
2115 free((char *)tmp); 2114 free((char *)tmp);
2116 exit(-1); 2115 exit(-1);
2117 } 2116 }
2118 if (edje_file->sound_dir->tones[i].value == value) 2117 if (edje_file->sound_dir->tones[i].value == value)
2119 { 2118 {
2120 ERR("%s: Error. Tone name %s with same frequency %d exist.", 2119 ERR("Tone name %s with same frequency %d exist.",
2121 progname, edje_file->sound_dir->tones[i].name, value); 2120 edje_file->sound_dir->tones[i].name, value);
2122 exit(-1); 2121 exit(-1);
2123 } 2122 }
2124 } 2123 }
@@ -2130,7 +2129,7 @@ st_collections_group_sound_tone(void)
2130 2129
2131 if (!edje_file->sound_dir->tones) 2130 if (!edje_file->sound_dir->tones)
2132 { 2131 {
2133 ERR("%s: Error. No enough memory.", progname); 2132 ERR("No enough memory.");
2134 exit(-1); 2133 exit(-1);
2135 } 2134 }
2136 2135
@@ -2179,7 +2178,7 @@ ob_collections_group(void)
2179 2178
2180 if (current_de && !current_de->entry) 2179 if (current_de && !current_de->entry)
2181 { 2180 {
2182 ERR("%p: Error. A collection without a name was detected, that's not allowed.", progname); 2181 ERR("A collection without a name was detected, that's not allowed.");
2183 exit(-1); 2182 exit(-1);
2184 } 2183 }
2185 2184
@@ -2304,16 +2303,16 @@ st_collections_group_inherit(void)
2304 } 2303 }
2305 if (!pc2) 2304 if (!pc2)
2306 { 2305 {
2307 ERR("%s: Error. parse error %s:%i. There isn't a group with the name %s", 2306 ERR("parse error %s:%i. There isn't a group with the name %s",
2308 progname, file_in, line - 1, parent_name); 2307 file_in, line - 1, parent_name);
2309 exit(-1); 2308 exit(-1);
2310 } 2309 }
2311 if (pc2 == pc) 2310 if (pc2 == pc)
2312 { 2311 {
2313 ERR("%s: Error. parse error %s:%i. You are trying to inherit '%s' from itself. That's not possible." 2312 ERR("parse error %s:%i. You are trying to inherit '%s' from itself. That's not possible."
2314 "If there is another group of the same name, you want to inherit from that group and have the" 2313 "If there is another group of the same name, you want to inherit from that group and have the"
2315 "same name as that group, there is a trick ! Just put the inherit before the directive that set" 2314 "same name as that group, there is a trick ! Just put the inherit before the directive that set"
2316 "the name !", progname, file_in, line - 1, parent_name); 2315 "the name !", file_in, line - 1, parent_name);
2317 exit(-1); 2316 exit(-1);
2318 } 2317 }
2319 2318
@@ -2704,8 +2703,8 @@ ob_collections_group_script(void)
2704 cd->l2 = get_verbatim_line2(); 2703 cd->l2 = get_verbatim_line2();
2705 if (cd->shared) 2704 if (cd->shared)
2706 { 2705 {
2707 ERR("%s: Error. parse error %s:%i. There is already an existing script section for the group", 2706 ERR("parse error %s:%i. There is already an existing script section for the group",
2708 progname, file_in, line - 1); 2707 file_in, line - 1);
2709 exit(-1); 2708 exit(-1);
2710 } 2709 }
2711 cd->shared = s; 2710 cd->shared = s;
@@ -2735,8 +2734,8 @@ ob_collections_group_lua_script(void)
2735 cd->l2 = get_verbatim_line2(); 2734 cd->l2 = get_verbatim_line2();
2736 if (cd->shared) 2735 if (cd->shared)
2737 { 2736 {
2738 ERR("%s: Error. parse error %s:%i. There is already an existing script section for the group", 2737 ERR("parse error %s:%i. There is already an existing script section for the group",
2739 progname, file_in, line - 1); 2738 file_in, line - 1);
2740 exit(-1); 2739 exit(-1);
2741 } 2740 }
2742 cd->shared = s; 2741 cd->shared = s;
@@ -2845,7 +2844,7 @@ st_collections_group_limits_vertical(void)
2845 pc->limits.vertical = realloc(pc->limits.vertical, pc->limits.vertical_count * sizeof (Edje_Limit *)); 2844 pc->limits.vertical = realloc(pc->limits.vertical, pc->limits.vertical_count * sizeof (Edje_Limit *));
2846 if (!pc->limits.vertical || !el) 2845 if (!pc->limits.vertical || !el)
2847 { 2846 {
2848 ERR("%s: Error. Not enough memory.", progname); 2847 ERR("Not enough memory.");
2849 exit(-1); 2848 exit(-1);
2850 } 2849 }
2851 2850
@@ -2883,7 +2882,7 @@ st_collections_group_limits_horizontal(void)
2883 pc->limits.horizontal = realloc(pc->limits.horizontal, pc->limits.horizontal_count * sizeof (Edje_Limit *)); 2882 pc->limits.horizontal = realloc(pc->limits.horizontal, pc->limits.horizontal_count * sizeof (Edje_Limit *));
2884 if (!pc->limits.horizontal || !el) 2883 if (!pc->limits.horizontal || !el)
2885 { 2884 {
2886 ERR("%s: Error. Not enough memory.", progname); 2885 ERR("Not enough memory.");
2887 exit(-1); 2886 exit(-1);
2888 } 2887 }
2889 2888
@@ -2977,7 +2976,7 @@ ob_collections_group_parts_part(void)
2977 pc->parts = realloc(pc->parts, pc->parts_count * sizeof (Edje_Part *)); 2976 pc->parts = realloc(pc->parts, pc->parts_count * sizeof (Edje_Part *));
2978 if (!pc->parts) 2977 if (!pc->parts)
2979 { 2978 {
2980 ERR("%s: Error. Not enough memory.", progname); 2979 ERR("Not enough memory.");
2981 exit(-1); 2980 exit(-1);
2982 } 2981 }
2983 current_part = pc->parts[pc->parts_count - 1] = ep; 2982 current_part = pc->parts[pc->parts_count - 1] = ep;
@@ -3044,8 +3043,8 @@ st_collections_group_parts_part_name(void)
3044 epp = (Edje_Part_Parser *)pc->parts[i]; 3043 epp = (Edje_Part_Parser *)pc->parts[i];
3045 if (!epp->can_override) 3044 if (!epp->can_override)
3046 { 3045 {
3047 ERR("%s: Error. parse error %s:%i. There is already a part of the name %s", 3046 ERR("parse error %s:%i. There is already a part of the name %s",
3048 progname, file_in, line - 1, ep->name); 3047 file_in, line - 1, ep->name);
3049 exit(-1); 3048 exit(-1);
3050 } 3049 }
3051 else 3050 else
@@ -3866,9 +3865,8 @@ static void ob_collections_group_parts_part_box_items_item(void)
3866 3865
3867 if ((ep->type != EDJE_PART_TYPE_BOX) && (ep->type != EDJE_PART_TYPE_TABLE)) 3866 if ((ep->type != EDJE_PART_TYPE_BOX) && (ep->type != EDJE_PART_TYPE_TABLE))
3868 { 3867 {
3869 ERR("%s: Error. parse error %s:%i. " 3868 ERR("parse error %s:%i. box attributes in non-BOX or TABLE part.",
3870 "box attributes in non-BOX or TABLE part.", 3869 file_in, line - 1);
3871 progname, file_in, line - 1);
3872 exit(-1); 3870 exit(-1);
3873 } 3871 }
3874 3872
@@ -3876,7 +3874,7 @@ static void ob_collections_group_parts_part_box_items_item(void)
3876 ep->items = realloc(ep->items, sizeof (Edje_Pack_Element*) * ep->items_count); 3874 ep->items = realloc(ep->items, sizeof (Edje_Pack_Element*) * ep->items_count);
3877 if (!ep->items) 3875 if (!ep->items)
3878 { 3876 {
3879 ERR("%s: Error. Not enough memory.", progname); 3877 ERR("Not enough memory.");
3880 exit(-1); 3878 exit(-1);
3881 } 3879 }
3882 3880
@@ -3931,9 +3929,8 @@ static void st_collections_group_parts_part_box_items_item_type(void)
3931 s = parse_str(0); 3929 s = parse_str(0);
3932 if (strcmp(s, "GROUP")) 3930 if (strcmp(s, "GROUP"))
3933 { 3931 {
3934 ERR("%s: Error. parse error %s:%i. " 3932 ERR("parse error %s:%i. token %s not one of: GROUP.",
3935 "token %s not one of: GROUP.", 3933 file_in, line - 1, s);
3936 progname, file_in, line - 1, s);
3937 exit(-1); 3934 exit(-1);
3938 } 3935 }
3939 /* FIXME: handle the enum, once everything else is supported */ 3936 /* 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)
3974 pitem = (Edje_Pack_Element_Parser *)ep->items[i]; 3971 pitem = (Edje_Pack_Element_Parser *)ep->items[i];
3975 if (!pitem->can_override) 3972 if (!pitem->can_override)
3976 { 3973 {
3977 ERR("%s: Error. parse error %s:%i. There is already a item of the name %s", 3974 ERR("parse error %s:%i. There is already a item of the name %s",
3978 progname, file_in, line - 1, item->name); 3975 file_in, line - 1, item->name);
3979 exit(-1); 3976 exit(-1);
3980 } 3977 }
3981 else 3978 else
@@ -4193,9 +4190,8 @@ static void st_collections_group_parts_part_table_items_item_position(void)
4193 4190
4194 if (current_part->type != EDJE_PART_TYPE_TABLE) 4191 if (current_part->type != EDJE_PART_TYPE_TABLE)
4195 { 4192 {
4196 ERR("%s: Error. parse error %s:%i. " 4193 ERR("parse error %s:%i. table attributes in non-TABLE part.",
4197 "table attributes in non-TABLE part.", 4194 file_in, line - 1);
4198 progname, file_in, line - 1);
4199 exit(-1); 4195 exit(-1);
4200 } 4196 }
4201 4197
@@ -4220,9 +4216,8 @@ static void st_collections_group_parts_part_table_items_item_span(void)
4220 4216
4221 if (current_part->type != EDJE_PART_TYPE_TABLE) 4217 if (current_part->type != EDJE_PART_TYPE_TABLE)
4222 { 4218 {
4223 ERR("%s: Error. parse error %s:%i. " 4219 ERR("parse error %s:%i. table attributes in non-TABLE part.",
4224 "table attributes in non-TABLE part.", 4220 file_in, line - 1);
4225 progname, file_in, line - 1);
4226 exit(-1); 4221 exit(-1);
4227 } 4222 }
4228 4223
@@ -4367,9 +4362,8 @@ st_collections_group_parts_part_description_inherit(void)
4367 4362
4368 if (!ed->state.name) 4363 if (!ed->state.name)
4369 { 4364 {
4370 ERR("%s: Error. parse error %s:%i. " 4365 ERR("parse error %s:%i. inherit may only be used after state",
4371 "inherit may only be used after state", 4366 file_in, line - 1);
4372 progname, file_in, line - 1);
4373 exit(-1); 4367 exit(-1);
4374 } 4368 }
4375 4369
@@ -4381,9 +4375,9 @@ st_collections_group_parts_part_description_inherit(void)
4381 /* inherit may not be used in the default description */ 4375 /* inherit may not be used in the default description */
4382 if (!ep->other.desc_count) 4376 if (!ep->other.desc_count)
4383 { 4377 {
4384 ERR("%s: Error. parse error %s:%i. " 4378 ERR("parse error %s:%i. "
4385 "inherit may not be used in the default description", 4379 "inherit may not be used in the default description",
4386 progname, file_in, line - 1); 4380 file_in, line - 1);
4387 exit(-1); 4381 exit(-1);
4388 } 4382 }
4389 4383
@@ -4429,9 +4423,9 @@ st_collections_group_parts_part_description_inherit(void)
4429 4423
4430 if (!parent) 4424 if (!parent)
4431 { 4425 {
4432 ERR("%s: Error. parse error %s:%i. " 4426 ERR("parse error %s:%i. "
4433 "cannot find referenced part state %s %lf", 4427 "cannot find referenced part %s state %s %lf",
4434 ep->name, file_in, line - 1, parent_name, parent_val); 4428 file_in, line - 1, ep->name, parent_name, parent_val);
4435 exit(-1); 4429 exit(-1);
4436 } 4430 }
4437 4431
@@ -4590,9 +4584,8 @@ st_collections_group_parts_part_description_source(void)
4590 4584
4591 if (current_part->type != EDJE_PART_TYPE_PROXY) 4585 if (current_part->type != EDJE_PART_TYPE_PROXY)
4592 { 4586 {
4593 ERR("%s: Error. parse error %s:%i. " 4587 ERR("parse error %s:%i. source attributes in non-PROXY part.",
4594 "source attributes in non-PROXY part.", 4588 file_in, line - 1);
4595 progname, file_in, line - 1);
4596 exit(-1); 4589 exit(-1);
4597 } 4590 }
4598 4591
@@ -4635,9 +4628,8 @@ st_collections_group_parts_part_description_state(void)
4635 s = parse_str(0); 4628 s = parse_str(0);
4636 if (!strcmp (s, "custom")) 4629 if (!strcmp (s, "custom"))
4637 { 4630 {
4638 ERR("%s: Error. parse error %s:%i. " 4631 ERR("parse error %s:%i. invalid state name: '%s'.",
4639 "invalid state name: '%s'.", 4632 file_in, line - 1, s);
4640 progname, file_in, line - 1, s);
4641 exit(-1); 4633 exit(-1);
4642 } 4634 }
4643 4635
@@ -4701,9 +4693,8 @@ st_collections_group_parts_part_description_visible(void)
4701 4693
4702 if (current_part->type == EDJE_PART_TYPE_SPACER) 4694 if (current_part->type == EDJE_PART_TYPE_SPACER)
4703 { 4695 {
4704 ERR("%s: Error. parse error %s:%i. " 4696 ERR("parse error %s:%i. SPACER part can't have a visibility defined",
4705 "SPACER part can't have a visibility defined", 4697 file_in, line - 1);
4706 progname, file_in, line - 1);
4707 exit(-1); 4698 exit(-1);
4708 } 4699 }
4709 4700
@@ -4820,9 +4811,9 @@ st_collections_group_parts_part_description_min(void)
4820 if ((current_part->type != EDJE_PART_TYPE_IMAGE && current_part->type != EDJE_PART_TYPE_GROUP) || 4811 if ((current_part->type != EDJE_PART_TYPE_IMAGE && current_part->type != EDJE_PART_TYPE_GROUP) ||
4821 !tmp || strcmp(tmp, "SOURCE") != 0) 4812 !tmp || strcmp(tmp, "SOURCE") != 0)
4822 { 4813 {
4823 ERR("%s: Error. parse error %s:%i. " 4814 ERR("parse error %s:%i. "
4824 "Only IMAGE and GROUP part can have a min: SOURCE; defined", 4815 "Only IMAGE and GROUP part can have a min: SOURCE; defined",
4825 progname, file_in, line - 1); 4816 file_in, line - 1);
4826 exit(-1); 4817 exit(-1);
4827 } 4818 }
4828 4819
@@ -4880,9 +4871,9 @@ st_collections_group_parts_part_description_max(void)
4880 if (current_part->type != EDJE_PART_TYPE_IMAGE || 4871 if (current_part->type != EDJE_PART_TYPE_IMAGE ||
4881 !tmp || strcmp(tmp, "SOURCE") != 0) 4872 !tmp || strcmp(tmp, "SOURCE") != 0)
4882 { 4873 {
4883 ERR("%s: Error. parse error %s:%i. " 4874 ERR("parse error %s:%i. "
4884 "Only IMAGE part can have a max: SOURCE; defined", 4875 "Only IMAGE part can have a max: SOURCE; defined",
4885 progname, file_in, line - 1); 4876 file_in, line - 1);
4886 exit(-1); 4877 exit(-1);
4887 } 4878 }
4888 4879
@@ -4978,9 +4969,8 @@ st_collections_group_parts_part_description_color_class(void)
4978 4969
4979 if (current_part->type == EDJE_PART_TYPE_SPACER) 4970 if (current_part->type == EDJE_PART_TYPE_SPACER)
4980 { 4971 {
4981 ERR("%s: Error. parse error %s:%i. " 4972 ERR("parse error %s:%i. SPACER part can't have a color defined",
4982 "SPACER part can't have a color defined", 4973 file_in, line - 1);
4983 progname, file_in, line - 1);
4984 exit(-1); 4974 exit(-1);
4985 } 4975 }
4986 4976
@@ -5004,9 +4994,8 @@ st_collections_group_parts_part_description_color(void)
5004 4994
5005 if (current_part->type == EDJE_PART_TYPE_SPACER) 4995 if (current_part->type == EDJE_PART_TYPE_SPACER)
5006 { 4996 {
5007 ERR("%s: Error. parse error %s:%i. " 4997 ERR("parse error %s:%i. SPACER part can't have a color defined",
5008 "SPACER part can't have a color defined", 4998 file_in, line - 1);
5009 progname, file_in, line - 1);
5010 exit(-1); 4999 exit(-1);
5011 } 5000 }
5012 5001
@@ -5033,9 +5022,8 @@ st_collections_group_parts_part_description_color2(void)
5033 5022
5034 if (current_part->type == EDJE_PART_TYPE_SPACER) 5023 if (current_part->type == EDJE_PART_TYPE_SPACER)
5035 { 5024 {
5036 ERR("%s: Error. parse error %s:%i. " 5025 ERR("parse error %s:%i. SPACER part can't have a color defined",
5037 "SPACER part can't have a color defined", 5026 file_in, line - 1);
5038 progname, file_in, line - 1);
5039 exit(-1); 5027 exit(-1);
5040 } 5028 }
5041 5029
@@ -5068,7 +5056,8 @@ st_collections_group_parts_part_description_color3(void)
5068 if (current_part->type != EDJE_PART_TYPE_TEXT 5056 if (current_part->type != EDJE_PART_TYPE_TEXT
5069 && current_part->type != EDJE_PART_TYPE_TEXTBLOCK) 5057 && current_part->type != EDJE_PART_TYPE_TEXTBLOCK)
5070 { 5058 {
5071 ERR("%s: Error. Setting color3 in part %s from %s not of type TEXT or TEXTBLOCK.", progname, current_part->name, pc->part); 5059 ERR("Setting color3 in part %s from %s not of type TEXT or TEXTBLOCK.",
5060 current_part->name, pc->part);
5072 exit(-1); 5061 exit(-1);
5073 } 5062 }
5074 5063
@@ -5349,9 +5338,9 @@ st_collections_group_parts_part_description_image_normal(void)
5349 5338
5350 if (current_part->type != EDJE_PART_TYPE_IMAGE) 5339 if (current_part->type != EDJE_PART_TYPE_IMAGE)
5351 { 5340 {
5352 ERR("%s: Error. parse error %s:%i. " 5341 ERR("parse error %s:%i. "
5353 "image attributes in non-IMAGE part.", 5342 "image attributes in non-IMAGE part.",
5354 progname, file_in, line - 1); 5343 file_in, line - 1);
5355 exit(-1); 5344 exit(-1);
5356 } 5345 }
5357 5346
@@ -5389,9 +5378,8 @@ st_collections_group_parts_part_description_image_tween(void)
5389 5378
5390 if (current_part->type != EDJE_PART_TYPE_IMAGE) 5379 if (current_part->type != EDJE_PART_TYPE_IMAGE)
5391 { 5380 {
5392 ERR("%s: Error. parse error %s:%i. " 5381 ERR("parse error %s:%i. image attributes in non-IMAGE part.",
5393 "image attributes in non-IMAGE part.", 5382 file_in, line - 1);
5394 progname, file_in, line - 1);
5395 exit(-1); 5383 exit(-1);
5396 } 5384 }
5397 5385
@@ -5434,9 +5422,8 @@ st_collections_group_parts_part_description_image_border(void)
5434 5422
5435 if (current_part->type != EDJE_PART_TYPE_IMAGE) 5423 if (current_part->type != EDJE_PART_TYPE_IMAGE)
5436 { 5424 {
5437 ERR("%s: Error. parse error %s:%i. " 5425 ERR("parse error %s:%i. image attributes in non-IMAGE part.",
5438 "image attributes in non-IMAGE part.", 5426 file_in, line - 1);
5439 progname, file_in, line - 1);
5440 exit(-1); 5427 exit(-1);
5441 } 5428 }
5442 5429
@@ -5469,9 +5456,8 @@ st_collections_group_parts_part_description_image_middle(void)
5469 5456
5470 if (current_part->type != EDJE_PART_TYPE_IMAGE) 5457 if (current_part->type != EDJE_PART_TYPE_IMAGE)
5471 { 5458 {
5472 ERR("%s: Error. parse error %s:%i. " 5459 ERR("parse error %s:%i. image attributes in non-IMAGE part.",
5473 "image attributes in non-IMAGE part.", 5460 file_in, line - 1);
5474 progname, file_in, line - 1);
5475 exit(-1); 5461 exit(-1);
5476 } 5462 }
5477 5463
@@ -5512,9 +5498,8 @@ st_collections_group_parts_part_description_image_border_scale_by(void)
5512 5498
5513 if (current_part->type != EDJE_PART_TYPE_IMAGE) 5499 if (current_part->type != EDJE_PART_TYPE_IMAGE)
5514 { 5500 {
5515 ERR("%s: Error. parse error %s:%i. " 5501 ERR("parse error %s:%i. image attributes in non-IMAGE part.",
5516 "image attributes in non-IMAGE part.", 5502 file_in, line - 1);
5517 progname, file_in, line - 1);
5518 exit(-1); 5503 exit(-1);
5519 } 5504 }
5520 5505
@@ -5543,9 +5528,8 @@ st_collections_group_parts_part_description_image_border_scale(void)
5543 5528
5544 if (current_part->type != EDJE_PART_TYPE_IMAGE) 5529 if (current_part->type != EDJE_PART_TYPE_IMAGE)
5545 { 5530 {
5546 ERR("%s: Error. parse error %s:%i. " 5531 ERR("parse error %s:%i. image attributes in non-IMAGE part.",
5547 "image attributes in non-IMAGE part.", 5532 file_in, line - 1);
5548 progname, file_in, line - 1);
5549 exit(-1); 5533 exit(-1);
5550 } 5534 }
5551 5535
@@ -5577,9 +5561,8 @@ st_collections_group_parts_part_description_image_scale_hint(void)
5577 5561
5578 if (current_part->type != EDJE_PART_TYPE_IMAGE) 5562 if (current_part->type != EDJE_PART_TYPE_IMAGE)
5579 { 5563 {
5580 ERR("%s: Error. parse error %s:%i. " 5564 ERR("parse error %s:%i. image attributes in non-IMAGE part.",
5581 "image attributes in non-IMAGE part.", 5565 file_in, line - 1);
5582 progname, file_in, line - 1);
5583 exit(-1); 5566 exit(-1);
5584 } 5567 }
5585 5568
@@ -5659,9 +5642,9 @@ st_collections_group_parts_part_description_fill_smooth(void)
5659 } 5642 }
5660 default: 5643 default:
5661 { 5644 {
5662 ERR("%s: Error. parse error %s:%i. " 5645 ERR("parse error %s:%i. "
5663 "image and proxy attributes in non-IMAGE, non-PROXY `%s` part (%i).", 5646 "image and proxy attributes in non-IMAGE, non-PROXY `%s` part (%i).",
5664 progname, file_in, line - 1, current_part->name, current_part->type); 5647 file_in, line - 1, current_part->name, current_part->type);
5665 exit(-1); 5648 exit(-1);
5666 } 5649 }
5667 } 5650 }
@@ -5693,9 +5676,8 @@ st_collections_group_parts_part_description_fill_spread(void)
5693 5676
5694 /* XXX this will need to include IMAGES when spread support is added to evas images */ 5677 /* XXX this will need to include IMAGES when spread support is added to evas images */
5695 { 5678 {
5696 ERR("%s: Error. parse error %s:%i. " 5679 ERR("parse error %s:%i. fill.spread not supported yet.",
5697 "fill.spread not supported yet.", 5680 file_in, line - 1);
5698 progname, file_in, line - 1);
5699 exit(-1); 5681 exit(-1);
5700 } 5682 }
5701 5683
@@ -5706,9 +5688,8 @@ st_collections_group_parts_part_description_fill_spread(void)
5706 5688
5707 if (ep->type != EDJE_PART_TYPE_IMAGE) 5689 if (ep->type != EDJE_PART_TYPE_IMAGE)
5708 { 5690 {
5709 ERR("%s: Error. parse error %s:%i. " 5691 ERR("parse error %s:%i. image attributes in non-IMAGE part.",
5710 "image attributes in non-IMAGE part.", 5692 file_in, line - 1);
5711 progname, file_in, line - 1);
5712 exit(-1); 5693 exit(-1);
5713 } 5694 }
5714 5695
@@ -5759,9 +5740,9 @@ st_collections_group_parts_part_description_fill_type(void)
5759 } 5740 }
5760 default: 5741 default:
5761 { 5742 {
5762 ERR("%s: Error. parse error %s:%i. " 5743 ERR("parse error %s:%i. "
5763 "image and proxy attributes in non-IMAGE, non-PROXY part.", 5744 "image and proxy attributes in non-IMAGE, non-PROXY part.",
5764 progname, file_in, line - 1); 5745 file_in, line - 1);
5765 exit(-1); 5746 exit(-1);
5766 } 5747 }
5767 } 5748 }
@@ -5832,9 +5813,9 @@ st_collections_group_parts_part_description_fill_origin_relative(void)
5832 } 5813 }
5833 default: 5814 default:
5834 { 5815 {
5835 ERR("%s: Error. parse error %s:%i. " 5816 ERR("parse error %s:%i. "
5836 "image and proxy attributes in non-IMAGE, non-PROXY part.", 5817 "image and proxy attributes in non-IMAGE, non-PROXY part.",
5837 progname, file_in, line - 1); 5818 file_in, line - 1);
5838 exit(-1); 5819 exit(-1);
5839 } 5820 }
5840 } 5821 }
@@ -5882,9 +5863,9 @@ st_collections_group_parts_part_description_fill_origin_offset(void)
5882 } 5863 }
5883 default: 5864 default:
5884 { 5865 {
5885 ERR("%s: Error. parse error %s:%i. " 5866 ERR("parse error %s:%i. "
5886 "image and proxy attributes in non-IMAGE, non-PROXY part.", 5867 "image and proxy attributes in non-IMAGE, non-PROXY part.",
5887 progname, file_in, line - 1); 5868 file_in, line - 1);
5888 exit(-1); 5869 exit(-1);
5889 } 5870 }
5890 } 5871 }
@@ -5955,9 +5936,9 @@ st_collections_group_parts_part_description_fill_size_relative(void)
5955 } 5936 }
5956 default: 5937 default:
5957 { 5938 {
5958 ERR("%s: Error. parse error %s:%i. " 5939 ERR("parse error %s:%i. "
5959 "image and proxy attributes in non-IMAGE, non-PROXY part.", 5940 "image and proxy attributes in non-IMAGE, non-PROXY part.",
5960 progname, file_in, line - 1); 5941 file_in, line - 1);
5961 exit(-1); 5942 exit(-1);
5962 } 5943 }
5963 } 5944 }
@@ -6005,9 +5986,9 @@ st_collections_group_parts_part_description_fill_size_offset(void)
6005 } 5986 }
6006 default: 5987 default:
6007 { 5988 {
6008 ERR("%s: Error. parse error %s:%i. " 5989 ERR("parse error %s:%i. "
6009 "image and proxy attributes in non-IMAGE, non-PROXY part.", 5990 "image and proxy attributes in non-IMAGE, non-PROXY part.",
6010 progname, file_in, line - 1); 5991 file_in, line - 1);
6011 exit(-1); 5992 exit(-1);
6012 } 5993 }
6013 } 5994 }
@@ -6069,9 +6050,8 @@ st_collections_group_parts_part_description_text_text(void)
6069 if ((current_part->type != EDJE_PART_TYPE_TEXT) && 6050 if ((current_part->type != EDJE_PART_TYPE_TEXT) &&
6070 (current_part->type != EDJE_PART_TYPE_TEXTBLOCK)) 6051 (current_part->type != EDJE_PART_TYPE_TEXTBLOCK))
6071 { 6052 {
6072 ERR("%s: Error. parse error %s:%i. " 6053 ERR("parse error %s:%i. text attributes in non-TEXT part.",
6073 "text attributes in non-TEXT part.", 6054 file_in, line - 1);
6074 progname, file_in, line - 1);
6075 exit(-1); 6055 exit(-1);
6076 } 6056 }
6077 6057
@@ -6116,9 +6096,8 @@ st_collections_group_parts_part_description_text_text_class(void)
6116 if ((current_part->type != EDJE_PART_TYPE_TEXT) && 6096 if ((current_part->type != EDJE_PART_TYPE_TEXT) &&
6117 (current_part->type != EDJE_PART_TYPE_TEXTBLOCK)) 6097 (current_part->type != EDJE_PART_TYPE_TEXTBLOCK))
6118 { 6098 {
6119 ERR("%s: Error. parse error %s:%i. " 6099 ERR("parse error %s:%i. text attributes in non-TEXT part.",
6120 "text attributes in non-TEXT part.", 6100 file_in, line - 1);
6121 progname, file_in, line - 1);
6122 exit(-1); 6101 exit(-1);
6123 } 6102 }
6124 6103
@@ -6149,9 +6128,8 @@ st_collections_group_parts_part_description_text_font(void)
6149 if ((current_part->type != EDJE_PART_TYPE_TEXT) && 6128 if ((current_part->type != EDJE_PART_TYPE_TEXT) &&
6150 (current_part->type != EDJE_PART_TYPE_TEXTBLOCK)) 6129 (current_part->type != EDJE_PART_TYPE_TEXTBLOCK))
6151 { 6130 {
6152 ERR("%s: Error. parse error %s:%i. " 6131 ERR("parse error %s:%i. text attributes in non-TEXT part.",
6153 "text attributes in non-TEXT part.", 6132 file_in, line - 1);
6154 progname, file_in, line - 1);
6155 exit(-1); 6133 exit(-1);
6156 } 6134 }
6157 6135
@@ -6182,9 +6160,8 @@ st_collections_group_parts_part_description_text_style(void)
6182 if ((current_part->type != EDJE_PART_TYPE_TEXT) && 6160 if ((current_part->type != EDJE_PART_TYPE_TEXT) &&
6183 (current_part->type != EDJE_PART_TYPE_TEXTBLOCK)) 6161 (current_part->type != EDJE_PART_TYPE_TEXTBLOCK))
6184 { 6162 {
6185 ERR("%s: Error. parse error %s:%i. " 6163 ERR("parse error %s:%i. text attributes in non-TEXT part.",
6186 "text attributes in non-TEXT part.", 6164 file_in, line - 1);
6187 progname, file_in, line - 1);
6188 exit(-1); 6165 exit(-1);
6189 } 6166 }
6190 6167
@@ -6216,9 +6193,8 @@ st_collections_group_parts_part_description_text_repch(void)
6216 if ((current_part->type != EDJE_PART_TYPE_TEXT) && 6193 if ((current_part->type != EDJE_PART_TYPE_TEXT) &&
6217 (current_part->type != EDJE_PART_TYPE_TEXTBLOCK)) 6194 (current_part->type != EDJE_PART_TYPE_TEXTBLOCK))
6218 { 6195 {
6219 ERR("%s: Error. parse error %s:%i. " 6196 ERR("parse error %s:%i. text attributes in non-TEXT part.",
6220 "text attributes in non-TEXT part.", 6197 file_in, line - 1);
6221 progname, file_in, line - 1);
6222 exit(-1); 6198 exit(-1);
6223 } 6199 }
6224 6200
@@ -6249,9 +6225,8 @@ st_collections_group_parts_part_description_text_size(void)
6249 if ((current_part->type != EDJE_PART_TYPE_TEXT) && 6225 if ((current_part->type != EDJE_PART_TYPE_TEXT) &&
6250 (current_part->type != EDJE_PART_TYPE_TEXTBLOCK)) 6226 (current_part->type != EDJE_PART_TYPE_TEXTBLOCK))
6251 { 6227 {
6252 ERR("%s: Error. parse error %s:%i. " 6228 ERR("parse error %s:%i. text attributes in non-TEXT part.",
6253 "text attributes in non-TEXT part.", 6229 file_in, line - 1);
6254 progname, file_in, line - 1);
6255 exit(-1); 6230 exit(-1);
6256 } 6231 }
6257 6232
@@ -6283,9 +6258,8 @@ st_collections_group_parts_part_description_text_size_range(void)
6283 if ((current_part->type != EDJE_PART_TYPE_TEXT) && 6258 if ((current_part->type != EDJE_PART_TYPE_TEXT) &&
6284 (current_part->type != EDJE_PART_TYPE_TEXTBLOCK)) 6259 (current_part->type != EDJE_PART_TYPE_TEXTBLOCK))
6285 { 6260 {
6286 ERR("%s: Error. parse error %s:%i. " 6261 ERR("parse error %s:%i. text attributes in non-TEXT part.",
6287 "text attributes in non-TEXT part.", 6262 file_in, line - 1);
6288 progname, file_in, line - 1);
6289 exit(-1); 6263 exit(-1);
6290 } 6264 }
6291 6265
@@ -6295,9 +6269,8 @@ st_collections_group_parts_part_description_text_size_range(void)
6295 ed->text.size_range_max = parse_int_range(1, 0, 255); 6269 ed->text.size_range_max = parse_int_range(1, 0, 255);
6296 if (ed->text.size_range_min > ed->text.size_range_max) 6270 if (ed->text.size_range_min > ed->text.size_range_max)
6297 { 6271 {
6298 ERR("%s: Error. parse error %s:%i. " 6272 ERR("parse error %s:%i. min size is bigger than max size.",
6299 "min size is bigger than max size.", 6273 file_in, line - 1);
6300 progname, file_in, line - 1);
6301 exit(-1); 6274 exit(-1);
6302 } 6275 }
6303} 6276}
@@ -6324,9 +6297,8 @@ st_collections_group_parts_part_description_text_fit(void)
6324 if ((current_part->type != EDJE_PART_TYPE_TEXT) && 6297 if ((current_part->type != EDJE_PART_TYPE_TEXT) &&
6325 (current_part->type != EDJE_PART_TYPE_TEXTBLOCK)) 6298 (current_part->type != EDJE_PART_TYPE_TEXTBLOCK))
6326 { 6299 {
6327 ERR("%s: Error. parse error %s:%i. " 6300 ERR("parse error %s:%i. text attributes in non-TEXT part.",
6328 "text attributes in non-TEXT part.", 6301 file_in, line - 1);
6329 progname, file_in, line - 1);
6330 exit(-1); 6302 exit(-1);
6331 } 6303 }
6332 6304
@@ -6359,9 +6331,8 @@ st_collections_group_parts_part_description_text_min(void)
6359 if ((current_part->type != EDJE_PART_TYPE_TEXT) && 6331 if ((current_part->type != EDJE_PART_TYPE_TEXT) &&
6360 (current_part->type != EDJE_PART_TYPE_TEXTBLOCK)) 6332 (current_part->type != EDJE_PART_TYPE_TEXTBLOCK))
6361 { 6333 {
6362 ERR("%s: Error. parse error %s:%i. " 6334 ERR("parse error %s:%i. text attributes in non-TEXT part.",
6363 "text attributes in non-TEXT part.", 6335 file_in, line - 1);
6364 progname, file_in, line - 1);
6365 exit(-1); 6336 exit(-1);
6366 } 6337 }
6367 6338
@@ -6394,9 +6365,8 @@ st_collections_group_parts_part_description_text_max(void)
6394 if ((current_part->type != EDJE_PART_TYPE_TEXT) && 6365 if ((current_part->type != EDJE_PART_TYPE_TEXT) &&
6395 (current_part->type != EDJE_PART_TYPE_TEXTBLOCK)) 6366 (current_part->type != EDJE_PART_TYPE_TEXTBLOCK))
6396 { 6367 {
6397 ERR("%s: Error. parse error %s:%i. " 6368 ERR("parse error %s:%i. text attributes in non-TEXT part.",
6398 "text attributes in non-TEXT part.", 6369 file_in, line - 1);
6399 progname, file_in, line - 1);
6400 exit(-1); 6370 exit(-1);
6401 } 6371 }
6402 6372
@@ -6428,9 +6398,8 @@ st_collections_group_parts_part_description_text_align(void)
6428 if ((current_part->type != EDJE_PART_TYPE_TEXT) && 6398 if ((current_part->type != EDJE_PART_TYPE_TEXT) &&
6429 (current_part->type != EDJE_PART_TYPE_TEXTBLOCK)) 6399 (current_part->type != EDJE_PART_TYPE_TEXTBLOCK))
6430 { 6400 {
6431 ERR("%s: Error. parse error %s:%i. " 6401 ERR("parse error %s:%i. text attributes in non-TEXT part.",
6432 "text attributes in non-TEXT part.", 6402 file_in, line - 1);
6433 progname, file_in, line - 1);
6434 exit(-1); 6403 exit(-1);
6435 } 6404 }
6436 6405
@@ -6465,9 +6434,8 @@ st_collections_group_parts_part_description_text_source(void)
6465 if ((current_part->type != EDJE_PART_TYPE_TEXT) && 6434 if ((current_part->type != EDJE_PART_TYPE_TEXT) &&
6466 (current_part->type != EDJE_PART_TYPE_TEXTBLOCK)) 6435 (current_part->type != EDJE_PART_TYPE_TEXTBLOCK))
6467 { 6436 {
6468 ERR("%s: Error. parse error %s:%i. " 6437 ERR("parse error %s:%i. text attributes in non-TEXT part.",
6469 "text attributes in non-TEXT part.", 6438 file_in, line - 1);
6470 progname, file_in, line - 1);
6471 exit(-1); 6439 exit(-1);
6472 } 6440 }
6473 6441
@@ -6507,9 +6475,8 @@ st_collections_group_parts_part_description_text_text_source(void)
6507 if ((current_part->type != EDJE_PART_TYPE_TEXT) && 6475 if ((current_part->type != EDJE_PART_TYPE_TEXT) &&
6508 (current_part->type != EDJE_PART_TYPE_TEXTBLOCK)) 6476 (current_part->type != EDJE_PART_TYPE_TEXTBLOCK))
6509 { 6477 {
6510 ERR("%s: Error. parse error %s:%i. " 6478 ERR("parse error %s:%i. text attributes in non-TEXT part.",
6511 "text attributes in non-TEXT part.", 6479 file_in, line - 1);
6512 progname, file_in, line - 1);
6513 exit(-1); 6480 exit(-1);
6514 } 6481 }
6515 6482
@@ -6547,9 +6514,8 @@ st_collections_group_parts_part_description_text_elipsis(void)
6547 if ((current_part->type != EDJE_PART_TYPE_TEXT) && 6514 if ((current_part->type != EDJE_PART_TYPE_TEXT) &&
6548 (current_part->type != EDJE_PART_TYPE_TEXTBLOCK)) 6515 (current_part->type != EDJE_PART_TYPE_TEXTBLOCK))
6549 { 6516 {
6550 ERR("%s: Error. parse error %s:%i. " 6517 ERR("parse error %s:%i. text attributes in non-TEXT part.",
6551 "text attributes in non-TEXT part.", 6518 file_in, line - 1);
6552 progname, file_in, line - 1);
6553 exit(-1); 6519 exit(-1);
6554 } 6520 }
6555 6521
@@ -6643,9 +6609,8 @@ static void st_collections_group_parts_part_description_box_layout(void)
6643 6609
6644 if (current_part->type != EDJE_PART_TYPE_BOX) 6610 if (current_part->type != EDJE_PART_TYPE_BOX)
6645 { 6611 {
6646 ERR("%s: Error. parse error %s:%i. " 6612 ERR("parse error %s:%i. box attributes in non-BOX part.",
6647 "box attributes in non-BOX part.", 6613 file_in, line - 1);
6648 progname, file_in, line - 1);
6649 exit(-1); 6614 exit(-1);
6650 } 6615 }
6651 6616
@@ -6664,9 +6629,8 @@ static void st_collections_group_parts_part_description_box_align(void)
6664 6629
6665 if (current_part->type != EDJE_PART_TYPE_BOX) 6630 if (current_part->type != EDJE_PART_TYPE_BOX)
6666 { 6631 {
6667 ERR("%s: Error. parse error %s:%i. " 6632 ERR("parse error %s:%i. box attributes in non-BOX part.",
6668 "box attributes in non-BOX part.", 6633 file_in, line - 1);
6669 progname, file_in, line - 1);
6670 exit(-1); 6634 exit(-1);
6671 } 6635 }
6672 6636
@@ -6684,9 +6648,8 @@ static void st_collections_group_parts_part_description_box_padding(void)
6684 6648
6685 if (current_part->type != EDJE_PART_TYPE_BOX) 6649 if (current_part->type != EDJE_PART_TYPE_BOX)
6686 { 6650 {
6687 ERR("%s: Error. parse error %s:%i. " 6651 ERR("parse error %s:%i. box attributes in non-BOX part.",
6688 "box attributes in non-BOX part.", 6652 file_in, line - 1);
6689 progname, file_in, line - 1);
6690 exit(-1); 6653 exit(-1);
6691 } 6654 }
6692 6655
@@ -6705,9 +6668,8 @@ st_collections_group_parts_part_description_box_min(void)
6705 6668
6706 if (current_part->type != EDJE_PART_TYPE_BOX) 6669 if (current_part->type != EDJE_PART_TYPE_BOX)
6707 { 6670 {
6708 ERR("%s: Error. parse error %s:%i. " 6671 ERR("parse error %s:%i. box attributes in non-BOX part.",
6709 "box attributes in non-BOX part.", 6672 file_in, line - 1);
6710 progname, file_in, line - 1);
6711 exit(-1); 6673 exit(-1);
6712 } 6674 }
6713 6675
@@ -6792,9 +6754,8 @@ static void st_collections_group_parts_part_description_table_homogeneous(void)
6792 6754
6793 if (current_part->type != EDJE_PART_TYPE_TABLE) 6755 if (current_part->type != EDJE_PART_TYPE_TABLE)
6794 { 6756 {
6795 ERR("%s: Error. parse error %s:%i. " 6757 ERR("parse error %s:%i. table attributes in non-TABLE part.",
6796 "table attributes in non-TABLE part.", 6758 file_in, line - 1);
6797 progname, file_in, line - 1);
6798 exit(-1); 6759 exit(-1);
6799 } 6760 }
6800 6761
@@ -6815,9 +6776,8 @@ static void st_collections_group_parts_part_description_table_align(void)
6815 6776
6816 if (current_part->type != EDJE_PART_TYPE_TABLE) 6777 if (current_part->type != EDJE_PART_TYPE_TABLE)
6817 { 6778 {
6818 ERR("%s: Error. parse error %s:%i. " 6779 ERR("parse error %s:%i. table attributes in non-TABLE part.",
6819 "table attributes in non-TABLE part.", 6780 file_in, line - 1);
6820 progname, file_in, line - 1);
6821 exit(-1); 6781 exit(-1);
6822 } 6782 }
6823 6783
@@ -6835,9 +6795,8 @@ static void st_collections_group_parts_part_description_table_padding(void)
6835 6795
6836 if (current_part->type != EDJE_PART_TYPE_TABLE) 6796 if (current_part->type != EDJE_PART_TYPE_TABLE)
6837 { 6797 {
6838 ERR("%s: Error. parse error %s:%i. " 6798 ERR("parse error %s:%i. table attributes in non-TABLE part.",
6839 "table attributes in non-TABLE part.", 6799 file_in, line - 1);
6840 progname, file_in, line - 1);
6841 exit(-1); 6800 exit(-1);
6842 } 6801 }
6843 6802
@@ -6856,9 +6815,8 @@ st_collections_group_parts_part_description_table_min(void)
6856 6815
6857 if (current_part->type != EDJE_PART_TYPE_TABLE) 6816 if (current_part->type != EDJE_PART_TYPE_TABLE)
6858 { 6817 {
6859 ERR("%s: Error. parse error %s:%i. " 6818 ERR("parse error %s:%i. box attributes in non-TABLE part.",
6860 "box attributes in non-TABLE part.", 6819 file_in, line - 1);
6861 progname, file_in, line - 1);
6862 exit(-1); 6820 exit(-1);
6863 } 6821 }
6864 6822
@@ -7265,9 +7223,8 @@ _st_collections_group_parts_part_description_params(Edje_External_Param_Type typ
7265 7223
7266 if (current_part->type != EDJE_PART_TYPE_EXTERNAL) 7224 if (current_part->type != EDJE_PART_TYPE_EXTERNAL)
7267 { 7225 {
7268 ERR("%s: Error. parse error %s:%i. " 7226 ERR("parse error %s:%i. params in non-EXTERNAL part.",
7269 "params in non-EXTERNAL part.", 7227 file_in, line - 1);
7270 progname, file_in, line - 1);
7271 exit(-1); 7228 exit(-1);
7272 } 7229 }
7273 7230
@@ -7310,8 +7267,8 @@ _st_collections_group_parts_part_description_params(Edje_External_Param_Type typ
7310 param->s = parse_str(1); 7267 param->s = parse_str(1);
7311 break; 7268 break;
7312 default: 7269 default:
7313 ERR("%s: Error. parse error %s:%i. Invalid param type.\n", 7270 ERR("parse error %s:%i. Invalid param type.",
7314 progname, file_in, line - 1); 7271 file_in, line - 1);
7315 break; 7272 break;
7316 } 7273 }
7317 7274
@@ -7654,8 +7611,7 @@ st_collections_group_programs_program_action(void)
7654 break; 7611 break;
7655 if (i == (int)(edje_file->sound_dir->samples_count - 1)) 7612 if (i == (int)(edje_file->sound_dir->samples_count - 1))
7656 { 7613 {
7657 ERR("%s: Error. No Sample name %s exist.", progname, 7614 ERR("No Sample name %s exist.", ep->sample_name);
7658 ep->sample_name);
7659 exit(-1); 7615 exit(-1);
7660 } 7616 }
7661 } 7617 }
@@ -7670,8 +7626,7 @@ st_collections_group_programs_program_action(void)
7670 break; 7626 break;
7671 if (i == (int)(edje_file->sound_dir->tones_count - 1)) 7627 if (i == (int)(edje_file->sound_dir->tones_count - 1))
7672 { 7628 {
7673 ERR("%s: Error. No Tone name %s exist.", progname, 7629 ERR("No Tone name %s exist.", ep->tone_name);
7674 ep->tone_name);
7675 exit(-1); 7630 exit(-1);
7676 } 7631 }
7677 } 7632 }
@@ -7835,9 +7790,8 @@ st_collections_group_programs_program_transition(void)
7835 current_program->tween.mode |= EDJE_TWEEN_MODE_OPT_FROM_CURRENT; 7790 current_program->tween.mode |= EDJE_TWEEN_MODE_OPT_FROM_CURRENT;
7836 else if (get_arg_count() != 2) 7791 else if (get_arg_count() != 2)
7837 { 7792 {
7838 ERR("%s: Error. parse error %s:%i. " 7793 ERR("parse error %s:%i. Need 2rd parameter to set time",
7839 "Need 2rd parameter to set time", 7794 file_in, line - 1);
7840 progname, file_in, line - 1);
7841 exit(-1); 7795 exit(-1);
7842 } 7796 }
7843 } 7797 }
@@ -7853,9 +7807,8 @@ st_collections_group_programs_program_transition(void)
7853 current_program->tween.mode |= EDJE_TWEEN_MODE_OPT_FROM_CURRENT; 7807 current_program->tween.mode |= EDJE_TWEEN_MODE_OPT_FROM_CURRENT;
7854 else if (get_arg_count() != 3) 7808 else if (get_arg_count() != 3)
7855 { 7809 {
7856 ERR("%s: Error. parse error %s:%i. " 7810 ERR("parse error %s:%i. Need 3rd parameter to set factor",
7857 "Need 3rd parameter to set factor", 7811 file_in, line - 1);
7858 progname, file_in, line - 1);
7859 exit(-1); 7812 exit(-1);
7860 } 7813 }
7861 current_program->tween.v1 = FROM_DOUBLE(parse_float_range(2, 0.0, 999999999.0)); 7814 current_program->tween.v1 = FROM_DOUBLE(parse_float_range(2, 0.0, 999999999.0));
@@ -7872,9 +7825,9 @@ st_collections_group_programs_program_transition(void)
7872 current_program->tween.mode |= EDJE_TWEEN_MODE_OPT_FROM_CURRENT; 7825 current_program->tween.mode |= EDJE_TWEEN_MODE_OPT_FROM_CURRENT;
7873 else if (get_arg_count() != 4) 7826 else if (get_arg_count() != 4)
7874 { 7827 {
7875 ERR("%s: Error. parse error %s:%i. " 7828 ERR("parse error %s:%i. "
7876 "Need 3rd and 4th parameters to set factor and counts", 7829 "Need 3rd and 4th parameters to set factor and counts",
7877 progname, file_in, line - 1); 7830 file_in, line - 1);
7878 exit(-1); 7831 exit(-1);
7879 } 7832 }
7880 current_program->tween.v1 = FROM_DOUBLE(parse_float_range(2, 0.0, 999999999.0)); 7833 current_program->tween.v1 = FROM_DOUBLE(parse_float_range(2, 0.0, 999999999.0));
@@ -7944,9 +7897,8 @@ st_collections_group_programs_program_target(void)
7944 data_queue_part_lookup(pc, name, &(et->id)); 7897 data_queue_part_lookup(pc, name, &(et->id));
7945 else 7898 else
7946 { 7899 {
7947 ERR("%s: Error. parse error %s:%i. " 7900 ERR("parse error %s:%i. target may only be used after action",
7948 "target may only be used after action", 7901 file_in, line - 1);
7949 progname, file_in, line - 1);
7950 exit(-1); 7902 exit(-1);
7951 } 7903 }
7952 free(name); 7904 free(name);
@@ -8059,8 +8011,8 @@ ob_collections_group_programs_program_script(void)
8059 cp->original = strdup(s); 8011 cp->original = strdup(s);
8060 if (cd->shared && cd->is_lua) 8012 if (cd->shared && cd->is_lua)
8061 { 8013 {
8062 ERR("%s: Error. parse error %s:%i. You're trying to mix Embryo and Lua scripting in the same group", 8014 ERR("parse error %s:%i. You're trying to mix Embryo and Lua scripting in the same group",
8063 progname, file_in, line - 1); 8015 file_in, line - 1);
8064 exit(-1); 8016 exit(-1);
8065 } 8017 }
8066 cd->is_lua = 0; 8018 cd->is_lua = 0;
diff --git a/legacy/edje/src/bin/edje_cc_mem.c b/legacy/edje/src/bin/edje_cc_mem.c
index d2d4ae04cc..e1fa23953a 100644
--- a/legacy/edje/src/bin/edje_cc_mem.c
+++ b/legacy/edje/src/bin/edje_cc_mem.c
@@ -14,8 +14,8 @@ mem_alloc(size_t size)
14 14
15 mem = calloc(1, size); 15 mem = calloc(1, size);
16 if (mem) return mem; 16 if (mem) return mem;
17 ERR("%s: Error. %s:%i memory allocation of %zu bytes failed. %s", 17 ERR("%s:%i memory allocation of %zu bytes failed. %s",
18 progname, file_in, line, size, strerror(errno)); 18 file_in, line, size, strerror(errno));
19 exit(-1); 19 exit(-1);
20 return NULL; 20 return NULL;
21} 21}
@@ -27,8 +27,8 @@ mem_strdup(const char *s)
27 27
28 str = strdup(s); 28 str = strdup(s);
29 if (str) return str; 29 if (str) return str;
30 ERR("%s: Error. %s:%i memory allocation of %zu bytes failed. %s. string being duplicated: \"%s\"", 30 ERR("%s:%i memory allocation of %zu bytes failed. %s. string being duplicated: \"%s\"",
31 progname, file_in, line, strlen(s) + 1, strerror(errno), s); 31 file_in, line, strlen(s) + 1, strerror(errno), s);
32 exit(-1); 32 exit(-1);
33 return NULL; 33 return NULL;
34} 34}
diff --git a/legacy/edje/src/bin/edje_cc_out.c b/legacy/edje/src/bin/edje_cc_out.c
index 043d71ca59..1c22637501 100644
--- a/legacy/edje/src/bin/edje_cc_out.c
+++ b/legacy/edje/src/bin/edje_cc_out.c
@@ -204,10 +204,9 @@ error_and_abort(Eet_File *ef __UNUSED__, const char *fmt, ...)
204{ 204{
205 va_list ap; 205 va_list ap;
206 206
207 fprintf(stderr, "%s: Error. ", progname);
208
209 va_start(ap, fmt); 207 va_start(ap, fmt);
210 vfprintf(stderr, fmt, ap); 208 eina_log_vprint(_edje_cc_log_dom, EINA_LOG_LEVEL_CRITICAL,
209 "unknown", "unknown", 0, fmt, ap);
211 va_end(ap); 210 va_end(ap);
212 unlink(file_out); 211 unlink(file_out);
213 exit(-1); 212 exit(-1);
@@ -236,7 +235,7 @@ check_image_part_desc(Edje_Part_Collection *pc, Edje_Part *ep,
236 { 235 {
237 if (epd->image.tweens[i]->id == -1) 236 if (epd->image.tweens[i]->id == -1)
238 error_and_abort(ef, "Collection %i: tween image id missing for " 237 error_and_abort(ef, "Collection %i: tween image id missing for "
239 "part \"%s\", description \"%s\" %f\n", 238 "part \"%s\", description \"%s\" %f",
240 pc->id, ep->name, epd->common.state.name, epd->common.state.value); 239 pc->id, ep->name, epd->common.state.name, epd->common.state.value);
241 } 240 }
242} 241}
@@ -250,11 +249,11 @@ check_packed_items(Edje_Part_Collection *pc, Edje_Part *ep, Eet_File *ef)
250 { 249 {
251 if (ep->items[i]->type == EDJE_PART_TYPE_GROUP && !ep->items[i]->source) 250 if (ep->items[i]->type == EDJE_PART_TYPE_GROUP && !ep->items[i]->source)
252 error_and_abort(ef, "Collection %i: missing source on packed item " 251 error_and_abort(ef, "Collection %i: missing source on packed item "
253 "of type GROUP in part \"%s\"\n", 252 "of type GROUP in part \"%s\"",
254 pc->id, ep->name); 253 pc->id, ep->name);
255 if (ep->type == EDJE_PART_TYPE_TABLE && (ep->items[i]->col < 0 || ep->items[i]->row < 0)) 254 if (ep->type == EDJE_PART_TYPE_TABLE && (ep->items[i]->col < 0 || ep->items[i]->row < 0))
256 error_and_abort(ef, "Collection %i: missing col/row on packed item " 255 error_and_abort(ef, "Collection %i: missing col/row on packed item "
257 "for part \"%s\" of type TABLE\n", 256 "for part \"%s\" of type TABLE",
258 pc->id, ep->name); 257 pc->id, ep->name);
259 } 258 }
260} 259}
@@ -263,7 +262,7 @@ static void
263check_nameless_state(Edje_Part_Collection *pc, Edje_Part *ep, Edje_Part_Description_Common *ed, Eet_File *ef) 262check_nameless_state(Edje_Part_Collection *pc, Edje_Part *ep, Edje_Part_Description_Common *ed, Eet_File *ef)
264{ 263{
265 if (!ed->state.name) 264 if (!ed->state.name)
266 error_and_abort(ef, "Collection %i: description with state missing on part \"%s\"\n", 265 error_and_abort(ef, "Collection %i: description with state missing on part \"%s\"",
267 pc->id, ep->name); 266 pc->id, ep->name);
268} 267}
269 268
@@ -274,7 +273,7 @@ check_part(Edje_Part_Collection *pc, Edje_Part *ep, Eet_File *ef)
274 /* FIXME: check image set and sort them. */ 273 /* FIXME: check image set and sort them. */
275 if (!ep->default_desc) 274 if (!ep->default_desc)
276 error_and_abort(ef, "Collection %i: default description missing " 275 error_and_abort(ef, "Collection %i: default description missing "
277 "for part \"%s\"\n", pc->id, ep->name); 276 "for part \"%s\"", pc->id, ep->name);
278 277
279 for (i = 0; i < ep->other.desc_count; ++i) 278 for (i = 0; i < ep->other.desc_count; ++i)
280 check_nameless_state(pc, ep, ep->other.desc[i], ef); 279 check_nameless_state(pc, ep, ep->other.desc[i], ef);
@@ -293,7 +292,7 @@ check_part(Edje_Part_Collection *pc, Edje_Part *ep, Eet_File *ef)
293 /* FIXME: When mask are supported remove this check */ 292 /* FIXME: When mask are supported remove this check */
294 if (ep->clip_to_id != -1 && 293 if (ep->clip_to_id != -1 &&
295 pc->parts[ep->clip_to_id]->type != EDJE_PART_TYPE_RECTANGLE) 294 pc->parts[ep->clip_to_id]->type != EDJE_PART_TYPE_RECTANGLE)
296 error_and_abort(ef, "Collection %i: clip_to point to a non RECT part '%s' !\n", 295 error_and_abort(ef, "Collection %i: clip_to point to a non RECT part '%s' !",
297 pc->id, pc->parts[ep->clip_to_id]->name); 296 pc->id, pc->parts[ep->clip_to_id]->name);
298} 297}
299 298
@@ -309,7 +308,7 @@ check_program(Edje_Part_Collection *pc, Edje_Program *ep, Eet_File *ef)
309 case EDJE_ACTION_TYPE_DRAG_VAL_PAGE: 308 case EDJE_ACTION_TYPE_DRAG_VAL_PAGE:
310 if (!ep->targets) 309 if (!ep->targets)
311 error_and_abort(ef, "Collection %i: target missing in program " 310 error_and_abort(ef, "Collection %i: target missing in program "
312 "\"%s\"\n", pc->id, ep->name); 311 "\"%s\"", pc->id, ep->name);
313 break; 312 break;
314 default: 313 default:
315 break; 314 break;
@@ -337,7 +336,7 @@ data_thread_head(void *data, Ecore_Thread *thread __UNUSED__)
337 if (!ce->entry) 336 if (!ce->entry)
338 { 337 {
339 snprintf(buf, sizeof(buf), 338 snprintf(buf, sizeof(buf),
340 "Collection %i: name missing.\n", ce->id); 339 "Collection %i: name missing.", ce->id);
341 hw->errstr = strdup(buf); 340 hw->errstr = strdup(buf);
342 return; 341 return;
343 } 342 }
@@ -356,7 +355,7 @@ data_thread_head(void *data, Ecore_Thread *thread __UNUSED__)
356 if (!sce) 355 if (!sce)
357 { 356 {
358 snprintf(buf, sizeof(buf), 357 snprintf(buf, sizeof(buf),
359 "Collection %s (%i) can't find an correct alias.\n", 358 "Collection %s (%i) can't find an correct alias.",
360 ce->entry, ce->id); 359 ce->entry, ce->id);
361 hw->errstr = strdup(buf); 360 hw->errstr = strdup(buf);
362 return; 361 return;
@@ -370,16 +369,15 @@ data_thread_head(void *data, Ecore_Thread *thread __UNUSED__)
370 if (bytes <= 0) 369 if (bytes <= 0)
371 { 370 {
372 snprintf(buf, sizeof(buf), 371 snprintf(buf, sizeof(buf),
373 "Unable to write \"edje_file\" entry to \"%s\" \n", 372 "Unable to write \"edje_file\" entry to \"%s\"",
374 file_out); 373 file_out);
375 hw->errstr = strdup(buf); 374 hw->errstr = strdup(buf);
376 return; 375 return;
377 } 376 }
378 } 377 }
379 378
380 if (verbose) 379 INF("Wrote %9i bytes (%4iKb) for \"edje_file\" header",
381 printf("%s: Wrote %9i bytes (%4iKb) for \"edje_file\" header\n", 380 bytes, (bytes + 512) / 1024);
382 progname, bytes, (bytes + 512) / 1024);
383} 381}
384 382
385static void 383static void
@@ -453,7 +451,7 @@ data_thread_fonts(void *data, Ecore_Thread *thread __UNUSED__)
453 { 451 {
454 if (f) eina_file_close(f); 452 if (f) eina_file_close(f);
455 snprintf(buf, sizeof(buf), 453 snprintf(buf, sizeof(buf),
456 "Unable to load font part \"%s\" entry to %s \n", 454 "Unable to load font part \"%s\" entry to %s",
457 fc->fn->file, file_out); 455 fc->fn->file, file_out);
458 fc->errstr = strdup(buf); 456 fc->errstr = strdup(buf);
459 return; 457 return;
@@ -468,16 +466,15 @@ data_thread_fonts(void *data, Ecore_Thread *thread __UNUSED__)
468 eina_file_close(f); 466 eina_file_close(f);
469 snprintf(buf2, sizeof(buf2), 467 snprintf(buf2, sizeof(buf2),
470 "Unable to write font part \"%s\" as \"%s\" " 468 "Unable to write font part \"%s\" as \"%s\" "
471 "part entry to %s \n", fc->fn->file, buf, file_out); 469 "part entry to %s", fc->fn->file, buf, file_out);
472 fc->errstr = strdup(buf2); 470 fc->errstr = strdup(buf2);
473 return; 471 return;
474 } 472 }
475 473
476 if (verbose) 474 INF("Wrote %9i bytes (%4iKb) for \"%s\" font entry \"%s\" compress: [real: %2.1f%%]",
477 printf("%s: Wrote %9i bytes (%4iKb) for \"%s\" font entry \"%s\" compress: [real: %2.1f%%]\n", 475 bytes, (bytes + 512) / 1024, buf, fc->fn->file,
478 progname, bytes, (bytes + 512) / 1024, buf, fc->fn->file, 476 100 - (100 * (double)bytes) / ((double)(eina_file_size_get(f)))
479 100 - (100 * (double)bytes) / ((double)(eina_file_size_get(f))) 477 );
480 );
481 eina_file_map_free(f, m); 478 eina_file_map_free(f, m);
482 eina_file_close(f); 479 eina_file_close(f);
483} 480}
@@ -607,7 +604,7 @@ error_and_abort_image_load_error(Eet_File *ef, const char *file, int error)
607 } 604 }
608 show_err: 605 show_err:
609 error_and_abort 606 error_and_abort
610 (ef, "Unable to load image \"%s\" used by file \"%s\": %s.%s\n", 607 (ef, "Unable to load image \"%s\" used by file \"%s\": %s.%s",
611 file, file_out, errmsg, hint); 608 file, file_out, errmsg, hint);
612} 609}
613 610
@@ -691,7 +688,7 @@ data_thread_image(void *data, Ecore_Thread *thread __UNUSED__)
691 snprintf(buf2, sizeof(buf2), 688 snprintf(buf2, sizeof(buf2),
692 "Unable to write image part " 689 "Unable to write image part "
693 "\"%s\" as \"%s\" part entry to " 690 "\"%s\" as \"%s\" part entry to "
694 "%s\n", iw->img->entry, buf, file_out); 691 "%s", iw->img->entry, buf, file_out);
695 iw->errstr = strdup(buf2); 692 iw->errstr = strdup(buf2);
696 return; 693 return;
697 } 694 }
@@ -701,18 +698,18 @@ data_thread_image(void *data, Ecore_Thread *thread __UNUSED__)
701 snprintf(buf2, sizeof(buf2), 698 snprintf(buf2, sizeof(buf2),
702 "Unable to load image part " 699 "Unable to load image part "
703 "\"%s\" as \"%s\" part entry to " 700 "\"%s\" as \"%s\" part entry to "
704 "%s\n", iw->img->entry, buf, file_out); 701 "%s", iw->img->entry, buf, file_out);
705 iw->errstr = strdup(buf2); 702 iw->errstr = strdup(buf2);
706 return; 703 return;
707 } 704 }
708 705
709 if (verbose) 706 if (eina_log_domain_level_check(_edje_cc_log_dom, EINA_LOG_LEVEL_INFO))
710 { 707 {
711 struct stat st; 708 struct stat st;
712 709
713 if (!iw->path || (stat(iw->path, &st))) st.st_size = 0; 710 if (!iw->path || (stat(iw->path, &st))) st.st_size = 0;
714 printf("%s: Wrote %9i bytes (%4iKb) for \"%s\" image entry \"%s\" compress: [raw: %2.1f%%] [real: %2.1f%%]\n", 711 INF("Wrote %9i bytes (%4iKb) for \"%s\" image entry \"%s\" compress: [raw: %2.1f%%] [real: %2.1f%%]",
715 progname, bytes, (bytes + 512) / 1024, buf, iw->img->entry, 712 bytes, (bytes + 512) / 1024, buf, iw->img->entry,
716 100 - (100 * (double)bytes) / ((double)(iw->w * iw->h * 4)), 713 100 - (100 * (double)bytes) / ((double)(iw->w * iw->h * 4)),
717 100 - (100 * (double)bytes) / ((double)(st.st_size)) 714 100 - (100 * (double)bytes) / ((double)(st.st_size))
718 ); 715 );
@@ -765,8 +762,7 @@ data_write_images(Eet_File *ef, int *image_num)
765 ecore_evas_init(); 762 ecore_evas_init();
766 ee = ecore_evas_buffer_new(1, 1); 763 ee = ecore_evas_buffer_new(1, 1);
767 if (!ee) 764 if (!ee)
768 error_and_abort(ef, "Cannot create buffer engine canvas for image " 765 error_and_abort(ef, "Cannot create buffer engine canvas for image load.");
769 "load.\n");
770 evas = ecore_evas_get(ee); 766 evas = ecore_evas_get(ee);
771 767
772 for (i = 0; i < (int)edje_file->image_dir->entries_count; i++) 768 for (i = 0; i < (int)edje_file->image_dir->entries_count; i++)
@@ -878,8 +874,7 @@ data_thread_sounds(void *data, Ecore_Thread *thread __UNUSED__)
878#endif 874#endif
879 if (!f) 875 if (!f)
880 { 876 {
881 ERR("%s: Error: Unable to load sound data of: %s", 877 ERR("Unable to load sound data of: %s", sw->sample->name);
882 progname, sw->sample->name);
883 exit(-1); 878 exit(-1);
884 } 879 }
885 880
@@ -891,8 +886,8 @@ data_thread_sounds(void *data, Ecore_Thread *thread __UNUSED__)
891 EET_COMPRESSION_NONE); 886 EET_COMPRESSION_NONE);
892 if (eina_file_map_faulted(f, m)) 887 if (eina_file_map_faulted(f, m))
893 { 888 {
894 ERR("%s: Error: File access error when reading '%s'", 889 ERR("File access error when reading '%s'",
895 progname, eina_file_filename_get(f)); 890 eina_file_filename_get(f));
896 exit(-1); 891 exit(-1);
897 } 892 }
898 eina_file_map_free(f, m); 893 eina_file_map_free(f, m);
@@ -903,18 +898,16 @@ data_thread_sounds(void *data, Ecore_Thread *thread __UNUSED__)
903 //If encoded temporary file, delete it. 898 //If encoded temporary file, delete it.
904 if (enc_info->encoded) unlink(enc_info->file); 899 if (enc_info->encoded) unlink(enc_info->file);
905#endif 900#endif
906 if (verbose)
907 {
908#ifdef HAVE_LIBSNDFILE 901#ifdef HAVE_LIBSNDFILE
909 printf ("%s: Wrote %9i bytes (%4iKb) for \"%s\" %s sound entry" 902 INF("Wrote %9i bytes (%4iKb) for \"%s\" %s sound entry \"%s\"",
910 "\"%s\" \n", progname, bytes, (bytes + 512) / 1024, 903 bytes, (bytes + 512) / 1024,
911 sndid_str, enc_info->comp_type, sw->sample->name); 904 sndid_str, enc_info->comp_type, sw->sample->name);
912#else 905#else
913 printf ("%s: Wrote %9i bytes (%4iKb) for \"%s\" %s sound entry" 906 INF("Wrote %9i bytes (%4iKb) for \"%s\" %s sound entry \"%s\"",
914 "\"%s\" \n", progname, bytes, (bytes + 512) / 1024, 907 bytes, (bytes + 512) / 1024,
915 sndid_str, "RAW PCM", sw->sample->name); 908 sndid_str, "RAW PCM", sw->sample->name);
916#endif 909#endif
917 } 910
918#ifdef HAVE_LIBSNDFILE 911#ifdef HAVE_LIBSNDFILE
919 if ((enc_info->file) && (!enc_info->encoded)) 912 if ((enc_info->file) && (!enc_info->encoded))
920 eina_stringshare_del(enc_info->file); 913 eina_stringshare_del(enc_info->file);
@@ -1002,15 +995,14 @@ data_thread_group(void *data, Ecore_Thread *thread __UNUSED__)
1002 if (bytes <= 0) 995 if (bytes <= 0)
1003 { 996 {
1004 snprintf(buf2, sizeof(buf2), 997 snprintf(buf2, sizeof(buf2),
1005 "Error. Unable to write \"%s\" part entry to %s\n", 998 "Unable to write \"%s\" part entry to %s",
1006 buf, file_out); 999 buf, file_out);
1007 gw->errstr = strdup(buf2); 1000 gw->errstr = strdup(buf2);
1008 return; 1001 return;
1009 } 1002 }
1010 1003
1011 if (verbose) 1004 INF("Wrote %9i bytes (%4iKb) for \"%s\" aka \"%s\" collection entry",
1012 printf("%s: Wrote %9i bytes (%4iKb) for \"%s\" aka \"%s\" collection entry\n", 1005 bytes, (bytes + 512) / 1024, buf, gw->pc->part);
1013 progname, bytes, (bytes + 512) / 1024, buf, gw->pc->part);
1014} 1006}
1015 1007
1016static void 1008static void
@@ -1040,8 +1032,7 @@ data_write_groups(Eet_File *ef, int *collection_num)
1040 gw = calloc(1, sizeof(Group_Write)); 1032 gw = calloc(1, sizeof(Group_Write));
1041 if (!gw) 1033 if (!gw)
1042 { 1034 {
1043 error_and_abort(ef, 1035 error_and_abort(ef, "Cannot allocate memory for group writer");
1044 "Error. Cannot allocate memory for group writer\n");
1045 return; 1036 return;
1046 } 1037 }
1047 gw->ef = ef; 1038 gw->ef = ef;
@@ -1064,7 +1055,7 @@ create_script_file(Eet_File *ef, const char *filename, const Code *cd, int fd)
1064 FILE *f = fdopen(fd, "wb"); 1055 FILE *f = fdopen(fd, "wb");
1065 if (!f) 1056 if (!f)
1066 error_and_abort(ef, "Unable to open temp file \"%s\" for script " 1057 error_and_abort(ef, "Unable to open temp file \"%s\" for script "
1067 "compilation.\n", filename); 1058 "compilation.", filename);
1068 1059
1069 Eina_List *ll; 1060 Eina_List *ll;
1070 Code_Program *cp; 1061 Code_Program *cp;
@@ -1148,7 +1139,7 @@ data_thread_script(void *data, Ecore_Thread *thread __UNUSED__)
1148 if (!f) 1139 if (!f)
1149 { 1140 {
1150 snprintf(buf, sizeof(buf), 1141 snprintf(buf, sizeof(buf),
1151 "Unable to open script object \"%s\" for reading.\n", 1142 "Unable to open script object \"%s\" for reading.",
1152 sc->tmpo); 1143 sc->tmpo);
1153 sc->errstr = strdup(buf); 1144 sc->errstr = strdup(buf);
1154 return; 1145 return;
@@ -1167,7 +1158,7 @@ data_thread_script(void *data, Ecore_Thread *thread __UNUSED__)
1167 if (fread(dat, size, 1, f) != 1) 1158 if (fread(dat, size, 1, f) != 1)
1168 { 1159 {
1169 snprintf(buf, sizeof(buf), 1160 snprintf(buf, sizeof(buf),
1170 "Unable to read all of script object \"%s\"\n", 1161 "Unable to read all of script object \"%s\"",
1171 sc->tmpo); 1162 sc->tmpo);
1172 sc->errstr = strdup(buf); 1163 sc->errstr = strdup(buf);
1173 return; 1164 return;
@@ -1180,7 +1171,7 @@ data_thread_script(void *data, Ecore_Thread *thread __UNUSED__)
1180 else 1171 else
1181 { 1172 {
1182 snprintf(buf, sizeof(buf), 1173 snprintf(buf, sizeof(buf),
1183 "Alloc failed for %lu bytes\n", (unsigned long)size); 1174 "Alloc failed for %lu bytes", (unsigned long)size);
1184 sc->errstr = strdup(buf); 1175 sc->errstr = strdup(buf);
1185 return; 1176 return;
1186 } 1177 }
@@ -1238,7 +1229,7 @@ data_scripts_exe_del_cb(void *data __UNUSED__, int evtype __UNUSED__, void *evin
1238 if (ecore_exe_data_get(ev->exe) != sc) return ECORE_CALLBACK_RENEW; 1229 if (ecore_exe_data_get(ev->exe) != sc) return ECORE_CALLBACK_RENEW;
1239 if (ev->exit_code != 0) 1230 if (ev->exit_code != 0)
1240 { 1231 {
1241 error_and_abort(sc->ef, "Compiling script code not clean.\n"); 1232 error_and_abort(sc->ef, "Compiling script code not clean.");
1242 return ECORE_CALLBACK_CANCEL; 1233 return ECORE_CALLBACK_CANCEL;
1243 } 1234 }
1244 if (threads) 1235 if (threads)
@@ -1288,14 +1279,14 @@ data_write_scripts(Eet_File *ef)
1288 sc->tmpn_fd = mkstemp(sc->tmpn); 1279 sc->tmpn_fd = mkstemp(sc->tmpn);
1289 if (sc->tmpn_fd < 0) 1280 if (sc->tmpn_fd < 0)
1290 error_and_abort(ef, "Unable to open temp file \"%s\" for script " 1281 error_and_abort(ef, "Unable to open temp file \"%s\" for script "
1291 "compilation.\n", sc->tmpn); 1282 "compilation.", sc->tmpn);
1292 snprintf(sc->tmpo, PATH_MAX, "%s/edje_cc.amx-tmp-XXXXXX", tmp_dir); 1283 snprintf(sc->tmpo, PATH_MAX, "%s/edje_cc.amx-tmp-XXXXXX", tmp_dir);
1293 sc->tmpo_fd = mkstemp(sc->tmpo); 1284 sc->tmpo_fd = mkstemp(sc->tmpo);
1294 if (sc->tmpo_fd < 0) 1285 if (sc->tmpo_fd < 0)
1295 { 1286 {
1296 unlink(sc->tmpn); 1287 unlink(sc->tmpn);
1297 error_and_abort(ef, "Unable to open temp file \"%s\" for script " 1288 error_and_abort(ef, "Unable to open temp file \"%s\" for script "
1298 "compilation.\n", sc->tmpn); 1289 "compilation.", sc->tmpn);
1299 } 1290 }
1300 create_script_file(ef, sc->tmpn, cd, sc->tmpn_fd); 1291 create_script_file(ef, sc->tmpn, cd, sc->tmpn_fd);
1301 snprintf(buf, sizeof(buf), 1292 snprintf(buf, sizeof(buf),
@@ -1354,7 +1345,7 @@ _edje_lua_error_and_abort(lua_State *L, int err_code, Script_Write *sc)
1354 break; 1345 break;
1355 } 1346 }
1356 snprintf(buf, sizeof(buf), 1347 snprintf(buf, sizeof(buf),
1357 "Lua %s error: %s\n", err_type, lua_tostring(L, -1)); 1348 "Lua %s error: %s", err_type, lua_tostring(L, -1));
1358 sc->errstr = strdup(buf); 1349 sc->errstr = strdup(buf);
1359} 1350}
1360 1351
@@ -1377,7 +1368,7 @@ data_thread_lua_script(void *data, Ecore_Thread *thread __UNUSED__)
1377 if (!L) 1368 if (!L)
1378 { 1369 {
1379 snprintf(buf, sizeof(buf), 1370 snprintf(buf, sizeof(buf),
1380 "Lua error: Lua state could not be initialized\n"); 1371 "Lua error: Lua state could not be initialized");
1381 sc->errstr = strdup(buf); 1372 sc->errstr = strdup(buf);
1382 return; 1373 return;
1383 } 1374 }
@@ -1444,7 +1435,7 @@ data_thread_lua_script(void *data, Ecore_Thread *thread __UNUSED__)
1444 if (eet_write(sc->ef, buf, dat.buf, dat.size, compress_mode) <= 0) 1435 if (eet_write(sc->ef, buf, dat.buf, dat.size, compress_mode) <= 0)
1445 { 1436 {
1446 snprintf(buf, sizeof(buf), 1437 snprintf(buf, sizeof(buf),
1447 "Unable to write script %i\n", sc->i); 1438 "Unable to write script %i", sc->i);
1448 sc->errstr = strdup(buf); 1439 sc->errstr = strdup(buf);
1449 return; 1440 return;
1450 } 1441 }
@@ -1540,16 +1531,14 @@ data_write(void)
1540 1531
1541 if (!edje_file) 1532 if (!edje_file)
1542 { 1533 {
1543 ERR("%s: Error. No data to put in \"%s\"", 1534 ERR("No data to put in \"%s\"", file_out);
1544 progname, file_out);
1545 exit(-1); 1535 exit(-1);
1546 } 1536 }
1547 1537
1548 ef = eet_open(file_out, EET_FILE_MODE_WRITE); 1538 ef = eet_open(file_out, EET_FILE_MODE_WRITE);
1549 if (!ef) 1539 if (!ef)
1550 { 1540 {
1551 ERR("%s: Error. Unable to open \"%s\" for writing output", 1541 ERR("Unable to open \"%s\" for writing output", file_out);
1552 progname, file_out);
1553 exit(-1); 1542 exit(-1);
1554 } 1543 }
1555 1544
@@ -1560,25 +1549,15 @@ data_write(void)
1560 pending_threads++; 1549 pending_threads++;
1561 t = ecore_time_get(); 1550 t = ecore_time_get();
1562 data_write_header(ef); 1551 data_write_header(ef);
1563 if (verbose) 1552
1564 { 1553 INF("header: %3.5f", ecore_time_get() - t); t = ecore_time_get();
1565 printf("header: %3.5f\n", ecore_time_get() - t); t = ecore_time_get();
1566 }
1567 data_write_groups(ef, &collection_num); 1554 data_write_groups(ef, &collection_num);
1568 if (verbose) 1555 INF("groups: %3.5f", ecore_time_get() - t); t = ecore_time_get();
1569 {
1570 printf("groups: %3.5f\n", ecore_time_get() - t); t = ecore_time_get();
1571 }
1572 data_write_scripts(ef); 1556 data_write_scripts(ef);
1573 if (verbose) 1557 INF("scripts: %3.5f", ecore_time_get() - t); t = ecore_time_get();
1574 {
1575 printf("scripts: %3.5f\n", ecore_time_get() - t); t = ecore_time_get();
1576 }
1577 data_write_lua_scripts(ef); 1558 data_write_lua_scripts(ef);
1578 if (verbose) 1559 INF("lua scripts: %3.5f", ecore_time_get() - t); t = ecore_time_get();
1579 { 1560
1580 printf("lua scripts: %3.5f\n", ecore_time_get() - t); t = ecore_time_get();
1581 }
1582 pending_threads++; 1561 pending_threads++;
1583 if (threads) 1562 if (threads)
1584 ecore_thread_run(data_thread_source, data_thread_source_end, NULL, ef); 1563 ecore_thread_run(data_thread_source, data_thread_source_end, NULL, ef);
@@ -1587,10 +1566,7 @@ data_write(void)
1587 data_thread_source(ef, NULL); 1566 data_thread_source(ef, NULL);
1588 data_thread_source_end(ef, NULL); 1567 data_thread_source_end(ef, NULL);
1589 } 1568 }
1590 if (verbose) 1569 INF("source: %3.5f", ecore_time_get() - t); t = ecore_time_get();
1591 {
1592 printf("source: %3.5f\n", ecore_time_get() - t); t = ecore_time_get();
1593 }
1594 pending_threads++; 1570 pending_threads++;
1595 if (threads) 1571 if (threads)
1596 ecore_thread_run(data_thread_fontmap, data_thread_fontmap_end, NULL, ef); 1572 ecore_thread_run(data_thread_fontmap, data_thread_fontmap_end, NULL, ef);
@@ -1599,45 +1575,32 @@ data_write(void)
1599 data_thread_fontmap(ef, NULL); 1575 data_thread_fontmap(ef, NULL);
1600 data_thread_fontmap_end(ef, NULL); 1576 data_thread_fontmap_end(ef, NULL);
1601 } 1577 }
1602 if (verbose) 1578 INF("fontmap: %3.5f", ecore_time_get() - t); t = ecore_time_get();
1603 {
1604 printf("fontmap: %3.5f\n", ecore_time_get() - t); t = ecore_time_get();
1605 }
1606 data_write_images(ef, &image_num); 1579 data_write_images(ef, &image_num);
1607 if (verbose) 1580 INF("images: %3.5f", ecore_time_get() - t); t = ecore_time_get();
1608 {
1609 printf("images: %3.5f\n", ecore_time_get() - t); t = ecore_time_get();
1610 }
1611 data_write_fonts(ef, &font_num); 1581 data_write_fonts(ef, &font_num);
1612 if (verbose) 1582 INF("fonts: %3.5f", ecore_time_get() - t); t = ecore_time_get();
1613 {
1614 printf("fonts: %3.5f\n", ecore_time_get() - t); t = ecore_time_get();
1615 }
1616 data_write_sounds(ef, &sound_num); 1583 data_write_sounds(ef, &sound_num);
1617 if (verbose) 1584 INF("sounds: %3.5f", ecore_time_get() - t); t = ecore_time_get();
1618 {
1619 printf("sounds: %3.5f\n", ecore_time_get() - t); t = ecore_time_get();
1620 }
1621 pending_threads--; 1585 pending_threads--;
1622 if (pending_threads > 0) ecore_main_loop_begin(); 1586 if (pending_threads > 0) ecore_main_loop_begin();
1623 if (verbose) 1587 INF("THREADS: %3.5f", ecore_time_get() - t); t = ecore_time_get();
1624 {
1625 printf("THREADS: %3.5f\n", ecore_time_get() - t); t = ecore_time_get();
1626 }
1627 1588
1628 eet_close(ef); 1589 eet_close(ef);
1629 1590
1630 if (verbose) 1591 if (eina_log_domain_level_check(_edje_cc_log_dom, EINA_LOG_LEVEL_INFO))
1631 printf("Summary:\n" 1592 {
1632 " Wrote %i collections\n" 1593 printf("Summary:\n"
1633 " Wrote %i images\n" 1594 " Wrote %i collections\n"
1634 " Wrote %i sounds\n" 1595 " Wrote %i images\n"
1635 " Wrote %i fonts\n" 1596 " Wrote %i sounds\n"
1636 , 1597 " Wrote %i fonts\n"
1637 collection_num, 1598 ,
1638 image_num, 1599 collection_num,
1639 sound_num, 1600 image_num,
1640 font_num); 1601 sound_num,
1602 font_num);
1603 }
1641} 1604}
1642 1605
1643void 1606void
@@ -1658,7 +1621,7 @@ reorder_parts(void)
1658 { 1621 {
1659 ep = (Edje_Part_Parser *)pc->parts[i]; 1622 ep = (Edje_Part_Parser *)pc->parts[i];
1660 if (ep->reorder.insert_before && ep->reorder.insert_after) 1623 if (ep->reorder.insert_before && ep->reorder.insert_after)
1661 ERR("%s: Error. Unable to use together insert_before and insert_after in part \"%s\".", progname, pc->parts[i]->name); 1624 ERR("Unable to use together insert_before and insert_after in part \"%s\".", pc->parts[i]->name);
1662 1625
1663 if (ep->reorder.done) 1626 if (ep->reorder.done)
1664 { 1627 {
@@ -1674,9 +1637,11 @@ reorder_parts(void)
1674 { 1637 {
1675 ep2 = (Edje_Part_Parser *)pc->parts[j]; 1638 ep2 = (Edje_Part_Parser *)pc->parts[j];
1676 if (ep2->reorder.after) 1639 if (ep2->reorder.after)
1677 ERR("%s: Error. The part \"%s\" is ambiguous ordered part.", progname, pc->parts[i]->name); 1640 ERR("The part \"%s\" is ambiguous ordered part.",
1641 pc->parts[i]->name);
1678 if (ep2->reorder.linked_prev) 1642 if (ep2->reorder.linked_prev)
1679 ERR("%s: Error. Unable to insert two or more parts in same part \"%s\".", progname, pc->parts[j]->name); 1643 ERR("Unable to insert two or more parts in same part \"%s\".",
1644 pc->parts[j]->name);
1680 k = j - 1; 1645 k = j - 1;
1681 found = EINA_TRUE; 1646 found = EINA_TRUE;
1682 ep2->reorder.linked_prev += ep->reorder.linked_prev + 1; 1647 ep2->reorder.linked_prev += ep->reorder.linked_prev + 1;
@@ -1693,9 +1658,9 @@ reorder_parts(void)
1693 { 1658 {
1694 ep2 = (Edje_Part_Parser *)pc->parts[j]; 1659 ep2 = (Edje_Part_Parser *)pc->parts[j];
1695 if (ep2->reorder.before) 1660 if (ep2->reorder.before)
1696 ERR("%s: Error. The part \"%s\" is ambiguous ordered part.", progname, pc->parts[i]->name); 1661 ERR("The part \"%s\" is ambiguous ordered part.", pc->parts[i]->name);
1697 if (ep2->reorder.linked_next) 1662 if (ep2->reorder.linked_next)
1698 ERR("%s: Error. Unable to insert two or more parts in same part \"%s\".", progname, pc->parts[j]->name); 1663 ERR("Unable to insert two or more parts in same part \"%s\".", pc->parts[j]->name);
1699 k = j; 1664 k = j;
1700 found = EINA_TRUE; 1665 found = EINA_TRUE;
1701 ep2->reorder.linked_next += ep->reorder.linked_next + 1; 1666 ep2->reorder.linked_next += ep->reorder.linked_next + 1;
@@ -1714,8 +1679,7 @@ reorder_parts(void)
1714 1679
1715 if (((i > k) && ((i - ep->reorder.linked_prev) <= k)) 1680 if (((i > k) && ((i - ep->reorder.linked_prev) <= k))
1716 || ((i < k) && ((i + ep->reorder.linked_next) >= k))) 1681 || ((i < k) && ((i + ep->reorder.linked_next) >= k)))
1717 ERR("%s: Error. The part order is wrong. It has circular dependency.", 1682 ERR("The part order is wrong. It has circular dependency.");
1718 progname);
1719 1683
1720 amount = ep->reorder.linked_prev + ep->reorder.linked_next + 1; 1684 amount = ep->reorder.linked_prev + ep->reorder.linked_next + 1;
1721 linked = i - ep->reorder.linked_prev; 1685 linked = i - ep->reorder.linked_prev;
@@ -2175,8 +2139,8 @@ data_process_lookups(void)
2175 2139
2176 if (i == part->pc->parts_count) 2140 if (i == part->pc->parts_count)
2177 { 2141 {
2178 ERR("%s: Error. Unable to find part name \"%s\" needed in group '%s'.", 2142 ERR("Unable to find part name \"%s\" needed in group '%s'.",
2179 progname, alias, part->pc->part); 2143 alias, part->pc->part);
2180 exit(-1); 2144 exit(-1);
2181 } 2145 }
2182 } 2146 }
@@ -2217,11 +2181,10 @@ data_process_lookups(void)
2217 if (!find) 2181 if (!find)
2218 { 2182 {
2219 if (!program->anonymous) 2183 if (!program->anonymous)
2220 ERR("%s: Error. Unable to find program name \"%s\".", 2184 ERR("Unable to find program name \"%s\".",
2221 progname, program->u.name); 2185 program->u.name);
2222 else 2186 else
2223 ERR("%s: Error. Unable to find anonymous program.", 2187 ERR("Unable to find anonymous program.");
2224 progname);
2225 exit(-1); 2188 exit(-1);
2226 } 2189 }
2227 2190
@@ -2260,8 +2223,7 @@ data_process_lookups(void)
2260 2223
2261 if (!de) 2224 if (!de)
2262 { 2225 {
2263 ERR("%s: Error. Unable to find group name \"%s\".", 2226 ERR("Unable to find group name \"%s\".", group->name);
2264 progname, group->name);
2265 exit(-1); 2227 exit(-1);
2266 } 2228 }
2267 2229
@@ -2333,8 +2295,7 @@ free_group:
2333 2295
2334 if (!find) 2296 if (!find)
2335 { 2297 {
2336 ERR("%s: Error. Unable to find image name \"%s\".", 2298 ERR("Unable to find image name \"%s\".", image->name);
2337 progname, image->name);
2338 exit(-1); 2299 exit(-1);
2339 } 2300 }
2340 2301
@@ -2355,14 +2316,8 @@ free_group:
2355 if (de->entry && eina_hash_find(images_in_use, de->entry)) 2316 if (de->entry && eina_hash_find(images_in_use, de->entry))
2356 continue ; 2317 continue ;
2357 2318
2358 if (verbose) 2319 INF("Image '%s' in resource 'edje/image/%i' will not be included as it is unused.",
2359 { 2320 de->entry, de->id);
2360 printf("%s: Image '%s' in ressource 'edje/image/%i' will not be included as it is unused.\n", progname, de->entry, de->id);
2361 }
2362 else
2363 {
2364 INF("Image '%s' in ressource 'edje/image/%i' will not be included as it is unused.", de->entry, de->id);
2365 }
2366 2321
2367 de->entry = NULL; 2322 de->entry = NULL;
2368 } 2323 }
@@ -2374,14 +2329,7 @@ free_group:
2374 if (set->name && eina_hash_find(images_in_use, set->name)) 2329 if (set->name && eina_hash_find(images_in_use, set->name))
2375 continue ; 2330 continue ;
2376 2331
2377 if (verbose) 2332 INF("Set '%s' will not be included as it is unused.", set->name);
2378 {
2379 printf("%s: Set '%s' will not be included as it is unused.\n", progname, set->name);
2380 }
2381 else
2382 {
2383 INF("Set '%s' will not be included as it is unused.", set->name);
2384 }
2385 2333
2386 set->name = NULL; 2334 set->name = NULL;
2387 set->entries = NULL; 2335 set->entries = NULL;
@@ -2607,8 +2555,7 @@ data_process_script_lookups(void)
2607 n = eina_convert_itoa(cl->val, buf); 2555 n = eina_convert_itoa(cl->val, buf);
2608 if (n > cl->len) 2556 if (n > cl->len)
2609 { 2557 {
2610 ERR("%s: Error. The unexpected happened. A numeric replacement string was larger than the original!", 2558 ERR("The unexpected happened. A numeric replacement string was larger than the original!");
2611 progname);
2612 exit(-1); 2559 exit(-1);
2613 } 2560 }
2614 memset(cl->ptr, ' ', cl->len); 2561 memset(cl->ptr, ' ', cl->len);
diff --git a/legacy/edje/src/bin/edje_cc_parse.c b/legacy/edje/src/bin/edje_cc_parse.c
index a9a5f22d42..d315790fbe 100644
--- a/legacy/edje/src/bin/edje_cc_parse.c
+++ b/legacy/edje/src/bin/edje_cc_parse.c
@@ -163,8 +163,8 @@ new_object(void)
163 sh = eina_hash_find(_new_statement_hash, id); 163 sh = eina_hash_find(_new_statement_hash, id);
164 if (!sh) 164 if (!sh)
165 { 165 {
166 ERR("%s: Error. %s:%i unhandled keyword %s", 166 ERR("%s:%i unhandled keyword %s",
167 progname, file_in, line - 1, 167 file_in, line - 1,
168 (char *)eina_list_data_get(eina_list_last(stack))); 168 (char *)eina_list_data_get(eina_list_last(stack)));
169 err_show(); 169 err_show();
170 exit(-1); 170 exit(-1);
@@ -188,8 +188,8 @@ new_statement(void)
188 } 188 }
189 else 189 else
190 { 190 {
191 ERR("%s: Error. %s:%i unhandled keyword %s", 191 ERR("%s:%i unhandled keyword %s",
192 progname, file_in, line - 1, 192 file_in, line - 1,
193 (char *)eina_list_data_get(eina_list_last(stack))); 193 (char *)eina_list_data_get(eina_list_last(stack)));
194 err_show(); 194 err_show();
195 exit(-1); 195 exit(-1);
@@ -286,8 +286,8 @@ next_token(char *p, char *end, char **new_p, int *delim)
286 tmpstr = alloca(l + 1); 286 tmpstr = alloca(l + 1);
287 if (!tmpstr) 287 if (!tmpstr)
288 { 288 {
289 ERR("%s: Error. %s:%i malloc %i bytes failed", 289 ERR("%s:%i malloc %i bytes failed",
290 progname, file_in, line - 1, l + 1); 290 file_in, line - 1, l + 1);
291 exit(-1); 291 exit(-1);
292 } 292 }
293 strncpy(tmpstr, p, l); 293 strncpy(tmpstr, p, l);
@@ -467,8 +467,8 @@ stack_chop_top(void)
467 } 467 }
468 else 468 else
469 { 469 {
470 ERR("%s: Error. parse error %s:%i. } marker without matching { marker", 470 ERR("parse error %s:%i. } marker without matching { marker",
471 progname, file_in, line - 1); 471 file_in, line - 1);
472 err_show(); 472 err_show();
473 exit(-1); 473 exit(-1);
474 } 474 }
@@ -481,11 +481,8 @@ parse(char *data, off_t size)
481 int delim = 0; 481 int delim = 0;
482 int do_params = 0; 482 int do_params = 0;
483 483
484 if (verbose) 484 DBG("Parsing input file");
485 { 485
486 INF("%s: Parsing input file",
487 progname);
488 }
489 p = data; 486 p = data;
490 end = data + size; 487 end = data + size;
491 line = 1; 488 line = 1;
@@ -496,8 +493,8 @@ parse(char *data, off_t size)
496 */ 493 */
497 if (do_params && delim && *token != ';') 494 if (do_params && delim && *token != ';')
498 { 495 {
499 ERR("%s: Error. parse error %s:%i. %c marker before ; marker", 496 ERR("parse error %s:%i. %c marker before ; marker",
500 progname, file_in, line - 1, *token); 497 file_in, line - 1, *token);
501 err_show(); 498 err_show();
502 exit(-1); 499 exit(-1);
503 } 500 }
@@ -508,9 +505,9 @@ parse(char *data, off_t size)
508 { 505 {
509 if (do_params) 506 if (do_params)
510 { 507 {
511 ERR("%s: Error. parse error %s:%i. } marker before ; marker", 508 ERR("Parse error %s:%i. } marker before ; marker",
512 progname, file_in, line - 1); 509 file_in, line - 1);
513 err_show(); 510 err_show();
514 exit(-1); 511 exit(-1);
515 } 512 }
516 else 513 else
@@ -536,8 +533,8 @@ parse(char *data, off_t size)
536 { 533 {
537 if (do_params) 534 if (do_params)
538 { 535 {
539 ERR("%s: Error. parse error %s:%i. { marker before ; marker", 536 ERR("parse error %s:%i. { marker before ; marker",
540 progname, file_in, line - 1); 537 file_in, line - 1);
541 err_show(); 538 err_show();
542 exit(-1); 539 exit(-1);
543 } 540 }
@@ -620,8 +617,8 @@ parse(char *data, off_t size)
620 } 617 }
621 else 618 else
622 { 619 {
623 ERR("%s: Error. parse error %s:%i. { marker does not have matching } marker", 620 ERR("Parse error %s:%i. { marker does not have matching } marker",
624 progname, file_in, line - 1); 621 file_in, line - 1);
625 err_show(); 622 err_show();
626 exit(-1); 623 exit(-1);
627 } 624 }
@@ -631,11 +628,8 @@ parse(char *data, off_t size)
631 } 628 }
632 } 629 }
633 } 630 }
634 if (verbose) 631
635 { 632 DBG("Parsing done");
636 INF("%s: Parsing done",
637 progname);
638 }
639} 633}
640 634
641static char *clean_file = NULL; 635static char *clean_file = NULL;
@@ -750,14 +744,14 @@ compile(void)
750 } 744 }
751 else 745 else
752 { 746 {
753 ERR("Error. Cannot run epp: %s", buf2); 747 ERR("Cannot run epp: %s", buf2);
754 exit(-1); 748 exit(-1);
755 } 749 }
756 if (ret == EXIT_SUCCESS) 750 if (ret == EXIT_SUCCESS)
757 file_in = tmpn; 751 file_in = tmpn;
758 else 752 else
759 { 753 {
760 ERR("Error. Exit code of epp not clean: %i", ret); 754 ERR("Exit code of epp not clean: %i", ret);
761 exit(-1); 755 exit(-1);
762 } 756 }
763 free(def); 757 free(def);
@@ -765,14 +759,11 @@ compile(void)
765 fd = open(file_in, O_RDONLY | O_BINARY, S_IRUSR | S_IWUSR); 759 fd = open(file_in, O_RDONLY | O_BINARY, S_IRUSR | S_IWUSR);
766 if (fd < 0) 760 if (fd < 0)
767 { 761 {
768 ERR("%s: Error. cannot open file \"%s\" for input. %s", 762 ERR("Cannot open file \"%s\" for input. %s",
769 progname, file_in, strerror(errno)); 763 file_in, strerror(errno));
770 exit(-1); 764 exit(-1);
771 } 765 }
772 if (verbose) 766 DBG("Opening \"%s\" for input", file_in);
773 {
774 INF("%s: Opening \"%s\" for input", progname, file_in);
775 }
776 767
777 size = lseek(fd, 0, SEEK_END); 768 size = lseek(fd, 0, SEEK_END);
778 lseek(fd, 0, SEEK_SET); 769 lseek(fd, 0, SEEK_SET);
@@ -781,8 +772,7 @@ compile(void)
781 parse(data, size); 772 parse(data, size);
782 else 773 else
783 { 774 {
784 ERR("%s: Error. cannot read file \"%s\". %s", 775 ERR("Cannot read file \"%s\". %s", file_in, strerror(errno));
785 progname, file_in, strerror(errno));
786 exit(-1); 776 exit(-1);
787 } 777 }
788 free(data); 778 free(data);
@@ -792,7 +782,7 @@ compile(void)
792 { 782 {
793 if (!stl->name) 783 if (!stl->name)
794 { 784 {
795 ERR("%s: Error. style must have a name.", progname); 785 ERR("style must have a name.");
796 exit(-1); 786 exit(-1);
797 } 787 }
798 } 788 }
@@ -818,8 +808,8 @@ is_num(int n)
818 str = eina_list_nth(params, n); 808 str = eina_list_nth(params, n);
819 if (!str) 809 if (!str)
820 { 810 {
821 ERR("%s: Error. %s:%i no parameter supplied as argument %i", 811 ERR("%s:%i no parameter supplied as argument %i",
822 progname, file_in, line - 1, n + 1); 812 file_in, line - 1, n + 1);
823 err_show(); 813 err_show();
824 exit(-1); 814 exit(-1);
825 } 815 }
@@ -843,8 +833,8 @@ parse_str(int n)
843 str = eina_list_nth(params, n); 833 str = eina_list_nth(params, n);
844 if (!str) 834 if (!str)
845 { 835 {
846 ERR("%s: Error. %s:%i no parameter supplied as argument %i", 836 ERR("%s:%i no parameter supplied as argument %i",
847 progname, file_in, line - 1, n + 1); 837 file_in, line - 1, n + 1);
848 err_show(); 838 err_show();
849 exit(-1); 839 exit(-1);
850 } 840 }
@@ -868,8 +858,7 @@ _parse_enum(char *str, va_list va)
868 /* End of the list, nothing matched. */ 858 /* End of the list, nothing matched. */
869 if (!s) 859 if (!s)
870 { 860 {
871 fprintf(stderr, "%s: Error. %s:%i token %s not one of:", 861 ERR("%s:%i token %s not one of:", file_in, line - 1, str);
872 progname, file_in, line - 1, str);
873 s = va_arg(va2, char *); 862 s = va_arg(va2, char *);
874 while (s) 863 while (s)
875 { 864 {
@@ -908,8 +897,8 @@ parse_enum(int n, ...)
908 str = eina_list_nth(params, n); 897 str = eina_list_nth(params, n);
909 if (!str) 898 if (!str)
910 { 899 {
911 ERR("%s: Error. %s:%i no parameter supplied as argument %i", 900 ERR("%s:%i no parameter supplied as argument %i",
912 progname, file_in, line - 1, n + 1); 901 file_in, line - 1, n + 1);
913 err_show(); 902 err_show();
914 exit(-1); 903 exit(-1);
915 } 904 }
@@ -946,8 +935,8 @@ parse_int(int n)
946 str = eina_list_nth(params, n); 935 str = eina_list_nth(params, n);
947 if (!str) 936 if (!str)
948 { 937 {
949 ERR("%s: Error. %s:%i no parameter supplied as argument %i", 938 ERR("%s:%i no parameter supplied as argument %i",
950 progname, file_in, line - 1, n + 1); 939 file_in, line - 1, n + 1);
951 err_show(); 940 err_show();
952 exit(-1); 941 exit(-1);
953 } 942 }
@@ -964,16 +953,16 @@ parse_int_range(int n, int f, int t)
964 str = eina_list_nth(params, n); 953 str = eina_list_nth(params, n);
965 if (!str) 954 if (!str)
966 { 955 {
967 ERR("%s: Error. %s:%i no parameter supplied as argument %i", 956 ERR("%s:%i no parameter supplied as argument %i",
968 progname, file_in, line - 1, n + 1); 957 file_in, line - 1, n + 1);
969 err_show(); 958 err_show();
970 exit(-1); 959 exit(-1);
971 } 960 }
972 i = my_atoi(str); 961 i = my_atoi(str);
973 if ((i < f) || (i > t)) 962 if ((i < f) || (i > t))
974 { 963 {
975 ERR("%s: Error. %s:%i integer %i out of range of %i to %i inclusive", 964 ERR("%s:%i integer %i out of range of %i to %i inclusive",
976 progname, file_in, line - 1, i, f, t); 965 file_in, line - 1, i, f, t);
977 err_show(); 966 err_show();
978 exit(-1); 967 exit(-1);
979 } 968 }
@@ -989,16 +978,16 @@ parse_bool(int n)
989 str = eina_list_nth(params, n); 978 str = eina_list_nth(params, n);
990 if (!str) 979 if (!str)
991 { 980 {
992 ERR("%s: Error. %s:%i no parameter supplied as argument %i", 981 ERR("%s:%i no parameter supplied as argument %i",
993 progname, file_in, line - 1, n + 1); 982 file_in, line - 1, n + 1);
994 err_show(); 983 err_show();
995 exit(-1); 984 exit(-1);
996 } 985 }
997 986
998 if (!strstrip(str, buf, sizeof (buf))) 987 if (!strstrip(str, buf, sizeof (buf)))
999 { 988 {
1000 ERR("%s: Error. %s:%i expression is too long", 989 ERR("%s:%i expression is too long",
1001 progname, file_in, line - 1); 990 file_in, line - 1);
1002 return 0; 991 return 0;
1003 } 992 }
1004 993
@@ -1010,8 +999,8 @@ parse_bool(int n)
1010 i = my_atoi(str); 999 i = my_atoi(str);
1011 if ((i < 0) || (i > 1)) 1000 if ((i < 0) || (i > 1))
1012 { 1001 {
1013 ERR("%s: Error. %s:%i integer %i out of range of 0 to 1 inclusive", 1002 ERR("%s:%i integer %i out of range of 0 to 1 inclusive",
1014 progname, file_in, line - 1, i); 1003 file_in, line - 1, i);
1015 err_show(); 1004 err_show();
1016 exit(-1); 1005 exit(-1);
1017 } 1006 }
@@ -1027,8 +1016,8 @@ parse_float(int n)
1027 str = eina_list_nth(params, n); 1016 str = eina_list_nth(params, n);
1028 if (!str) 1017 if (!str)
1029 { 1018 {
1030 ERR("%s: Error. %s:%i no parameter supplied as argument %i", 1019 ERR("%s:%i no parameter supplied as argument %i",
1031 progname, file_in, line - 1, n + 1); 1020 file_in, line - 1, n + 1);
1032 err_show(); 1021 err_show();
1033 exit(-1); 1022 exit(-1);
1034 } 1023 }
@@ -1045,16 +1034,16 @@ parse_float_range(int n, double f, double t)
1045 str = eina_list_nth(params, n); 1034 str = eina_list_nth(params, n);
1046 if (!str) 1035 if (!str)
1047 { 1036 {
1048 ERR("%s: Error. %s:%i no parameter supplied as argument %i", 1037 ERR("%s:%i no parameter supplied as argument %i",
1049 progname, file_in, line - 1, n + 1); 1038 file_in, line - 1, n + 1);
1050 err_show(); 1039 err_show();
1051 exit(-1); 1040 exit(-1);
1052 } 1041 }
1053 i = my_atof(str); 1042 i = my_atof(str);
1054 if ((i < f) || (i > t)) 1043 if ((i < f) || (i > t))
1055 { 1044 {
1056 ERR("%s: Error. %s:%i float %3.3f out of range of %3.3f to %3.3f inclusive", 1045 ERR("%s:%i float %3.3f out of range of %3.3f to %3.3f inclusive",
1057 progname, file_in, line - 1, i, f, t); 1046 file_in, line - 1, i, f, t);
1058 err_show(); 1047 err_show();
1059 exit(-1); 1048 exit(-1);
1060 } 1049 }
@@ -1074,8 +1063,8 @@ check_arg_count(int required_args)
1074 1063
1075 if (num_args != required_args) 1064 if (num_args != required_args)
1076 { 1065 {
1077 ERR("%s: Error. %s:%i got %i arguments, but expected %i", 1066 ERR("%s:%i got %i arguments, but expected %i",
1078 progname, file_in, line - 1, num_args, required_args); 1067 file_in, line - 1, num_args, required_args);
1079 err_show(); 1068 err_show();
1080 exit(-1); 1069 exit(-1);
1081 } 1070 }
@@ -1088,9 +1077,8 @@ check_min_arg_count(int min_required_args)
1088 1077
1089 if (num_args < min_required_args) 1078 if (num_args < min_required_args)
1090 { 1079 {
1091 ERR("%s: Error. %s:%i got %i arguments, " 1080 ERR("%s:%i got %i arguments, but expected at least %i",
1092 "but expected at least %i", 1081 file_in, line - 1, num_args, min_required_args);
1093 progname, file_in, line - 1, num_args, min_required_args);
1094 err_show(); 1082 err_show();
1095 exit(-1); 1083 exit(-1);
1096 } 1084 }
@@ -1117,8 +1105,8 @@ my_atoi(const char *s)
1117 if (!s) return 0; 1105 if (!s) return 0;
1118 if (!strstrip(s, buf, sizeof(buf))) 1106 if (!strstrip(s, buf, sizeof(buf)))
1119 { 1107 {
1120 ERR("%s: Error. %s:%i expression is too long\n", 1108 ERR("%s:%i expression is too long",
1121 progname, file_in, line - 1); 1109 file_in, line - 1);
1122 return 0; 1110 return 0;
1123 } 1111 }
1124 _alphai(buf, &res); 1112 _alphai(buf, &res);
@@ -1131,8 +1119,8 @@ _deltai(char *s, int *val)
1131 if (!val) return NULL; 1119 if (!val) return NULL;
1132 if ('(' != s[0]) 1120 if ('(' != s[0])
1133 { 1121 {
1134 ERR("%s: Error. %s:%i unexpected character at %s\n", 1122 ERR("%s:%i unexpected character at %s",
1135 progname, file_in, line - 1, s); 1123 file_in, line - 1, s);
1136 return s; 1124 return s;
1137 } 1125 }
1138 else 1126 else
@@ -1162,8 +1150,8 @@ _funci(char *s, int *val)
1162 } 1150 }
1163 else 1151 else
1164 { 1152 {
1165 ERR("%s: Error. %s:%i unexpected character at %s\n", 1153 ERR("%s:%i unexpected character at %s",
1166 progname, file_in, line - 1, s); 1154 file_in, line - 1, s);
1167 } 1155 }
1168 return s; 1156 return s;
1169} 1157}
@@ -1185,7 +1173,7 @@ _gammai(char *s, int *val)
1185 else 1173 else
1186 { 1174 {
1187 s = _funci(s, val); 1175 s = _funci(s, val);
1188// ERR("%s: Error. %s:%i unexpected character at %s\n", 1176// ERR("%s:%i unexpected character at %s",
1189// progname, file_in, line - 1, s); 1177// progname, file_in, line - 1, s);
1190 } 1178 }
1191 return s; 1179 return s;
@@ -1295,8 +1283,7 @@ _calci(char op, int a, int b)
1295 case '/': 1283 case '/':
1296 if (0 != b) a /= b; 1284 if (0 != b) a /= b;
1297 else 1285 else
1298 ERR("%s: Error. %s:%i divide by zero\n", 1286 ERR("%s:%i divide by zero", file_in, line - 1);
1299 progname, file_in, line - 1);
1300 return a; 1287 return a;
1301 case '*': 1288 case '*':
1302 a *= b; 1289 a *= b;
@@ -1304,12 +1291,10 @@ _calci(char op, int a, int b)
1304 case '%': 1291 case '%':
1305 if (0 != b) a = a % b; 1292 if (0 != b) a = a % b;
1306 else 1293 else
1307 ERR("%s: Error. %s:%i modula by zero\n", 1294 ERR("%s:%i modula by zero", file_in, line - 1);
1308 progname, file_in, line - 1);
1309 return a; 1295 return a;
1310 default: 1296 default:
1311 ERR("%s: Error. %s:%i unexpected character '%c'\n", 1297 ERR("%s:%i unexpected character '%c'", file_in, line - 1, op);
1312 progname, file_in, line - 1, op);
1313 } 1298 }
1314 return a; 1299 return a;
1315} 1300}
@@ -1326,8 +1311,7 @@ my_atof(const char *s)
1326 1311
1327 if (!strstrip(s, buf, sizeof (buf))) 1312 if (!strstrip(s, buf, sizeof (buf)))
1328 { 1313 {
1329 ERR("%s: Error. %s:%i expression is too long", 1314 ERR("%s:%i expression is too long", file_in, line - 1);
1330 progname, file_in, line - 1);
1331 return 0; 1315 return 0;
1332 } 1316 }
1333 _alphaf(buf, &res); 1317 _alphaf(buf, &res);
@@ -1340,8 +1324,7 @@ _deltaf(char *s, double *val)
1340 if (!val) return NULL; 1324 if (!val) return NULL;
1341 if ('(' != s[0]) 1325 if ('(' != s[0])
1342 { 1326 {
1343 ERR("%s: Error. %s:%i unexpected character at %s", 1327 ERR("%s:%i unexpected character at %s", file_in, line - 1, s);
1344 progname, file_in, line - 1, s);
1345 return s; 1328 return s;
1346 } 1329 }
1347 else 1330 else
@@ -1370,8 +1353,7 @@ _funcf(char *s, double *val)
1370 } 1353 }
1371 else 1354 else
1372 { 1355 {
1373 ERR("%s: Error. %s:%i unexpected character at %s\n", 1356 ERR("%s:%i unexpected character at %s", file_in, line - 1, s);
1374 progname, file_in, line - 1, s);
1375 } 1357 }
1376 return s; 1358 return s;
1377} 1359}
@@ -1394,7 +1376,7 @@ _gammaf(char *s, double *val)
1394 else 1376 else
1395 { 1377 {
1396 s = _funcf(s, val); 1378 s = _funcf(s, val);
1397// ERR("%s: Error. %s:%i unexpected character at %s\n", 1379// ERR("%s:%i unexpected character at %s",
1398// progname, file_in, line - 1, s); 1380// progname, file_in, line - 1, s);
1399 } 1381 }
1400 return s; 1382 return s;
@@ -1508,8 +1490,7 @@ _calcf(char op, double a, double b)
1508 case '/': 1490 case '/':
1509 if (b != 0) a /= b; 1491 if (b != 0) a /= b;
1510 else 1492 else
1511 ERR("%s: Error. %s:%i divide by zero\n", 1493 ERR("%s:%i divide by zero", file_in, line - 1);
1512 progname, file_in, line - 1);
1513 return a; 1494 return a;
1514 case '*': 1495 case '*':
1515 a *= b; 1496 a *= b;
@@ -1517,12 +1498,10 @@ _calcf(char op, double a, double b)
1517 case '%': 1498 case '%':
1518 if (0 != b) a = (double)((int)a % (int)b); 1499 if (0 != b) a = (double)((int)a % (int)b);
1519 else 1500 else
1520 ERR("%s: Error. %s:%i modula by zero\n", 1501 ERR("%s:%i modula by zero", file_in, line - 1);
1521 progname, file_in, line - 1);
1522 return a; 1502 return a;
1523 default: 1503 default:
1524 ERR("%s: Error. %s:%i unexpected character '%c'\n", 1504 ERR("%s:%i unexpected character '%c'", file_in, line - 1, op);
1525 progname, file_in, line - 1, op);
1526 } 1505 }
1527 return a; 1506 return a;
1528} 1507}
@@ -1532,8 +1511,7 @@ strstrip(const char *in, char *out, size_t size)
1532{ 1511{
1533 if ((size -1 ) < strlen(in)) 1512 if ((size -1 ) < strlen(in))
1534 { 1513 {
1535 ERR("%s: Error. %s:%i expression is too long", 1514 ERR("%s:%i expression is too long", file_in, line - 1);
1536 progname, file_in, line - 1);
1537 return 0; 1515 return 0;
1538 } 1516 }
1539 /* remove spaces and tabs */ 1517 /* remove spaces and tabs */
diff --git a/legacy/edje/src/bin/edje_cc_sources.c b/legacy/edje/src/bin/edje_cc_sources.c
index ab2f5d91f3..4a6be70a70 100644
--- a/legacy/edje/src/bin/edje_cc_sources.c
+++ b/legacy/edje/src/bin/edje_cc_sources.c
@@ -66,8 +66,7 @@ source_fetch_file(const char *fil, const char *filname)
66 f = fopen(fil, "rb"); 66 f = fopen(fil, "rb");
67 if (!f) 67 if (!f)
68 { 68 {
69 ERR("%s: Warning. Cannot open file '%s'", 69 ERR("Cannot open file '%s'", fil);
70 progname, fil);
71 exit(-1); 70 exit(-1);
72 } 71 }
73 72
@@ -82,8 +81,7 @@ source_fetch_file(const char *fil, const char *filname)
82 tmp = fread(sf->file, sz, 1, f); 81 tmp = fread(sf->file, sz, 1, f);
83 if (tmp != 1) 82 if (tmp != 1)
84 { 83 {
85 ERR("%s: Warning file length for (%s) doesn't match !", 84 ERR("file length for (%s) doesn't match!", filname);
86 progname, filname);
87 exit(-1); 85 exit(-1);
88 } 86 }
89 } 87 }
diff --git a/legacy/edje/src/bin/edje_convert.c b/legacy/edje/src/bin/edje_convert.c
index 63d11baf4b..bd6cf31f58 100644
--- a/legacy/edje/src/bin/edje_convert.c
+++ b/legacy/edje/src/bin/edje_convert.c
@@ -259,7 +259,7 @@ _edje_collection_convert(Eet_File *ef, Edje_Part_Collection_Directory_Entry *ce,
259 259
260 /* Change structure layout */ 260 /* Change structure layout */
261 edc = calloc(1, sizeof (Edje_Part_Collection)); 261 edc = calloc(1, sizeof (Edje_Part_Collection));
262 if (!edc) error_and_abort(ef, "Not enough memory\n"); 262 if (!edc) error_and_abort(ef, "Not enough memory");
263 ce->ref = edc; 263 ce->ref = edc;
264 264
265 EINA_LIST_FREE(oedc->programs, pg) 265 EINA_LIST_FREE(oedc->programs, pg)
@@ -306,7 +306,7 @@ _edje_collection_convert(Eet_File *ef, Edje_Part_Collection_Directory_Entry *ce,
306 edc->parts_count = eina_list_count(oedc->parts); 306 edc->parts_count = eina_list_count(oedc->parts);
307 edc->parts = calloc(edc->parts_count, sizeof (Edje_Part *)); 307 edc->parts = calloc(edc->parts_count, sizeof (Edje_Part *));
308 if (edc->parts_count && !edc->parts) 308 if (edc->parts_count && !edc->parts)
309 error_and_abort(ef, "Not enough memory\n"); 309 error_and_abort(ef, "Not enough memory");
310 k = 0; 310 k = 0;
311 311
312 EINA_LIST_FREE(oedc->parts, part) 312 EINA_LIST_FREE(oedc->parts, part)
@@ -318,7 +318,7 @@ _edje_collection_convert(Eet_File *ef, Edje_Part_Collection_Directory_Entry *ce,
318 318
319 replacement = eina_mempool_malloc(ce->mp.part, sizeof (Edje_Part)); 319 replacement = eina_mempool_malloc(ce->mp.part, sizeof (Edje_Part));
320 if (!replacement) 320 if (!replacement)
321 error_and_abort(ef, "Not enough memory\n"); 321 error_and_abort(ef, "Not enough memory");
322 322
323 replacement->name = part->name; 323 replacement->name = part->name;
324 replacement->default_desc = _edje_description_convert(part->type, ce, part->default_desc); 324 replacement->default_desc = _edje_description_convert(part->type, ce, part->default_desc);
diff --git a/legacy/edje/src/bin/edje_convert_main.c b/legacy/edje/src/bin/edje_convert_main.c
index bc3484d661..e17d4125b3 100644
--- a/legacy/edje/src/bin/edje_convert_main.c
+++ b/legacy/edje/src/bin/edje_convert_main.c
@@ -24,10 +24,9 @@ error_and_abort(Eet_File *ef, const char *fmt, ...)
24{ 24{
25 va_list ap; 25 va_list ap;
26 26
27 fprintf(stderr, "%s: Error. ", progname);
28
29 va_start(ap, fmt); 27 va_start(ap, fmt);
30 vfprintf(stderr, fmt, ap); 28 eina_log_vprint(_edje_cc_log_dom, EINA_LOG_LEVEL_CRITICAL,
29 "unknown", "unknown", 0, fmt, ap);
31 va_end(ap); 30 va_end(ap);
32 eet_close(ef); 31 eet_close(ef);
33 exit(-1); 32 exit(-1);
diff --git a/legacy/edje/src/bin/edje_decc.c b/legacy/edje/src/bin/edje_decc.c
index 358859e1ef..e9d880f85b 100644
--- a/legacy/edje/src/bin/edje_decc.c
+++ b/legacy/edje/src/bin/edje_decc.c
@@ -19,7 +19,7 @@
19#include "edje_decc.h" 19#include "edje_decc.h"
20 20
21int _edje_cc_log_dom = -1; 21int _edje_cc_log_dom = -1;
22char *progname = NULL; 22static char *progname = NULL;
23char *file_in = NULL; 23char *file_in = NULL;
24char *file_out = NULL; 24char *file_out = NULL;
25int compress_mode = EET_COMPRESSION_DEFAULT; 25int compress_mode = EET_COMPRESSION_DEFAULT;
@@ -37,6 +37,87 @@ void output(void);
37static int compiler_cmd_is_sane(); 37static int compiler_cmd_is_sane();
38static int root_filename_is_sane(); 38static int root_filename_is_sane();
39 39
40
41static void
42_edje_cc_log_cb(const Eina_Log_Domain *d,
43 Eina_Log_Level level,
44 const char *file,
45 const char *fnc,
46 int line,
47 const char *fmt,
48 __UNUSED__ void *data,
49 va_list args)
50{
51 if ((d->name) && (d->namelen == sizeof("edje_decc") - 1) &&
52 (memcmp(d->name, "edje_decc", sizeof("edje_decc") - 1) == 0))
53 {
54 const char *prefix;
55 Eina_Bool use_color = !eina_log_color_disable_get();
56
57 if (use_color)
58 {
59#ifndef _WIN32
60 fputs(eina_log_level_color_get(level), stderr);
61#else
62 int color;
63 switch (level)
64 {
65 case EINA_LOG_LEVEL_CRITICAL:
66 color = FOREGROUND_RED | FOREGROUND_INTENSITY;
67 break;
68 case EINA_LOG_LEVEL_ERR:
69 color = FOREGROUND_RED;
70 break;
71 case EINA_LOG_LEVEL_WARN:
72 color = FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_INTENSITY;
73 break;
74 case EINA_LOG_LEVEL_INFO:
75 color = FOREGROUND_GREEN | FOREGROUND_INTENSITY;
76 break;
77 case EINA_LOG_LEVEL_DBG:
78 color = FOREGROUND_BLUE | FOREGROUND_INTENSITY;
79 break;
80 default:
81 color = FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE;
82 }
83 SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), color);
84#endif
85 }
86
87 switch (level)
88 {
89 case EINA_LOG_LEVEL_CRITICAL:
90 prefix = "Critical. ";
91 break;
92 case EINA_LOG_LEVEL_ERR:
93 prefix = "Error. ";
94 break;
95 case EINA_LOG_LEVEL_WARN:
96 prefix = "Warning. ";
97 break;
98 default:
99 prefix = "";
100 }
101 fprintf(stderr, "%s: %s", progname, prefix);
102
103 if (use_color)
104 {
105#ifndef _WIN32
106 fputs(EINA_COLOR_RESET, stderr);
107#else
108 SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),
109 FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE);
110#endif
111 }
112
113
114 vfprintf(stderr, fmt, args);
115 putc('\n', stderr);
116 }
117 else
118 eina_log_print_cb_stderr(d, level, file, fnc, line, fmt, NULL, args);
119}
120
40static void 121static void
41main_help(void) 122main_help(void)
42{ 123{
@@ -47,6 +128,7 @@ main_help(void)
47 " -main-out\tCreate a symbolic link to the main edc \n" 128 " -main-out\tCreate a symbolic link to the main edc \n"
48 " -no-build-sh\tDon't output build.sh \n" 129 " -no-build-sh\tDon't output build.sh \n"
49 " -current-dir\tOutput to current directory \n" 130 " -current-dir\tOutput to current directory \n"
131 " -quiet\t\tProduce less output\n"
50 "\n" 132 "\n"
51 ,progname); 133 ,progname);
52} 134}
@@ -70,7 +152,10 @@ main(int argc, char **argv)
70 eina_shutdown(); 152 eina_shutdown();
71 exit(-1); 153 exit(-1);
72 } 154 }
73 progname = argv[0]; 155 progname = (char *)ecore_file_file_get(argv[0]);
156 eina_log_print_cb_set(_edje_cc_log_cb, NULL);
157 eina_log_domain_level_set("edje_decc", EINA_LOG_LEVEL_INFO);
158
74 for (i = 1; i < argc; i++) 159 for (i = 1; i < argc; i++)
75 { 160 {
76 if (!strcmp(argv[i], "-h")) 161 if (!strcmp(argv[i], "-h"))
@@ -89,6 +174,8 @@ main(int argc, char **argv)
89 build_sh = 0; 174 build_sh = 0;
90 else if (!strcmp(argv[i], "-current-dir")) 175 else if (!strcmp(argv[i], "-current-dir"))
91 new_dir = 0; 176 new_dir = 0;
177 else if (!strcmp(argv[i], "-quiet"))
178 eina_log_domain_level_set("edje_decc", EINA_LOG_LEVEL_WARN);
92 } 179 }
93 if (!file_in) 180 if (!file_in)
94 { 181 {
@@ -104,9 +191,9 @@ main(int argc, char **argv)
104 if (!decomp()) return -1; 191 if (!decomp()) return -1;
105 output(); 192 output();
106 193
107 fprintf(stderr, "WARNING! If any Image or audio data was encoded in a LOSSY way, then\n" 194 WRN("If any Image or audio data was encoded in a LOSSY way, then "
108 "re-encoding will drop quality even more. You need access to the original\n" 195 "re-encoding will drop quality even more. "
109 "data to ensure no loss of quality.\n"); 196 "You need access to the original data to ensure no loss of quality.");
110 eet_close(ef); 197 eet_close(ef);
111 edje_shutdown(); 198 edje_shutdown();
112 eina_log_domain_unregister(_edje_cc_log_dom); 199 eina_log_domain_unregister(_edje_cc_log_dom);
@@ -121,27 +208,27 @@ decomp(void)
121 ef = eet_open(file_in, EET_FILE_MODE_READ); 208 ef = eet_open(file_in, EET_FILE_MODE_READ);
122 if (!ef) 209 if (!ef)
123 { 210 {
124 ERR("ERROR: cannot open %s", file_in); 211 ERR("cannot open %s", file_in);
125 return 0; 212 return 0;
126 } 213 }
127 214
128 srcfiles = source_load(ef); 215 srcfiles = source_load(ef);
129 if (!srcfiles || !srcfiles->list) 216 if (!srcfiles || !srcfiles->list)
130 { 217 {
131 ERR("ERROR: %s has no decompile information", file_in); 218 ERR("%s has no decompile information", file_in);
132 eet_close(ef); 219 eet_close(ef);
133 return 0; 220 return 0;
134 } 221 }
135 if (!eina_list_data_get(srcfiles->list) || !root_filename_is_sane()) 222 if (!eina_list_data_get(srcfiles->list) || !root_filename_is_sane())
136 { 223 {
137 ERR("ERROR: Invalid root filename: '%s'", (char *) eina_list_data_get(srcfiles->list)); 224 ERR("Invalid root filename: '%s'", (char *) eina_list_data_get(srcfiles->list));
138 eet_close(ef); 225 eet_close(ef);
139 return 0; 226 return 0;
140 } 227 }
141 edje_file = eet_data_read(ef, _edje_edd_edje_file, "edje/file"); 228 edje_file = eet_data_read(ef, _edje_edd_edje_file, "edje/file");
142 if (!edje_file) 229 if (!edje_file)
143 { 230 {
144 ERR("ERROR: %s does not appear to be an edje file", file_in); 231 ERR("%s does not appear to be an edje file", file_in);
145 eet_close(ef); 232 eet_close(ef);
146 return 0; 233 return 0;
147 } 234 }
@@ -153,7 +240,7 @@ decomp(void)
153 } 240 }
154 else if (!compiler_cmd_is_sane()) 241 else if (!compiler_cmd_is_sane())
155 { 242 {
156 ERR("ERROR: invalid compiler executable: '%s'", edje_file->compiler); 243 ERR("invalid compiler executable: '%s'", edje_file->compiler);
157 eet_close(ef); 244 eet_close(ef);
158 return 0; 245 return 0;
159 } 246 }
@@ -225,7 +312,7 @@ output(void)
225 snprintf(buf, sizeof(buf), "edje/images/%i", ei->id); 312 snprintf(buf, sizeof(buf), "edje/images/%i", ei->id);
226 evas_object_image_file_set(im, file_in, buf); 313 evas_object_image_file_set(im, file_in, buf);
227 snprintf(out, sizeof(out), "%s/%s", outdir, ei->entry); 314 snprintf(out, sizeof(out), "%s/%s", outdir, ei->entry);
228 printf("Output Image: %s\n", out); 315 INF("Output Image: %s", out);
229 pp = strdup(out); 316 pp = strdup(out);
230 p = strrchr(pp, '/'); 317 p = strrchr(pp, '/');
231 *p = 0; 318 *p = 0;
@@ -256,7 +343,7 @@ output(void)
256 char *pp; 343 char *pp;
257 344
258 snprintf(out, sizeof(out), "%s/%s", outdir, sf->name); 345 snprintf(out, sizeof(out), "%s/%s", outdir, sf->name);
259 INF("Output Source File: %s\n", out); 346 INF("Output Source File: %s", out);
260 pp = strdup(out); 347 pp = strdup(out);
261 p = strrchr(pp, '/'); 348 p = strrchr(pp, '/');
262 *p = 0; 349 *p = 0;
@@ -345,10 +432,10 @@ output(void)
345 if (build_sh) 432 if (build_sh)
346 { 433 {
347 snprintf(out, sizeof(out), "%s/build.sh", outdir); 434 snprintf(out, sizeof(out), "%s/build.sh", outdir);
348 printf("Output Build Script: %s\n", out); 435 INF("Output Build Script: %s", out);
349 if (strstr(out, "../")) 436 if (strstr(out, "../"))
350 { 437 {
351 ERR("potential security violation. attempt to write in parent dir.\n"); 438 ERR("potential security violation. attempt to write in parent dir.");
352 exit (-1); 439 exit (-1);
353 } 440 }
354 f = fopen(out, "wb"); 441 f = fopen(out, "wb");
@@ -356,7 +443,7 @@ output(void)
356 fprintf(f, "%s $@ -id . -fd . %s -o %s.edj\n", edje_file->compiler, sf->name, outdir); 443 fprintf(f, "%s $@ -id . -fd . %s -o %s.edj\n", edje_file->compiler, sf->name, outdir);
357 fclose(f); 444 fclose(f);
358 445
359 WRN("\n*** CAUTION ***\n" 446 WRN("*** CAUTION ***\n"
360 "Please check the build script for anything malicious " 447 "Please check the build script for anything malicious "
361 "before running it!\n\n"); 448 "before running it!\n\n");
362 } 449 }
@@ -366,7 +453,7 @@ output(void)
366 snprintf(out, sizeof(out), "%s/%s", outdir, file_out); 453 snprintf(out, sizeof(out), "%s/%s", outdir, file_out);
367 if (ecore_file_symlink(sf->name, out) != EINA_TRUE) 454 if (ecore_file_symlink(sf->name, out) != EINA_TRUE)
368 { 455 {
369 ERR("symlink %s -> %s failed\n", sf->name, out); 456 ERR("symlink %s -> %s failed", sf->name, out);
370 } 457 }
371 } 458 }
372 459
diff --git a/legacy/edje/src/bin/edje_decc.h b/legacy/edje/src/bin/edje_decc.h
index 43e988d70d..c562715269 100644
--- a/legacy/edje/src/bin/edje_decc.h
+++ b/legacy/edje/src/bin/edje_decc.h
@@ -6,6 +6,7 @@
6/* logging variables */ 6/* logging variables */
7extern int _edje_cc_log_dom ; 7extern int _edje_cc_log_dom ;
8#define EDJE_CC_DEFAULT_LOG_COLOR EINA_COLOR_CYAN 8#define EDJE_CC_DEFAULT_LOG_COLOR EINA_COLOR_CYAN
9
9#ifdef ERR 10#ifdef ERR
10# undef ERR 11# undef ERR
11#endif 12#endif
@@ -18,6 +19,14 @@ extern int _edje_cc_log_dom ;
18# undef WRN 19# undef WRN
19#endif 20#endif
20#define WRN(...) EINA_LOG_DOM_WARN(_edje_cc_log_dom, __VA_ARGS__) 21#define WRN(...) EINA_LOG_DOM_WARN(_edje_cc_log_dom, __VA_ARGS__)
22#ifdef CRIT
23# undef CRIT
24#endif
25#define CRIT(...) EINA_LOG_DOM_CRIT(_edje_cc_log_dom, __VA_ARGS__)
26#ifdef DBG
27# undef DBG
28#endif
29#define DBG(...) EINA_LOG_DOM_DBG(_edje_cc_log_dom, __VA_ARGS__)
21 30
22/* types */ 31/* types */
23typedef struct _Font Font; 32typedef struct _Font Font;
diff --git a/legacy/edje/src/bin/edje_multisense_convert.c b/legacy/edje/src/bin/edje_multisense_convert.c
index 62c2f67204..347961e26e 100644
--- a/legacy/edje/src/bin/edje_multisense_convert.c
+++ b/legacy/edje/src/bin/edje_multisense_convert.c
@@ -21,7 +21,7 @@ _edje_multisense_encode(const char *filename, Edje_Sound_Sample *sample, double
21 enc_info = calloc(1, sizeof(Edje_Sound_Encode)); 21 enc_info = calloc(1, sizeof(Edje_Sound_Encode));
22 if (!enc_info) 22 if (!enc_info)
23 { 23 {
24 ERR("Error. while allocating memory to load file "); 24 ERR("while allocating memory to load file ");
25 exit(-1); 25 exit(-1);
26 } 26 }
27 memset (&sfinfo, 0, sizeof (SF_INFO)); 27 memset (&sfinfo, 0, sizeof (SF_INFO));
@@ -33,13 +33,13 @@ _edje_multisense_encode(const char *filename, Edje_Sound_Sample *sample, double
33 sfile = sf_open (filename, SFM_READ, &sfinfo); 33 sfile = sf_open (filename, SFM_READ, &sfinfo);
34 if (!sfile) 34 if (!sfile)
35 { 35 {
36 ERR("Error. Unable to open audio file : %s", filename); 36 ERR("Unable to open audio file: %s", filename);
37 exit(-1); 37 exit(-1);
38 } 38 }
39 39
40 if (!sf_format_check(&sfinfo)) 40 if (!sf_format_check(&sfinfo))
41 { 41 {
42 ERR("Error. Unknown file, not a valid audio file"); 42 ERR("Unknown file, not a valid audio file");
43 exit(-1); 43 exit(-1);
44 } 44 }
45 45