From 2e33ed8eb241962ac72c9e47acca8bf90377b129 Mon Sep 17 00:00:00 2001 From: raster Date: Thu, 26 Jul 2012 08:21:56 +0000 Subject: [PATCH] edje_cc shouldnt be using eina-log for almost all its err/wrn/inf stuff as this is actual user output and done: file.c:242 error in blah.edc:232 is just confusing as all heck. git-svn-id: http://svn.enlightenment.org/svn/e/trunk/edje@74424 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- src/bin/edje_cc.c | 2 +- src/bin/edje_cc.h | 6 +++--- src/bin/edje_cc_parse.c | 9 ++++----- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/src/bin/edje_cc.c b/src/bin/edje_cc.c index 1b32152..bbd5203 100644 --- a/src/bin/edje_cc.c +++ b/src/bin/edje_cc.c @@ -87,7 +87,7 @@ main(int argc, char **argv) /* add defines to epp so edc files can detect edje_cc version */ defines = eina_list_append(defines, mem_strdup("-DEDJE_VERSION_12=12")); - progname = argv[0]; + progname = (char *)ecore_file_file_get(argv[0]); for (i = 1; i < argc; i++) { if (!strcmp(argv[i], "-h")) diff --git a/src/bin/edje_cc.h b/src/bin/edje_cc.h index 5683feb..8438827 100644 --- a/src/bin/edje_cc.h +++ b/src/bin/edje_cc.h @@ -20,15 +20,15 @@ extern int _edje_cc_log_dom ; #ifdef ERR # undef ERR #endif -#define ERR(...) EINA_LOG_DOM_ERR(_edje_cc_log_dom, __VA_ARGS__) +#define ERR(...) do{printf("\033[31m");printf(__VA_ARGS__);printf("\033[0m\n");} while (0) #ifdef INF # undef INF #endif -#define INF(...) EINA_LOG_DOM_INFO(_edje_cc_log_dom, __VA_ARGS__) +#define INF(...) do{printf("\033[35m");printf(__VA_ARGS__);printf("\033[0m\n");} while (0) #ifdef WRN # undef WRN #endif -#define WRN(...) EINA_LOG_DOM_WARN(_edje_cc_log_dom, __VA_ARGS__) +#define WRN(...) do{printf("\033[33m");printf(__VA_ARGS__);printf("\033[0m\n");} while (0) /* types */ diff --git a/src/bin/edje_cc_parse.c b/src/bin/edje_cc_parse.c index ed70877..a9a5f22 100644 --- a/src/bin/edje_cc_parse.c +++ b/src/bin/edje_cc_parse.c @@ -91,11 +91,11 @@ err_show_stack(void) s = stack_id(); if (s) { - printf("PARSE STACK:\n%s\n", s); + ERR("PARSE STACK:\n%s", s); free(s); } else - printf("NO PARSE STACK\n"); + ERR("NO PARSE STACK"); } static void @@ -104,12 +104,11 @@ err_show_params(void) Eina_List *l; char *p; - printf("PARAMS:"); + ERR("PARAMS:"); EINA_LIST_FOREACH(params, l, p) { - printf(" %s", p); + ERR(" %s", p); } - printf("\n"); } static void -- 2.7.4