summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCedric BAIL <cedric.bail@free.fr>2009-09-21 16:08:51 +0000
committerCedric BAIL <cedric.bail@free.fr>2009-09-21 16:08:51 +0000
commitc259d8adddf7b72641c42adb9713d7d9a29a123c (patch)
tree9c0a55308034d1aaddbe856696a71ece75ddb9cf
parentdb6bee8c04fa464916d63a553e392f36ac0a659c (diff)
* evas: Use eina_log.
Patch from Matthieu. SVN revision: 42598
Diffstat (limited to '')
-rw-r--r--legacy/evas/AUTHORS1
-rw-r--r--legacy/evas/src/bin/evas_cserve_main.c278
-rw-r--r--legacy/evas/src/bin/evas_cserve_tool.c2
-rw-r--r--legacy/evas/src/lib/canvas/evas_events.c6
-rw-r--r--legacy/evas/src/lib/canvas/evas_font_dir.c2
-rw-r--r--legacy/evas/src/lib/canvas/evas_main.c13
-rw-r--r--legacy/evas/src/lib/canvas/evas_object_box.c10
-rw-r--r--legacy/evas/src/lib/canvas/evas_object_image.c5
-rw-r--r--legacy/evas/src/lib/canvas/evas_object_smart.c6
-rw-r--r--legacy/evas/src/lib/canvas/evas_object_table.c51
-rw-r--r--legacy/evas/src/lib/canvas/evas_render.c2
-rw-r--r--legacy/evas/src/lib/canvas/evas_smart.c4
-rw-r--r--legacy/evas/src/lib/canvas/evas_stack.c4
-rw-r--r--legacy/evas/src/lib/cserve/evas_cs_client.c4
-rw-r--r--legacy/evas/src/lib/cserve/evas_cs_server.c4
-rw-r--r--legacy/evas/src/lib/engines/common/evas_convert_main.c2
-rw-r--r--legacy/evas/src/lib/engines/common/evas_convert_rgb_16.c2
-rw-r--r--legacy/evas/src/lib/engines/common/evas_cpu.c3
-rw-r--r--legacy/evas/src/lib/engines/common/evas_font_draw.c1
-rw-r--r--legacy/evas/src/lib/engines/common/evas_font_main.c2
-rw-r--r--legacy/evas/src/lib/engines/common/evas_font_query.c4
-rw-r--r--legacy/evas/src/lib/engines/common/evas_image_main.c4
-rw-r--r--legacy/evas/src/lib/engines/common/evas_image_scalecache.c26
-rw-r--r--legacy/evas/src/lib/engines/common/evas_op_add_main_.c1
-rw-r--r--legacy/evas/src/lib/engines/common/evas_pipe.c8
-rw-r--r--legacy/evas/src/lib/engines/common/evas_tiler.c13
-rw-r--r--legacy/evas/src/lib/engines/common_16/evas_soft16_image_scaled_sampled.c17
-rw-r--r--legacy/evas/src/lib/engines/common_16/evas_soft16_image_unscaled.c15
-rw-r--r--legacy/evas/src/lib/engines/common_16/evas_soft16_main.c2
-rw-r--r--legacy/evas/src/lib/engines/common_16/evas_soft16_rectangle.c4
-rw-r--r--legacy/evas/src/lib/include/evas_common.h59
-rw-r--r--legacy/evas/src/lib/main.c25
-rw-r--r--legacy/evas/src/modules/engines/cairo_x11/evas_engine.c6
-rw-r--r--legacy/evas/src/modules/engines/direct3d/evas_engine.h2
-rw-r--r--legacy/evas/src/modules/engines/directfb/evas_engine.c81
-rw-r--r--legacy/evas/src/modules/engines/fb/evas_fb_main.c12
-rw-r--r--legacy/evas/src/modules/engines/fb/evas_outbuf.c2
-rw-r--r--legacy/evas/src/modules/engines/gl_glew/evas_glew_main.c2
-rw-r--r--legacy/evas/src/modules/engines/gl_x11/evas_engine.c2
-rw-r--r--legacy/evas/src/modules/engines/quartz/evas_engine.c18
-rw-r--r--legacy/evas/src/modules/engines/software_16/evas_engine.c6
-rw-r--r--legacy/evas/src/modules/engines/software_16_sdl/evas_engine.c19
-rw-r--r--legacy/evas/src/modules/engines/software_16_wince/evas_wince_ddraw_buffer.cpp22
-rw-r--r--legacy/evas/src/modules/engines/software_16_wince/evas_wince_fb_buffer.c20
-rw-r--r--legacy/evas/src/modules/engines/software_16_wince/evas_wince_gapi_buffer.c20
-rw-r--r--legacy/evas/src/modules/engines/software_16_wince/evas_wince_gdi_buffer.c4
-rw-r--r--legacy/evas/src/modules/engines/software_ddraw/evas_outbuf.c12
-rw-r--r--legacy/evas/src/modules/engines/software_gdi/evas_gdi_main.c10
-rw-r--r--legacy/evas/src/modules/engines/software_gdi/evas_outbuf.c12
-rw-r--r--legacy/evas/src/modules/engines/software_sdl/evas_engine.c27
-rw-r--r--legacy/evas/src/modules/engines/software_x11/evas_xcb_outbuf.c14
-rw-r--r--legacy/evas/src/modules/loaders/tiff/evas_image_load_tiff.c14
-rw-r--r--legacy/evas/src/modules/loaders/xpm/evas_image_load_xpm.c17
53 files changed, 478 insertions, 424 deletions
diff --git a/legacy/evas/AUTHORS b/legacy/evas/AUTHORS
index c7459e6766..c993de5f64 100644
--- a/legacy/evas/AUTHORS
+++ b/legacy/evas/AUTHORS
@@ -15,3 +15,4 @@ Gustavo Sverzut Barbieri <barbieri@gmail.com>
15Vincent Torri <vtorri at univ-evry dot fr> 15Vincent Torri <vtorri at univ-evry dot fr>
16Tim Horton <hortont424@gmail.com> 16Tim Horton <hortont424@gmail.com>
17Tom Hacohen <tom@stosb.com> 17Tom Hacohen <tom@stosb.com>
18Mathieu Taillefumier <mathieu.taillefumier@free.fr>
diff --git a/legacy/evas/src/bin/evas_cserve_main.c b/legacy/evas/src/bin/evas_cserve_main.c
index e363c77e99..e97c97653b 100644
--- a/legacy/evas/src/bin/evas_cserve_main.c
+++ b/legacy/evas/src/bin/evas_cserve_main.c
@@ -17,7 +17,18 @@
17#include "evas_cs.h" 17#include "evas_cs.h"
18 18
19#define D(...) EINA_LOG_DBG(__VA_ARGS__) 19#define D(...) EINA_LOG_DBG(__VA_ARGS__)
20 20#ifdef ERR
21#undef ERR
22#endif
23#define ERR(...) EINA_LOG_DOM_ERR(_evas_cserve_bin_log_dom, __VA_ARGS__)
24#ifdef DBG
25#undef DBG
26#endif
27#define DBG(...) EINA_LOG_DOM_DBG(_evas_cserve_bin_log_dom, __VA_ARGS__)
28#ifdef CSERVE_BIN_DEFAULT_COLOR
29#undef CSERVE_BIN_DEFAULT_COLOR
30#endif
31#define CSERVE_BIN_DEFAULT_COLOR "\033[36m"
21// fixme:'s 32// fixme:'s
22// 33//
23// preload - make it work (both) 34// preload - make it work (both)
@@ -102,7 +113,7 @@ static int cache_max_adjust = 0;
102static int cache_item_timeout = -1; 113static int cache_item_timeout = -1;
103static int cache_item_timeout_check = -1; 114static int cache_item_timeout_check = -1;
104static Mem *stat_mem = NULL; 115static Mem *stat_mem = NULL;
105 116static int _evas_cserve_bin_log_dom = -1;
106static int stat_mem_num = 0; 117static int stat_mem_num = 0;
107static Eina_List *stat_mems = NULL; 118static Eina_List *stat_mems = NULL;
108 119
@@ -468,16 +479,16 @@ img_new(const char *file, const char *key, RGBA_Image_Loadopts *load_opts, const
468 int err = 0; 479 int err = 0;
469 double t; 480 double t;
470 481
471 D("... stat %s", file); 482 DBG("... stat %s", file);
472 ret = stat(file, &st); 483 ret = stat(file, &st);
473 if (ret < 0) return NULL; 484 if (ret < 0) return NULL;
474 D("... load header"); 485 DBG("... load header");
475 t = get_time(); 486 t = get_time();
476 ie = evas_cache_image_request(cache, file, key, load_opts, &err); 487 ie = evas_cache_image_request(cache, file, key, load_opts, &err);
477 t = get_time() - t; 488 t = get_time() - t;
478 D("... header done"); 489 DBG("... header done");
479 if (!ie) return NULL; 490 if (!ie) return NULL;
480 D("... ie->cache = %p", ie->cache); 491 DBG("... ie->cache = %p", ie->cache);
481 img = (Img *)ie; 492 img = (Img *)ie;
482 img->stats.load1 = t; 493 img->stats.load1 = t;
483 img->key = eina_stringshare_add(bufkey); 494 img->key = eina_stringshare_add(bufkey);
@@ -528,10 +539,10 @@ img_free(Img *img)
528{ 539{
529 if (img->incache > 0) 540 if (img->incache > 0)
530 { 541 {
531 printf("EEEEEEEEEEEEEEEEK!\n"); 542 ERR("EEEEEEEEEEEEEEEEK!");
532 printf("EEEEEEEEEEEEEEEEK! %p '%s' still in cache\n", 543 ERR("EEEEEEEEEEEEEEEEK! %p '%s' still in cache",
533 img, img->file.file); 544 img, img->file.file);
534 printf("EEEEEEEEEEEEEEEEK!\n"); 545 ERR("EEEEEEEEEEEEEEEEK!");
535 return; 546 return;
536 } 547 }
537 stats_lifetime_update(img); 548 stats_lifetime_update(img);
@@ -555,7 +566,7 @@ img_free(Img *img)
555static void 566static void
556cache_clean(void) 567cache_clean(void)
557{ 568{
558 D("... cache clean!!! do"); 569 DBG("... cache clean!!! do");
559 LKL(cache_lock); 570 LKL(cache_lock);
560 while ((cache_usage > ((cache_max_usage + cache_max_adjust) * 1024)) && 571 while ((cache_usage > ((cache_max_usage + cache_max_adjust) * 1024)) &&
561 (cache_images)) 572 (cache_images))
@@ -563,13 +574,13 @@ cache_clean(void)
563 Img *img; 574 Img *img;
564 Eina_List *l; 575 Eina_List *l;
565 576
566 D("... clean loop %i > %i", cache_usage, (cache_max_usage + cache_max_adjust) * 1024); 577 DBG("... clean loop %i > %i", cache_usage, (cache_max_usage + cache_max_adjust) * 1024);
567 l = eina_list_last(cache_images); // THREAD: called from thread. happens to be safe as it uses no unlocked shared resources 578 l = eina_list_last(cache_images); // THREAD: called from thread. happens to be safe as it uses no unlocked shared resources
568 if (!l) break; 579 if (!l) break;
569 img = l->data; 580 img = l->data;
570 if (!img) break; 581 if (!img) break;
571 LKL(img->lock); 582 LKL(img->lock);
572 D("... REMOVE %p '%s'", img, img->file.file); 583 DBG("... REMOVE %p '%s'", img, img->file.file);
573#ifdef BUILD_PTHREAD 584#ifdef BUILD_PTHREAD
574 img->killme = 1; 585 img->killme = 1;
575 img->useless = 1; 586 img->useless = 1;
@@ -580,7 +591,7 @@ cache_clean(void)
580 cache_images = eina_list_remove_list(cache_images, l); // FIXME: called from thread 591 cache_images = eina_list_remove_list(cache_images, l); // FIXME: called from thread
581 img->incache--; 592 img->incache--;
582 cache_usage -= img->usage; 593 cache_usage -= img->usage;
583 D("... IMG FREE %p", img); 594 DBG("... IMG FREE %p", img);
584 img_free(img); 595 img_free(img);
585#endif 596#endif
586 } 597 }
@@ -636,10 +647,10 @@ mem_cache_adjust(void)
636 647
637 if (cache_max_adjust < -cache_max_usage) 648 if (cache_max_adjust < -cache_max_usage)
638 cache_max_adjust = -cache_max_usage; 649 cache_max_adjust = -cache_max_usage;
639 D("... cache_max_adjust = %i", cache_max_adjust); 650 DBG("... cache_max_adjust = %i", cache_max_adjust);
640 if (pval != cache_max_adjust) 651 if (pval != cache_max_adjust)
641 { 652 {
642 D("... cache clean"); 653 DBG("... cache clean");
643 // FIXME lock problem 654 // FIXME lock problem
644 cache_clean(); 655 cache_clean();
645 } 656 }
@@ -651,23 +662,23 @@ img_cache(Img *img)
651 eina_hash_del(active_images, img->key, img); 662 eina_hash_del(active_images, img->key, img);
652 if (img->dead) 663 if (img->dead)
653 { 664 {
654 D("... img %p '%s' dead", img , img->file.file); 665 DBG("... img %p '%s' dead", img , img->file.file);
655 img_free(img); 666 img_free(img);
656 return; 667 return;
657 } 668 }
658 if ((cache_usage + img->usage) > ((cache_max_usage + cache_max_adjust) * 1024)) 669 if ((cache_usage + img->usage) > ((cache_max_usage + cache_max_adjust) * 1024))
659 { 670 {
660 D("... img %p '%s' too big for cache", img , img->file.file); 671 DBG("... img %p '%s' too big for cache", img , img->file.file);
661 img_free(img); 672 img_free(img);
662 return; 673 return;
663 } 674 }
664 D("... img %p '%s' cached += %i", img , img->file.file, img->usage); 675 DBG("... img %p '%s' cached += %i", img , img->file.file, img->usage);
665 if (img->incache > 0) 676 if (img->incache > 0)
666 { 677 {
667 printf("EEEEEEEEEEEEEEEEK!\n"); 678 ERR("EEEEEEEEEEEEEEEEK!");
668 printf("EEEEEEEEEEEEEEEEK! %p '%s' already in cache\n", 679 ERR("EEEEEEEEEEEEEEEEK! %p '%s' already in cache",
669 img, img->file.file); 680 img, img->file.file);
670 printf("EEEEEEEEEEEEEEEEK!\n"); 681 ERR("EEEEEEEEEEEEEEEEK!");
671 return; 682 return;
672 } 683 }
673 LKL(cache_lock); 684 LKL(cache_lock);
@@ -729,8 +740,8 @@ img_load(const char *file, const char *key, RGBA_Image_Loadopts *load_opts)
729 Eina_List *l, *l_next; 740 Eina_List *l, *l_next;
730 741
731 if (!file) return NULL; 742 if (!file) return NULL;
732 D("... img_load '%s'", file); 743 DBG("... img_load '%s'", file);
733 if (key) D("... ... key '%s'", key); 744 if (key) DBG("... ... key '%s'", key);
734 if (key) 745 if (key)
735 snprintf(buf, sizeof(buf), "%s///::/%s/\001/%i/%1.8f/%ix%i", 746 snprintf(buf, sizeof(buf), "%s///::/%s/\001/%i/%1.8f/%ix%i",
736 file, key, 747 file, key,
@@ -743,16 +754,16 @@ img_load(const char *file, const char *key, RGBA_Image_Loadopts *load_opts)
743 load_opts->scale_down_by, 754 load_opts->scale_down_by,
744 load_opts->dpi, 755 load_opts->dpi,
745 load_opts->w, load_opts->h); 756 load_opts->w, load_opts->h);
746 D("... find '%s'", buf); 757 DBG("... find '%s'", buf);
747 img = eina_hash_find(active_images, buf); 758 img = eina_hash_find(active_images, buf);
748 if ((img) && (img_ok(img))) 759 if ((img) && (img_ok(img)))
749 { 760 {
750 D("... found!"); 761 DBG("... found!");
751 img->stats.load1saved++; 762 img->stats.load1saved++;
752 img->ref++; 763 img->ref++;
753 D("... sats update"); 764 DBG("... stats update");
754 stats_update(); 765 stats_update();
755 D("... return %p", img); 766 DBG("... return %p", img);
756 return img; 767 return img;
757 } 768 }
758 769
@@ -765,7 +776,7 @@ img_load(const char *file, const char *key, RGBA_Image_Loadopts *load_opts)
765 LKL(img->lock); 776 LKL(img->lock);
766 if (img_ok(img)) 777 if (img_ok(img))
767 { 778 {
768 D("... found cached"); 779 DBG("... found cached");
769 cache_images = eina_list_remove_list(cache_images, l); 780 cache_images = eina_list_remove_list(cache_images, l);
770 img->incache--; 781 img->incache--;
771 cache_usage -= img->usage; 782 cache_usage -= img->usage;
@@ -773,9 +784,9 @@ img_load(const char *file, const char *key, RGBA_Image_Loadopts *load_opts)
773 img->stats.load1saved++; 784 img->stats.load1saved++;
774 img->ref++; 785 img->ref++;
775 eina_hash_direct_add(active_images, img->key, img); 786 eina_hash_direct_add(active_images, img->key, img);
776 D("... sats update"); 787 DBG("... sats update");
777 stats_update(); 788 stats_update();
778 D("... return %p", img); 789 DBG("... return %p", img);
779 LKU(img->lock); 790 LKU(img->lock);
780 LKU(cache_lock); 791 LKU(cache_lock);
781 return img; 792 return img;
@@ -784,7 +795,7 @@ img_load(const char *file, const char *key, RGBA_Image_Loadopts *load_opts)
784 } 795 }
785 } 796 }
786 LKU(cache_lock); 797 LKU(cache_lock);
787 D("... ned new img"); 798 DBG("... ned new img");
788 return img_new(file, key, load_opts, buf); 799 return img_new(file, key, load_opts, buf);
789} 800}
790 801
@@ -793,17 +804,17 @@ img_unload(Img *img)
793{ 804{
794 if (img->ref == 0) 805 if (img->ref == 0)
795 { 806 {
796 printf("EEEEEEEEEEEEEEEEK!\n"); 807 ERR("EEEEEEEEEEEEEEEEK!");
797 printf("EEEEEEEEEEEEEEEEK! %p '%s' already @ ref 0\n", 808 ERR("EEEEEEEEEEEEEEEEK! %p '%s' already @ ref 0",
798 img, img->file.file); 809 img, img->file.file);
799 printf("EEEEEEEEEEEEEEEEK!\n"); 810 ERR("EEEEEEEEEEEEEEEEK!");
800 return; 811 return;
801 } 812 }
802 img->ref--; 813 img->ref--;
803 D("... img ref-- = %i", img->ref); 814 DBG("... img ref-- = %i", img->ref);
804 if (img->ref == 0) 815 if (img->ref == 0)
805 { 816 {
806 D("... img cache %p '%s'", img, img->file.file); 817 DBG("... img cache %p '%s'", img, img->file.file);
807 img_cache(img); 818 img_cache(img);
808 } 819 }
809} 820}
@@ -811,12 +822,12 @@ img_unload(Img *img)
811static void 822static void
812img_unloaddata(Img *img) 823img_unloaddata(Img *img)
813{ 824{
814 D("img_unloaddata() %p '%s'", img, img->file.file); 825 DBG("img_unloaddata() %p '%s'", img, img->file.file);
815 if ((img->dref <= 0) && (img->useless) && (img->mem)) 826 if ((img->dref <= 0) && (img->useless) && (img->mem))
816 { 827 {
817 Image_Entry *ie = (Image_Entry *)img; 828 Image_Entry *ie = (Image_Entry *)img;
818 829
819 D("... really do forced unload"); 830 DBG("... really do forced unload");
820 if (!img->active) cache_usage -= img->usage; 831 if (!img->active) cache_usage -= img->usage;
821 img->usage -= 832 img->usage -=
822 (4096 * (((img->image.w * img->image.h * sizeof(DATA32)) + 4095) / 4096)) + 833 (4096 * (((img->image.w * img->image.h * sizeof(DATA32)) + 4095) / 4096)) +
@@ -827,7 +838,7 @@ img_unloaddata(Img *img)
827 img->mem = NULL; 838 img->mem = NULL;
828 img->image.data = NULL; 839 img->image.data = NULL;
829 img->dref = 0; 840 img->dref = 0;
830 D("... done"); 841 DBG("... done");
831 842
832 ie->flags.loaded = 0; 843 ie->flags.loaded = 0;
833 ie->allocated.w = 0; 844 ie->allocated.w = 0;
@@ -838,7 +849,7 @@ img_unloaddata(Img *img)
838static void 849static void
839img_useless(Img *img) 850img_useless(Img *img)
840{ 851{
841 D("img_useless() %p", img); 852 DBG("img_useless() %p", img);
842 img->useless = 1; 853 img->useless = 1;
843 if (img->dref <= 0) img_unloaddata(img); 854 if (img->dref <= 0) img_unloaddata(img);
844} 855}
@@ -846,7 +857,7 @@ img_useless(Img *img)
846static void 857static void
847img_forcedunload(Img *img) 858img_forcedunload(Img *img)
848{ 859{
849 D("img_forcedunload() %p", img); 860 DBG("img_forcedunload() %p", img);
850 img->dead = 1; 861 img->dead = 1;
851 img_unload(img); 862 img_unload(img);
852} 863}
@@ -854,7 +865,7 @@ img_forcedunload(Img *img)
854static void 865static void
855img_preload(Img *img) 866img_preload(Img *img)
856{ 867{
857 D("img_preload() %p", img); 868 DBG("img_preload() %p", img);
858} 869}
859 870
860static void 871static void
@@ -864,12 +875,12 @@ client_del(void *data, Client *c)
864 Img *img; 875 Img *img;
865 876
866 images = data; 877 images = data;
867 D("... CLIENT DEL %i", c->pid); 878 DBG("... CLIENT DEL %i", c->pid);
868 EINA_LIST_FREE(images, img) 879 EINA_LIST_FREE(images, img)
869 { 880 {
870 D("... unloaddata img %p", img); 881 DBG("... unloaddata img %p", img);
871 img_unloaddata(img); 882 img_unloaddata(img);
872 D("... unload img %p", img); 883 DBG("... unload img %p", img);
873 img_unload(img); 884 img_unload(img);
874 } 885 }
875} 886}
@@ -903,7 +914,7 @@ load_data_thread(void *data)
903 msg.mem.id = img->mem->id; 914 msg.mem.id = img->mem->id;
904 msg.mem.offset = img->mem->offset; 915 msg.mem.offset = img->mem->offset;
905 msg.mem.size = img->mem->size; 916 msg.mem.size = img->mem->size;
906 D("... reply"); 917 DBG("... reply");
907 evas_cserve_client_send(c, OP_LOADDATA, sizeof(msg), (unsigned char *)(&msg)); 918 evas_cserve_client_send(c, OP_LOADDATA, sizeof(msg), (unsigned char *)(&msg));
908 LKU(c->lock); 919 LKU(c->lock);
909 return NULL; 920 return NULL;
@@ -919,7 +930,7 @@ load_data_thread(void *data)
919 else 930 else
920 msg.mem.id = msg.mem.offset = msg.mem.size = 0; 931 msg.mem.id = msg.mem.offset = msg.mem.size = 0;
921 LKU(img->lock); 932 LKU(img->lock);
922 D("... reply"); 933 DBG("... reply");
923 evas_cserve_client_send(c, OP_LOADDATA, sizeof(msg), (unsigned char *)(&msg)); 934 evas_cserve_client_send(c, OP_LOADDATA, sizeof(msg), (unsigned char *)(&msg));
924 LKU(c->lock); 935 LKU(c->lock);
925 return NULL; 936 return NULL;
@@ -930,7 +941,7 @@ static int
930message(void *fdata, Server *s, Client *c, int opcode, int size, unsigned char *data) 941message(void *fdata, Server *s, Client *c, int opcode, int size, unsigned char *data)
931{ 942{
932 t_now = time(NULL); 943 t_now = time(NULL);
933 D("message @ %i...", (int)t_now); 944 DBG("message @ %i...", (int)t_now);
934 switch (opcode) 945 switch (opcode)
935 { 946 {
936 case OP_INIT: 947 case OP_INIT:
@@ -950,8 +961,8 @@ message(void *fdata, Server *s, Client *c, int opcode, int size, unsigned char *
950 } 961 }
951 c->func = client_del; 962 c->func = client_del;
952 c->data = NULL; 963 c->data = NULL;
953 D("OP_INIT %i", c->pid); 964 DBG("OP_INIT %i", c->pid);
954 D("... reply"); 965 DBG("... reply");
955 evas_cserve_client_send(c, OP_INIT, sizeof(msg), (unsigned char *)(&msg)); 966 evas_cserve_client_send(c, OP_INIT, sizeof(msg), (unsigned char *)(&msg));
956 } 967 }
957 break; 968 break;
@@ -963,7 +974,7 @@ message(void *fdata, Server *s, Client *c, int opcode, int size, unsigned char *
963 RGBA_Image_Loadopts lopt = {0, 0.0, 0, 0, 0, 0, 0, 0}; 974 RGBA_Image_Loadopts lopt = {0, 0.0, 0, 0, 0, 0, 0, 0};
964 char *file = NULL, *key = NULL; 975 char *file = NULL, *key = NULL;
965 976
966 D("OP_LOAD %i", c->pid); 977 DBG("OP_LOAD %i", c->pid);
967 rep = (Op_Load *)data; 978 rep = (Op_Load *)data;
968 file = data + sizeof(Op_Load); 979 file = data + sizeof(Op_Load);
969 key = file + strlen(file) + 1; 980 key = file + strlen(file) + 1;
@@ -976,17 +987,17 @@ message(void *fdata, Server *s, Client *c, int opcode, int size, unsigned char *
976 lopt.region.y = rep->lopt.region.y; 987 lopt.region.y = rep->lopt.region.y;
977 lopt.region.w = rep->lopt.region.w; 988 lopt.region.w = rep->lopt.region.w;
978 lopt.region.h = rep->lopt.region.h; 989 lopt.region.h = rep->lopt.region.h;
979 D("... img_load '%s'", file); 990 DBG("... img_load '%s'", file);
980 if (key) D("'%s'", key); 991 if (key) DBG("'%s'", key);
981 else D(" '%s'", NULL); 992 else DBG(" '%s'", NULL);
982 D(" lopt { %i %1.1f %i %i { %i %i %i %i}}", 993 DBG(" lopt { %i %1.1f %i %i { %i %i %i %i}}",
983 lopt.scale_down_by, lopt.dpi, lopt.w, lopt.h, 994 lopt.scale_down_by, lopt.dpi, lopt.w, lopt.h,
984 lopt.region.x, lopt.region.y, lopt.region.w, lopt.region.h); 995 lopt.region.x, lopt.region.y, lopt.region.w, lopt.region.h);
985 img = img_load(file, key, &lopt); 996 img = img_load(file, key, &lopt);
986 D("... img_load = %p", img); 997 DBG("... img_load = %p", img);
987 if (img) 998 if (img)
988 { 999 {
989 D("... add image to client list"); 1000 DBG("... add image to client list");
990 if (c->client_main) 1001 if (c->client_main)
991 c->client_main->data = eina_list_append(c->client_main->data, img); 1002 c->client_main->data = eina_list_append(c->client_main->data, img);
992 else 1003 else
@@ -1010,7 +1021,7 @@ message(void *fdata, Server *s, Client *c, int opcode, int size, unsigned char *
1010 msg.image.h = img->image.h; 1021 msg.image.h = img->image.h;
1011 msg.image.alpha = img->image.alpha; 1022 msg.image.alpha = img->image.alpha;
1012 } 1023 }
1013 D("... reply"); 1024 DBG("... reply");
1014 evas_cserve_client_send(c, OP_LOAD, sizeof(msg), (unsigned char *)(&msg)); 1025 evas_cserve_client_send(c, OP_LOAD, sizeof(msg), (unsigned char *)(&msg));
1015 } 1026 }
1016 break; 1027 break;
@@ -1019,19 +1030,19 @@ message(void *fdata, Server *s, Client *c, int opcode, int size, unsigned char *
1019 Op_Unload *rep; 1030 Op_Unload *rep;
1020 Img *img; 1031 Img *img;
1021 1032
1022 D("OP_UNLOAD %i", c->pid); 1033 DBG("OP_UNLOAD %i", c->pid);
1023 rep = (Op_Unload *)data; 1034 rep = (Op_Unload *)data;
1024 img = rep->handle; 1035 img = rep->handle;
1025 if ((img) && (rep->server_id == server_id)) 1036 if ((img) && (rep->server_id == server_id))
1026 { 1037 {
1027 Eina_Bool doflush = 0; 1038 Eina_Bool doflush = 0;
1028 1039
1029 D("... remove %p from list", img); 1040 DBG("... remove %p from list", img);
1030 if (c->client_main) 1041 if (c->client_main)
1031 c->client_main->data = eina_list_remove(c->client_main->data, img); 1042 c->client_main->data = eina_list_remove(c->client_main->data, img);
1032 else 1043 else
1033 c->data = eina_list_remove(c->data, img); 1044 c->data = eina_list_remove(c->data, img);
1034 D("... unload %p", img); 1045 DBG("... unload %p", img);
1035 LKL(img->lock); 1046 LKL(img->lock);
1036 img->ref++; 1047 img->ref++;
1037 img_unload(img); 1048 img_unload(img);
@@ -1050,14 +1061,14 @@ message(void *fdata, Server *s, Client *c, int opcode, int size, unsigned char *
1050 Op_Loaddata_Reply msg; 1061 Op_Loaddata_Reply msg;
1051 Img *img; 1062 Img *img;
1052 1063
1053 D("OP_LOADDATA %i", c->pid); 1064 DBG("OP_LOADDATA %i", c->pid);
1054 rep = (Op_Loaddata *)data; 1065 rep = (Op_Loaddata *)data;
1055 img = rep->handle; 1066 img = rep->handle;
1056 if ((img) && (rep->server_id == server_id)) 1067 if ((img) && (rep->server_id == server_id))
1057 { 1068 {
1058 if (img->mem) 1069 if (img->mem)
1059 { 1070 {
1060 D("... load saved - cached %p", img); 1071 DBG("... load saved - cached %p", img);
1061 img->stats.load2saved++; 1072 img->stats.load2saved++;
1062 stats_update(); 1073 stats_update();
1063 memset(&msg, 0, sizeof(msg)); 1074 memset(&msg, 0, sizeof(msg));
@@ -1069,7 +1080,7 @@ message(void *fdata, Server *s, Client *c, int opcode, int size, unsigned char *
1069 } 1080 }
1070 else 1081 else
1071 msg.mem.id = msg.mem.offset = msg.mem.size = 0; 1082 msg.mem.id = msg.mem.offset = msg.mem.size = 0;
1072 D("... reply"); 1083 DBG("... reply");
1073 evas_cserve_client_send(c, OP_LOADDATA, sizeof(msg), (unsigned char *)(&msg)); 1084 evas_cserve_client_send(c, OP_LOADDATA, sizeof(msg), (unsigned char *)(&msg));
1074 } 1085 }
1075 else 1086 else
@@ -1079,7 +1090,7 @@ message(void *fdata, Server *s, Client *c, int opcode, int size, unsigned char *
1079 pthread_attr_t attr; 1090 pthread_attr_t attr;
1080 Load_Inf *li; 1091 Load_Inf *li;
1081 1092
1082 D("... load data %p", img); 1093 DBG("... load data %p", img);
1083 pthread_attr_init(&attr); 1094 pthread_attr_init(&attr);
1084 li = calloc(1, sizeof(Load_Inf)); 1095 li = calloc(1, sizeof(Load_Inf));
1085 if (li) 1096 if (li)
@@ -1106,7 +1117,7 @@ message(void *fdata, Server *s, Client *c, int opcode, int size, unsigned char *
1106 } 1117 }
1107 else 1118 else
1108 msg.mem.id = msg.mem.offset = msg.mem.size = 0; 1119 msg.mem.id = msg.mem.offset = msg.mem.size = 0;
1109 D("... reply"); 1120 DBG("... reply");
1110 evas_cserve_client_send(c, OP_LOADDATA, sizeof(msg), (unsigned char *)(&msg)); 1121 evas_cserve_client_send(c, OP_LOADDATA, sizeof(msg), (unsigned char *)(&msg));
1111#endif 1122#endif
1112 } 1123 }
@@ -1123,16 +1134,16 @@ message(void *fdata, Server *s, Client *c, int opcode, int size, unsigned char *
1123 Op_Unloaddata *rep; 1134 Op_Unloaddata *rep;
1124 Img *img; 1135 Img *img;
1125 1136
1126 D("OP_UNLOADDATA %i", c->pid); 1137 DBG("OP_UNLOADDATA %i", c->pid);
1127 rep = (Op_Unloaddata *)data; 1138 rep = (Op_Unloaddata *)data;
1128 img = rep->handle; 1139 img = rep->handle;
1129 if ((img) && (rep->server_id == server_id)) 1140 if ((img) && (rep->server_id == server_id))
1130 { 1141 {
1131 D("... dref--"); 1142 DBG("... dref--");
1132 LKL(img->lock); 1143 LKL(img->lock);
1133 img->dref--; 1144 img->dref--;
1134 if (img->dref < 0) img->dref = 0; 1145 if (img->dref < 0) img->dref = 0;
1135 D("... unload data %p '%s'", img, img->file.file); 1146 DBG("... unload data %p '%s'", img, img->file.file);
1136 img_unloaddata(img); 1147 img_unloaddata(img);
1137 LKU(img->lock); 1148 LKU(img->lock);
1138 } 1149 }
@@ -1143,16 +1154,16 @@ message(void *fdata, Server *s, Client *c, int opcode, int size, unsigned char *
1143 Op_Unloaddata *rep; 1154 Op_Unloaddata *rep;
1144 Img *img; 1155 Img *img;
1145 1156
1146 D("OP_USELESSDATA %i", c->pid); 1157 DBG("OP_USELESSDATA %i", c->pid);
1147 rep = (Op_Unloaddata *)data; 1158 rep = (Op_Unloaddata *)data;
1148 img = rep->handle; 1159 img = rep->handle;
1149 if ((img) && (rep->server_id == server_id)) 1160 if ((img) && (rep->server_id == server_id))
1150 { 1161 {
1151 D("... dref--"); 1162 DBG("... dref--");
1152 LKL(img->lock); 1163 LKL(img->lock);
1153 img->dref--; 1164 img->dref--;
1154 if (img->dref < 0) img->dref = 0; 1165 if (img->dref < 0) img->dref = 0;
1155 D("... useless %p", img); 1166 DBG("... useless %p", img);
1156 img_useless(img); 1167 img_useless(img);
1157 LKU(img->lock); 1168 LKU(img->lock);
1158 } 1169 }
@@ -1163,7 +1174,7 @@ message(void *fdata, Server *s, Client *c, int opcode, int size, unsigned char *
1163 Op_Preload *rep; 1174 Op_Preload *rep;
1164 Img *img; 1175 Img *img;
1165 1176
1166 D("OP_PRELOAD %i", c->pid); 1177 DBG("OP_PRELOAD %i", c->pid);
1167 rep = (Op_Preload *)data; 1178 rep = (Op_Preload *)data;
1168 img = rep->handle; 1179 img = rep->handle;
1169 if ((img) && (rep->server_id == server_id)) 1180 if ((img) && (rep->server_id == server_id))
@@ -1183,7 +1194,7 @@ message(void *fdata, Server *s, Client *c, int opcode, int size, unsigned char *
1183 Op_Forcedunload *rep; 1194 Op_Forcedunload *rep;
1184 Img *img; 1195 Img *img;
1185 1196
1186 D("OP_FORCEDUNLOAD %i", c->pid); 1197 DBG("OP_FORCEDUNLOAD %i", c->pid);
1187 rep = (Op_Forcedunload *)data; 1198 rep = (Op_Forcedunload *)data;
1188 img = rep->handle; 1199 img = rep->handle;
1189 if ((img) && (rep->server_id == server_id)) 1200 if ((img) && (rep->server_id == server_id))
@@ -1191,12 +1202,12 @@ message(void *fdata, Server *s, Client *c, int opcode, int size, unsigned char *
1191 Eina_Bool doflush = 0; 1202 Eina_Bool doflush = 0;
1192 1203
1193 LKL(img->lock); 1204 LKL(img->lock);
1194 D("remove %p from list", img); 1205 DBG("remove %p from list", img);
1195 if (c->client_main) 1206 if (c->client_main)
1196 c->client_main->data = eina_list_remove(c->client_main->data, img); 1207 c->client_main->data = eina_list_remove(c->client_main->data, img);
1197 else 1208 else
1198 c->data = eina_list_remove(c->data, img); 1209 c->data = eina_list_remove(c->data, img);
1199 D("... forced unload now"); 1210 DBG("... forced unload now");
1200 img->ref++; 1211 img->ref++;
1201 img_forcedunload(img); 1212 img_forcedunload(img);
1202 img->ref--; 1213 img->ref--;
@@ -1212,11 +1223,11 @@ message(void *fdata, Server *s, Client *c, int opcode, int size, unsigned char *
1212 { 1223 {
1213 Op_Getconfig_Reply msg; 1224 Op_Getconfig_Reply msg;
1214 1225
1215 D("OP_GETCONFIG %i", c->pid); 1226 DBG("OP_GETCONFIG %i", c->pid);
1216 msg.cache_max_usage = cache_max_usage; 1227 msg.cache_max_usage = cache_max_usage;
1217 msg.cache_item_timeout = cache_item_timeout; 1228 msg.cache_item_timeout = cache_item_timeout;
1218 msg.cache_item_timeout_check = cache_item_timeout_check; 1229 msg.cache_item_timeout_check = cache_item_timeout_check;
1219 D("... reply"); 1230 DBG("... reply");
1220 evas_cserve_client_send(c, OP_GETCONFIG, sizeof(msg), (unsigned char *)(&msg)); 1231 evas_cserve_client_send(c, OP_GETCONFIG, sizeof(msg), (unsigned char *)(&msg));
1221 } 1232 }
1222 break; 1233 break;
@@ -1224,14 +1235,14 @@ message(void *fdata, Server *s, Client *c, int opcode, int size, unsigned char *
1224 { 1235 {
1225 Op_Setconfig *rep; 1236 Op_Setconfig *rep;
1226 1237
1227 D("OP_SETCONFIG %i", c->pid); 1238 DBG("OP_SETCONFIG %i", c->pid);
1228 rep = (Op_Setconfig *)data; 1239 rep = (Op_Setconfig *)data;
1229 cache_max_usage = rep->cache_max_usage; 1240 cache_max_usage = rep->cache_max_usage;
1230 cache_item_timeout = rep->cache_item_timeout; 1241 cache_item_timeout = rep->cache_item_timeout;
1231 cache_item_timeout_check = rep->cache_item_timeout_check; 1242 cache_item_timeout_check = rep->cache_item_timeout_check;
1232 D("... cache timeout"); 1243 DBG("... cache timeout");
1233 cache_timeout(t_now); 1244 cache_timeout(t_now);
1234 D("... cache clean"); 1245 DBG("... cache clean");
1235 cache_clean(); 1246 cache_clean();
1236 } 1247 }
1237 break; 1248 break;
@@ -1239,7 +1250,7 @@ message(void *fdata, Server *s, Client *c, int opcode, int size, unsigned char *
1239 { 1250 {
1240 Op_Getstats_Reply msg; 1251 Op_Getstats_Reply msg;
1241 1252
1242 D("OP_GETSTATS %i", c->pid); 1253 DBG("OP_GETSTATS %i", c->pid);
1243 stats_calc(); 1254 stats_calc();
1244 msg.saved_memory = saved_memory; 1255 msg.saved_memory = saved_memory;
1245 msg.wasted_memory = (real_memory - alloced_memory); 1256 msg.wasted_memory = (real_memory - alloced_memory);
@@ -1247,7 +1258,7 @@ message(void *fdata, Server *s, Client *c, int opcode, int size, unsigned char *
1247 msg.wasted_memory_peak = (real_memory_peak - alloced_memory_peak); 1258 msg.wasted_memory_peak = (real_memory_peak - alloced_memory_peak);
1248 msg.saved_time_image_header_load = saved_load_lifetime + saved_load_time; 1259 msg.saved_time_image_header_load = saved_load_lifetime + saved_load_time;
1249 msg.saved_time_image_data_load = saved_loaddata_lifetime + saved_loaddata_time; 1260 msg.saved_time_image_data_load = saved_loaddata_lifetime + saved_loaddata_time;
1250 D("... reply"); 1261 DBG("... reply");
1251 evas_cserve_client_send(c, OP_GETSTATS, sizeof(msg), (unsigned char *)(&msg)); 1262 evas_cserve_client_send(c, OP_GETSTATS, sizeof(msg), (unsigned char *)(&msg));
1252 } 1263 }
1253 break; 1264 break;
@@ -1258,19 +1269,19 @@ message(void *fdata, Server *s, Client *c, int opcode, int size, unsigned char *
1258 Eina_List *imgs = NULL, *l; 1269 Eina_List *imgs = NULL, *l;
1259 Img *img; 1270 Img *img;
1260 1271
1261 D("OP_GETINFO %i", c->pid); 1272 DBG("OP_GETINFO %i", c->pid);
1262 len = sizeof(Op_Getinfo_Reply); 1273 len = sizeof(Op_Getinfo_Reply);
1263 D("... foreach"); 1274 DBG("... foreach");
1264 if (active_images) 1275 if (active_images)
1265 eina_hash_foreach(active_images, getinfo_hash_image_cb, &imgs); 1276 eina_hash_foreach(active_images, getinfo_hash_image_cb, &imgs);
1266 D("... walk foreach list output"); 1277 DBG("... walk foreach list output");
1267 LKL(cache_lock); 1278 LKL(cache_lock);
1268 EINA_LIST_FOREACH(cache_images, l, img) 1279 EINA_LIST_FOREACH(cache_images, l, img)
1269 { 1280 {
1270 imgs = eina_list_append(imgs, img); 1281 imgs = eina_list_append(imgs, img);
1271 } 1282 }
1272 LKU(cache_lock); 1283 LKU(cache_lock);
1273 D("... walk image cache"); 1284 DBG("... walk image cache");
1274 EINA_LIST_FOREACH(imgs, l, img) 1285 EINA_LIST_FOREACH(imgs, l, img)
1275 { 1286 {
1276 len += sizeof(Op_Getinfo_Item); 1287 len += sizeof(Op_Getinfo_Item);
@@ -1279,13 +1290,13 @@ message(void *fdata, Server *s, Client *c, int opcode, int size, unsigned char *
1279 if (img->file.key) len += strlen(img->file.key); 1290 if (img->file.key) len += strlen(img->file.key);
1280 len++; 1291 len++;
1281 } 1292 }
1282 D("... malloc msg"); 1293 DBG("... malloc msg");
1283 msg = malloc(len); 1294 msg = malloc(len);
1284 if (msg) 1295 if (msg)
1285 { 1296 {
1286 unsigned char *p; 1297 unsigned char *p;
1287 1298
1288 D("... init msg"); 1299 DBG("... init msg");
1289 memset(msg, 0, len); 1300 memset(msg, 0, len);
1290 p = (unsigned char *)msg; 1301 p = (unsigned char *)msg;
1291 msg->active.mem_total = 0; 1302 msg->active.mem_total = 0;
@@ -1293,13 +1304,13 @@ message(void *fdata, Server *s, Client *c, int opcode, int size, unsigned char *
1293 msg->cached.mem_total = 0; 1304 msg->cached.mem_total = 0;
1294 msg->cached.count = 0; 1305 msg->cached.count = 0;
1295 p += sizeof(Op_Getinfo_Reply); 1306 p += sizeof(Op_Getinfo_Reply);
1296 D("... walk all imgs"); 1307 DBG("... walk all imgs");
1297 EINA_LIST_FOREACH(imgs, l, img) 1308 EINA_LIST_FOREACH(imgs, l, img)
1298 { 1309 {
1299 Op_Getinfo_Item *itt, it; 1310 Op_Getinfo_Item *itt, it;
1300 1311
1301 LKL(img->lock); 1312 LKL(img->lock);
1302 D("... img %p", img); 1313 DBG("... img %p", img);
1303 memset(&it, 0, sizeof(Op_Getinfo_Item)); 1314 memset(&it, 0, sizeof(Op_Getinfo_Item));
1304 itt = (Op_Getinfo_Item *)p; 1315 itt = (Op_Getinfo_Item *)p;
1305 it.file_key_size = 0; 1316 it.file_key_size = 0;
@@ -1349,33 +1360,33 @@ message(void *fdata, Server *s, Client *c, int opcode, int size, unsigned char *
1349 } 1360 }
1350 it.dead = img->dead; 1361 it.dead = img->dead;
1351 it.useless = img->useless; 1362 it.useless = img->useless;
1352 D("... memcpy %p %p %i ", 1363 DBG("... memcpy %p %p %i ",
1353 itt, &it, sizeof(Op_Getinfo_Item)); 1364 itt, &it, sizeof(Op_Getinfo_Item));
1354 memcpy(itt, &it, sizeof(Op_Getinfo_Item)); 1365 memcpy(itt, &it, sizeof(Op_Getinfo_Item));
1355 D("... memcpy done n", img); 1366 DBG("... memcpy done n", img);
1356 p += sizeof(Op_Getinfo_Item) + it.file_key_size; 1367 p += sizeof(Op_Getinfo_Item) + it.file_key_size;
1357 LKU(img->lock); 1368 LKU(img->lock);
1358 } 1369 }
1359 D("... walk all imgs done"); 1370 DBG("... walk all imgs done");
1360 msg->active.mem_total = 1371 msg->active.mem_total =
1361 (msg->active.mem_total + 1023) / 1024; 1372 (msg->active.mem_total + 1023) / 1024;
1362 msg->cached.mem_total = 1373 msg->cached.mem_total =
1363 (msg->cached.mem_total + 1023) / 1024; 1374 (msg->cached.mem_total + 1023) / 1024;
1364 D("... reply"); 1375 DBG("... reply");
1365 evas_cserve_client_send(c, OP_GETINFO, len, msg); 1376 evas_cserve_client_send(c, OP_GETINFO, len, msg);
1366 free(msg); 1377 free(msg);
1367 } 1378 }
1368 else 1379 else
1369 { 1380 {
1370 D("... reply empty"); 1381 DBG("... reply empty");
1371 evas_cserve_client_send(c, OP_GETINFO, 0, NULL); 1382 evas_cserve_client_send(c, OP_GETINFO, 0, NULL);
1372 } 1383 }
1373 D("... free imgs list"); 1384 DBG("... free imgs list");
1374 if (imgs) eina_list_free(imgs); 1385 if (imgs) eina_list_free(imgs);
1375 } 1386 }
1376 break; 1387 break;
1377 default: 1388 default:
1378 D("OP_... UNKNOWN??? %i opcode: %i", c->pid, opcode); 1389 DBG("OP_... UNKNOWN??? %i opcode: %i", c->pid, opcode);
1379 break; 1390 break;
1380 } 1391 }
1381 return 0; 1392 return 0;
@@ -1500,59 +1511,65 @@ main(int argc, char **argv)
1500 1511
1501 unsetenv("EVAS_CSERVE"); 1512 unsetenv("EVAS_CSERVE");
1502 1513
1503 D("eina init..."); 1514 DBG("eina init...");
1504 eina_init(); 1515 eina_init();
1505 D("evas init..."); 1516 _evas_cserve_bin_log_dom = eina_log_domain_register("Evas_cserve_bin", CSERVE_BIN_DEFAULT_COLOR);
1517 if(_evas_cserve_bin_log_dom < 0) {
1518 DBG("Problem with eina_log : impossible to create a log domain");
1519 eina_shutdown();
1520 exit(1);
1521 }
1522
1523 DBG("evas init...");
1506 evas_init(); 1524 evas_init();
1507 1525 DBG("img init...");
1508 D("img init...");
1509 img_init(); 1526 img_init();
1510 D("signal init..."); 1527 DBG("signal init...");
1511 signal_init(); 1528 signal_init();
1512 D("cserve add..."); 1529 DBG("cserve add...");
1513 s = evas_cserve_server_add(); 1530 s = evas_cserve_server_add();
1514 if (!s) 1531 if (!s)
1515 { 1532 {
1516 printf("ERROR: server socket init fail. abort."); 1533 ERR("ERROR: server socket init fail. abort.");
1517 goto error; 1534 goto error;
1518 } 1535 }
1519 D("mem open (status)..."); 1536 DBG("mem open (status)...");
1520 stat_mem = evas_cserve_mem_open(0, 0, "status", sizeof(int), 0); 1537 stat_mem = evas_cserve_mem_open(0, 0, "status", sizeof(int), 0);
1521 if (stat_mem) 1538 if (stat_mem)
1522 { 1539 {
1523 printf("WARNING: previous evas_cserve left garbage. cleaning up."); 1540 WRN("WARNING: previous evas_cserve left garbage. cleaning up.");
1524 stat_clean(stat_mem); 1541 stat_clean(stat_mem);
1525 evas_cserve_mem_close(stat_mem); 1542 evas_cserve_mem_close(stat_mem);
1526 stat_mem = NULL; 1543 stat_mem = NULL;
1527 } 1544 }
1528 D("mem new (status)..."); 1545 DBG("mem new (status)...");
1529 stat_mem = evas_cserve_mem_new(sizeof(int), "status"); 1546 stat_mem = evas_cserve_mem_new(sizeof(int), "status");
1530 if (!stat_mem) 1547 if (!stat_mem)
1531 { 1548 {
1532 printf("ERROR: cannot create status shmseg. abort."); 1549 ERR("ERROR: cannot create status shmseg. abort.");
1533 goto error; 1550 goto error;
1534 } 1551 }
1535 D("init status..."); 1552 DBG("init status...");
1536 if (!stat_init(stat_mem)) 1553 if (!stat_init(stat_mem))
1537 { 1554 {
1538 printf("ERROR: cannot init status shmseg. abort."); 1555 ERR("cannot init status shmseg. abort.");
1539 evas_cserve_mem_free(stat_mem); 1556 evas_cserve_mem_free(stat_mem);
1540 stat_mem = NULL; 1557 stat_mem = NULL;
1541 goto error; 1558 goto error;
1542 } 1559 }
1543 1560
1544 D("cset server message handler..."); 1561 DBG("cset server message handler...");
1545 evas_cserve_server_message_handler_set(s, message, NULL); 1562 evas_cserve_server_message_handler_set(s, message, NULL);
1546 last_check = time(NULL); 1563 last_check = time(NULL);
1547 t_next = 0; 1564 t_next = 0;
1548 if (cache_item_timeout_check > 0) t_next = cache_item_timeout_check; 1565 if (cache_item_timeout_check > 0) t_next = cache_item_timeout_check;
1549 D("LOOP!!! ..."); 1566 DBG("LOOP!!! ...");
1550 for (;;) 1567 for (;;)
1551 { 1568 {
1552 /* fixme: timeout 0 only her - future use timeouts for timed 1569 /* fixme: timeout 0 only her - future use timeouts for timed
1553 * housekeping */ 1570 * housekeping */
1554 if (exit_flag) break; 1571 if (exit_flag) break;
1555 D("wait for messages..."); 1572 DBG("wait for messages...");
1556 evas_cserve_server_wait(s, t_next * 1000000); 1573 evas_cserve_server_wait(s, t_next * 1000000);
1557 if (exit_flag) break; 1574 if (exit_flag) break;
1558 t = time(NULL); 1575 t = time(NULL);
@@ -1560,20 +1577,20 @@ main(int argc, char **argv)
1560 if ((cache_item_timeout_check > 0) && 1577 if ((cache_item_timeout_check > 0) &&
1561 ((t_next) >= cache_item_timeout_check)) 1578 ((t_next) >= cache_item_timeout_check))
1562 { 1579 {
1563 D("check timeout of items..."); 1580 DBG("check timeout of items...");
1564 t_next = cache_item_timeout_check; 1581 t_next = cache_item_timeout_check;
1565 1582
1566 last_check = t; 1583 last_check = t;
1567 D("cache timeout..."); 1584 DBG("cache timeout...");
1568 cache_timeout(t); 1585 cache_timeout(t);
1569 D("meminfo check..."); 1586 DBG("meminfo check...");
1570 meminfo_check(); 1587 meminfo_check();
1571 D("mem cache adjust..."); 1588 DBG("mem cache adjust...");
1572 mem_cache_adjust(); 1589 mem_cache_adjust();
1573 } 1590 }
1574 if ((t_next <= 0) && (cache_item_timeout_check > 0)) 1591 if ((t_next <= 0) && (cache_item_timeout_check > 0))
1575 t_next = 1; 1592 t_next = 1;
1576 D("sleep for %isec...", t_next); 1593 DBG("sleep for %isec...", t_next);
1577 1594
1578 LKL(strshr_freeme_lock); 1595 LKL(strshr_freeme_lock);
1579 if (strshr_freeme_count > 0) 1596 if (strshr_freeme_count > 0)
@@ -1608,40 +1625,41 @@ main(int argc, char **argv)
1608 cache_images = eina_list_remove(cache_images, img); 1625 cache_images = eina_list_remove(cache_images, img);
1609 img->incache--; 1626 img->incache--;
1610 cache_usage -= img->usage; 1627 cache_usage -= img->usage;
1611 D("... IMG FREE %p", img); 1628 DBG("... IMG FREE %p", img);
1612 img_free(img); 1629 img_free(img);
1613 } 1630 }
1614 cache_cleanme = 0; 1631 cache_cleanme = 0;
1615 } 1632 }
1616 LKU(cache_lock); 1633 LKU(cache_lock);
1617 } 1634 }
1618 D("end loop..."); 1635 DBG("end loop...");
1619 error: 1636 error:
1620 D("cleanup..."); 1637 DBG("cleanup...");
1621 if (stat_mem) 1638 if (stat_mem)
1622 { 1639 {
1623 D("clean mem stat..."); 1640 DBG("clean mem stat...");
1624 stat_clean(stat_mem); 1641 stat_clean(stat_mem);
1625 } 1642 }
1626 D("signal shutdown..."); 1643 DBG("signal shutdown...");
1627 signal_shutdown(); 1644 signal_shutdown();
1628 D("img shutdown..."); 1645 DBG("img shutdown...");
1629 img_shutdown(); 1646 img_shutdown();
1630 if (stat_mem) 1647 if (stat_mem)
1631 { 1648 {
1632 D("free stat mem..."); 1649 DBG("free stat mem...");
1633 evas_cserve_mem_free(stat_mem); 1650 evas_cserve_mem_free(stat_mem);
1634 stat_mem = NULL; 1651 stat_mem = NULL;
1635 } 1652 }
1636 if (s) 1653 if (s)
1637 { 1654 {
1638 D("del server..."); 1655 DBG("del server...");
1639 evas_cserve_server_del(s); 1656 evas_cserve_server_del(s);
1640 } 1657 }
1641 D("evas shutdown..."); 1658 DBG("evas shutdown...");
1642 evas_shutdown(); 1659 evas_shutdown();
1643 D("eina shutdown..."); 1660 eina_log_domain_unregister(_evas_cserve_bin_log_dom);
1661 DBG("eina shutdown...");
1644 eina_shutdown(); 1662 eina_shutdown();
1645 D("exit.."); 1663 DBG("exit..");
1646 return 0; 1664 return 0;
1647} 1665}
diff --git a/legacy/evas/src/bin/evas_cserve_tool.c b/legacy/evas/src/bin/evas_cserve_tool.c
index fd5f71c8ef..4a4af96a69 100644
--- a/legacy/evas/src/bin/evas_cserve_tool.c
+++ b/legacy/evas/src/bin/evas_cserve_tool.c
@@ -4,6 +4,8 @@
4 4
5#include "evas_cs.h" 5#include "evas_cs.h"
6 6
7int _cserve_tool_log_dom = -1;
8
7int 9int
8main(int argc, char **argv) 10main(int argc, char **argv)
9{ 11{
diff --git a/legacy/evas/src/lib/canvas/evas_events.c b/legacy/evas/src/lib/canvas/evas_events.c
index 883fd62b01..64d2a1d10b 100644
--- a/legacy/evas/src/lib/canvas/evas_events.c
+++ b/legacy/evas/src/lib/canvas/evas_events.c
@@ -398,13 +398,13 @@ evas_event_feed_mouse_up(Evas *e, int b, Evas_Button_Flags flags, unsigned int t
398 398
399 if (e->pointer.mouse_grabbed < 0) 399 if (e->pointer.mouse_grabbed < 0)
400 { 400 {
401 fprintf(stderr, "BUG? e->pointer.mouse_grabbed (=%d) < 0!\n", 401 ERROR("BUG? e->pointer.mouse_grabbed (=%d) < 0!",
402 e->pointer.mouse_grabbed); 402 e->pointer.mouse_grabbed);
403 } 403 }
404 404
405 if ((e->pointer.button == 0) && (e->pointer.mouse_grabbed != 0)) 405 if ((e->pointer.button == 0) && (e->pointer.mouse_grabbed != 0))
406 { 406 {
407 printf("restore to 0 grabs (from %i)\n", e->pointer.mouse_grabbed); 407 INFO("restore to 0 grabs (from %i)", e->pointer.mouse_grabbed);
408 e->pointer.mouse_grabbed = 0; 408 e->pointer.mouse_grabbed = 0;
409 } 409 }
410 _evas_unwalk(e); 410 _evas_unwalk(e);
diff --git a/legacy/evas/src/lib/canvas/evas_font_dir.c b/legacy/evas/src/lib/canvas/evas_font_dir.c
index 72d4475cf7..2d2fe47bf6 100644
--- a/legacy/evas/src/lib/canvas/evas_font_dir.c
+++ b/legacy/evas/src/lib/canvas/evas_font_dir.c
@@ -394,7 +394,7 @@ evas_font_load(Evas *evas, const char *name, const char *source, int size)
394 set = FcFontSort(NULL, p_nm, FcTrue, NULL, &res); 394 set = FcFontSort(NULL, p_nm, FcTrue, NULL, &res);
395 if (!set) 395 if (!set)
396 { 396 {
397 fprintf(stderr, "ERROR: no fontconfig font matches '%s'. It was the last resource, no font found!\n", name); 397 ERROR("No fontconfig font matches '%s'. It was the last resource, no font found!", name);
398 goto fc_end; 398 goto fc_end;
399 } 399 }
400 400
diff --git a/legacy/evas/src/lib/canvas/evas_main.c b/legacy/evas/src/lib/canvas/evas_main.c
index 26b3ea52cb..0e4a74ea91 100644
--- a/legacy/evas/src/lib/canvas/evas_main.c
+++ b/legacy/evas/src/lib/canvas/evas_main.c
@@ -3,7 +3,7 @@
3#include "evas_cs.h" 3#include "evas_cs.h"
4 4
5static int initcount = 0; 5static int initcount = 0;
6 6int _evas_log_dom_global = -1;
7/** 7/**
8 * Initialize Evas 8 * Initialize Evas
9 * 9 *
@@ -22,6 +22,13 @@ evas_init(void)
22 { 22 {
23 if (!eina_init()) 23 if (!eina_init())
24 return 0; 24 return 0;
25 _evas_log_dom_global = eina_log_domain_register("evas_main",EVAS_DEFAULT_LOG_COLOR);
26 if(_evas_log_dom_global < 0)
27 {
28 fprintf(stderr,"Error: Evas could not create a default log domain\n");
29 eina_shutdown();
30 return 0;
31 }
25 evas_module_init(); 32 evas_module_init();
26#ifdef BUILD_ASYNC_EVENTS 33#ifdef BUILD_ASYNC_EVENTS
27 if (!evas_async_events_init()) 34 if (!evas_async_events_init())
@@ -36,6 +43,7 @@ evas_init(void)
36#ifdef BUILD_ASYNC_EVENTS 43#ifdef BUILD_ASYNC_EVENTS
37 shutdown_module: 44 shutdown_module:
38 evas_module_shutdown(); 45 evas_module_shutdown();
46 eina_log_domain_unregister(_evas_log_dom_global);
39 eina_shutdown(); 47 eina_shutdown();
40 48
41 return 0; 49 return 0;
@@ -69,6 +77,7 @@ evas_shutdown(void)
69 evas_font_dir_cache_free(); 77 evas_font_dir_cache_free();
70 evas_common_shutdown(); 78 evas_common_shutdown();
71 evas_module_shutdown(); 79 evas_module_shutdown();
80 eina_log_domain_unregister(_evas_log_dom_global);
72 eina_shutdown(); 81 eina_shutdown();
73 } 82 }
74 return initcount; 83 return initcount;
@@ -477,7 +486,7 @@ evas_output_viewport_set(Evas *e, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas
477 if (h <= 0) return; 486 if (h <= 0) return;
478 if ((x != 0) || (y != 0)) 487 if ((x != 0) || (y != 0))
479 { 488 {
480 printf("EVAS: compat error. viewport x,y != 0,0 not supported\n"); 489 ERROR("EVAS: compat error. viewport x,y != 0,0 not supported");
481 x = 0; 490 x = 0;
482 y = 0; 491 y = 0;
483 } 492 }
diff --git a/legacy/evas/src/lib/canvas/evas_object_box.c b/legacy/evas/src/lib/canvas/evas_object_box.c
index 374a3df04e..47f03e3956 100644
--- a/legacy/evas/src/lib/canvas/evas_object_box.c
+++ b/legacy/evas/src/lib/canvas/evas_object_box.c
@@ -32,8 +32,8 @@ struct _Evas_Object_Box_Accessor
32 EVAS_OBJECT_BOX_DATA_GET(o, ptr); \ 32 EVAS_OBJECT_BOX_DATA_GET(o, ptr); \
33 if (!ptr) \ 33 if (!ptr) \
34 { \ 34 { \
35 fprintf(stderr, "CRITICAL: no widget data for object %p (%s)\n", \ 35 CRITICAL("no widget data for object %p (%s)", \
36 o, evas_object_type_get(o)); \ 36 o, evas_object_type_get(o)); \
37 fflush(stderr); \ 37 fflush(stderr); \
38 abort(); \ 38 abort(); \
39 return; \ 39 return; \
@@ -43,7 +43,7 @@ struct _Evas_Object_Box_Accessor
43 EVAS_OBJECT_BOX_DATA_GET(o, ptr); \ 43 EVAS_OBJECT_BOX_DATA_GET(o, ptr); \
44 if (!ptr) \ 44 if (!ptr) \
45 { \ 45 { \
46 fprintf(stderr, "CRITICAL: no widget data for object %p (%s)\n", \ 46 CRITICAL("no widget data for object %p (%s)", \
47 o, evas_object_type_get(o)); \ 47 o, evas_object_type_get(o)); \
48 fflush(stderr); \ 48 fflush(stderr); \
49 abort(); \ 49 abort(); \
@@ -355,7 +355,7 @@ _evas_object_box_remove_at_default(Evas_Object *o, Evas_Object_Box_Data *priv, u
355 node = eina_list_nth_list(priv->children, pos); 355 node = eina_list_nth_list(priv->children, pos);
356 if (!node) 356 if (!node)
357 { 357 {
358 fprintf(stderr, "ERROR: no item to be removed at position %d\n", pos); 358 ERROR("ERROR: no item to be removed at position %d\n", pos);
359 return NULL; 359 return NULL;
360 } 360 }
361 361
@@ -451,7 +451,7 @@ _evas_object_box_smart_calculate(Evas_Object *o)
451 if (priv->layout.cb) 451 if (priv->layout.cb)
452 priv->layout.cb(o, priv, priv->layout.data); 452 priv->layout.cb(o, priv, priv->layout.data);
453 else 453 else
454 fprintf(stderr, "ERROR: no layout function set for %p box.\n", o); 454 ERROR("No layout function set for %p box.", o);
455} 455}
456 456
457static Evas_Smart * 457static Evas_Smart *
diff --git a/legacy/evas/src/lib/canvas/evas_object_image.c b/legacy/evas/src/lib/canvas/evas_object_image.c
index 3fd7bba828..f929a96ee9 100644
--- a/legacy/evas/src/lib/canvas/evas_object_image.c
+++ b/legacy/evas/src/lib/canvas/evas_object_image.c
@@ -2496,9 +2496,8 @@ evas_object_image_render_pre(Evas_Object *obj)
2496 2496
2497 if ((o->cur.fill.w < 1) || (o->cur.fill.h < 1)) 2497 if ((o->cur.fill.w < 1) || (o->cur.fill.h < 1))
2498 { 2498 {
2499 fprintf(stderr, 2499 ERROR("evas image: %p has invalid fill size: %dx%d. Ignored",
2500 "ERROR: evas image: %p has invalid fill size: %dx%d. Ignored\n", 2500 obj, o->cur.fill.w, o->cur.fill.h);
2501 obj, o->cur.fill.w, o->cur.fill.h);
2502 return; 2501 return;
2503 } 2502 }
2504 2503
diff --git a/legacy/evas/src/lib/canvas/evas_object_smart.c b/legacy/evas/src/lib/canvas/evas_object_smart.c
index 2005ef45df..a7262039c4 100644
--- a/legacy/evas/src/lib/canvas/evas_object_smart.c
+++ b/legacy/evas/src/lib/canvas/evas_object_smart.c
@@ -174,20 +174,20 @@ evas_object_smart_member_add(Evas_Object *obj, Evas_Object *smart_obj)
174 174
175 if (obj->delete_me) 175 if (obj->delete_me)
176 { 176 {
177 printf("EVAS ERROR: Adding deleted object %p to smart obj %p\n", obj, smart_obj); 177 ERROR("Adding deleted object %p to smart obj %p", obj, smart_obj);
178 abort(); 178 abort();
179 return; 179 return;
180 } 180 }
181 if (smart_obj->delete_me) 181 if (smart_obj->delete_me)
182 { 182 {
183 printf("EVAS ERROR: Adding object %p to deleted smart obj %p\n", obj, smart_obj); 183 ERROR("Adding object %p to deleted smart obj %p", obj, smart_obj);
184 abort(); 184 abort();
185 return; 185 return;
186 } 186 }
187 if (obj->layer && smart_obj->layer 187 if (obj->layer && smart_obj->layer
188 && obj->layer->evas != smart_obj->layer->evas) 188 && obj->layer->evas != smart_obj->layer->evas)
189 { 189 {
190 printf("EVAS ERROR: Adding object %p from Evas (%p) from another Evas (%p)\n", obj, obj->layer->evas, smart_obj->layer->evas); 190 ERROR("EVAS ERROR: Adding object %p from Evas (%p) from another Evas (%p)", obj, obj->layer->evas, smart_obj->layer->evas);
191 abort(); 191 abort();
192 return; 192 return;
193 } 193 }
diff --git a/legacy/evas/src/lib/canvas/evas_object_table.c b/legacy/evas/src/lib/canvas/evas_object_table.c
index faa67770a1..2de05bd97c 100644
--- a/legacy/evas/src/lib/canvas/evas_object_table.c
+++ b/legacy/evas/src/lib/canvas/evas_object_table.c
@@ -91,9 +91,8 @@ struct _Evas_Object_Table_Accessor
91 EVAS_OBJECT_TABLE_DATA_GET(o, ptr); \ 91 EVAS_OBJECT_TABLE_DATA_GET(o, ptr); \
92 if (!ptr) \ 92 if (!ptr) \
93 { \ 93 { \
94 fprintf(stderr, "CRITICAL: no widget data for object %p (%s)\n", \ 94 CRITICAL("CRITICAL: no widget data for object %p (%s)", \
95 o, evas_object_type_get(o)); \ 95 o, evas_object_type_get(o)); \
96 fflush(stderr); \
97 abort(); \ 96 abort(); \
98 return; \ 97 return; \
99} 98}
@@ -102,9 +101,8 @@ struct _Evas_Object_Table_Accessor
102 EVAS_OBJECT_TABLE_DATA_GET(o, ptr); \ 101 EVAS_OBJECT_TABLE_DATA_GET(o, ptr); \
103 if (!ptr) \ 102 if (!ptr) \
104 { \ 103 { \
105 fprintf(stderr, "CRITICAL: no widget data for object %p (%s)\n", \ 104 CRITICAL("No widget data for object %p (%s)", \
106 o, evas_object_type_get(o)); \ 105 o, evas_object_type_get(o)); \
107 fflush(stderr); \
108 abort(); \ 106 abort(); \
109 return val; \ 107 return val; \
110 } 108 }
@@ -170,9 +168,8 @@ _evas_object_table_cache_alloc(int cols, int rows)
170 cache = malloc(size); 168 cache = malloc(size);
171 if (!cache) 169 if (!cache)
172 { 170 {
173 fprintf(stderr, 171 ERROR("Could not allocate table cache %dx%d (%d bytes): %s",
174 "ERROR: could not allocate table cache %dx%d (%d bytes): %s\n", 172 cols, rows, size, strerror(errno));
175 cols, rows, size, strerror(errno));
176 return NULL; 173 return NULL;
177 } 174 }
178 175
@@ -319,8 +316,7 @@ _evas_object_table_calculate_cell(const Evas_Object_Table_Option *opt, Evas_Coor
319/* } */ 316/* } */
320/* else if (min < 1) */ 317/* else if (min < 1) */
321/* { */ 318/* { */
322/* fprintf(stderr, */ 319/* WARN("Child %p [%s, %s] has no minimum width " */
323/* "WARNING: child %p [%s, %s] has no minimum width " */
324/* "and no %s expand (weight is not > 0.0). " */ 320/* "and no %s expand (weight is not > 0.0). " */
325/* "Assuming weight > 0.0\n", */ 321/* "Assuming weight > 0.0\n", */
326/* child, evas_object_type_get(child), evas_object_name_get(child), */ 322/* child, evas_object_type_get(child), evas_object_name_get(child), */
@@ -419,16 +415,14 @@ _evas_object_table_calculate_hints_homogeneous(Evas_Object *o, Evas_Object_Table
419 { 415 {
420 if (o_minw < 1) 416 if (o_minw < 1)
421 { 417 {
422 fputs("ERROR: homogeneous table based on item size but no " 418 ERROR("homogeneous table based on item size but no "
423 "horizontal mininum size specified! Using expand.\n", 419 "horizontal mininum size specified! Using expand.");
424 stderr);
425 expand_h = 1; 420 expand_h = 1;
426 } 421 }
427 if (o_minh < 1) 422 if (o_minh < 1)
428 { 423 {
429 fputs("ERROR: homogeneous table based on item size but no " 424 ERROR("homogeneous table based on item size but no "
430 "vertical mininum size specified! Using expand.\n", 425 "vertical mininum size specified! Using expand.");
431 stderr);
432 expand_v = 1; 426 expand_v = 1;
433 } 427 }
434 } 428 }
@@ -730,9 +724,8 @@ _evas_object_table_calculate_layout_regular(Evas_Object *o, Evas_Object_Table_Da
730 cols = malloc(size); 724 cols = malloc(size);
731 if (!cols) 725 if (!cols)
732 { 726 {
733 fprintf(stderr, 727 ERROR("Could not allocate temp columns (%d bytes): %s",
734 "ERROR: could not allocate temp columns (%d bytes): %s\n", 728 size, strerror(errno));
735 size, strerror(errno));
736 return; 729 return;
737 } 730 }
738 memcpy(cols, c->sizes.h, size); 731 memcpy(cols, c->sizes.h, size);
@@ -754,8 +747,7 @@ _evas_object_table_calculate_layout_regular(Evas_Object *o, Evas_Object_Table_Da
754 rows = malloc(size); 747 rows = malloc(size);
755 if (!rows) 748 if (!rows)
756 { 749 {
757 fprintf(stderr, 750 ERROR("could not allocate temp rows (%d bytes): %s",
758 "ERROR: could not allocate temp rows (%d bytes): %s\n",
759 size, strerror(errno)); 751 size, strerror(errno));
760 goto end; 752 goto end;
761 } 753 }
@@ -812,7 +804,7 @@ _evas_object_table_smart_add(Evas_Object *o)
812 priv = calloc(1, sizeof(*priv)); 804 priv = calloc(1, sizeof(*priv));
813 if (!priv) 805 if (!priv)
814 { 806 {
815 fputs("ERROR: could not allocate object private data.\n", stderr); 807 ERROR("could not allocate object private data.");
816 return; 808 return;
817 } 809 }
818 evas_object_smart_data_set(o, priv); 810 evas_object_smart_data_set(o, priv);
@@ -870,8 +862,8 @@ _evas_object_table_smart_calculate(Evas_Object *o)
870 862
871 if ((priv->size.cols < 1) || (priv->size.rows < 1)) 863 if ((priv->size.cols < 1) || (priv->size.rows < 1))
872 { 864 {
873 fprintf(stderr, "DBG: nothing to do: cols=%d, rows=%d\n", 865 DEBUG("Nothing to do: cols=%d, rows=%d",
874 priv->size.cols, priv->size.rows); 866 priv->size.cols, priv->size.rows);
875 return; 867 return;
876 } 868 }
877 869
@@ -1103,27 +1095,26 @@ evas_object_table_pack(Evas_Object *o, Evas_Object *child, unsigned short col, u
1103 1095
1104 if (rowspan < 1) 1096 if (rowspan < 1)
1105 { 1097 {
1106 fputs("ERROR: rowspan < 1\n", stderr); 1098 ERROR("rowspan < 1");
1107 return EINA_FALSE; 1099 return EINA_FALSE;
1108 } 1100 }
1109 if (colspan < 1) 1101 if (colspan < 1)
1110 { 1102 {
1111 fputs("ERROR: colspan < 1\n", stderr); 1103 ERROR("colspan < 1");
1112 return EINA_FALSE; 1104 return EINA_FALSE;
1113 } 1105 }
1114 1106
1115 opt = _evas_object_table_option_get(child); 1107 opt = _evas_object_table_option_get(child);
1116 if (opt) 1108 if (opt)
1117 { 1109 {
1118 fputs("ERROR: cannot add object that is already part of a table!\n", 1110 ERROR("cannot add object that is already part of a table!");
1119 stderr);
1120 return EINA_FALSE; 1111 return EINA_FALSE;
1121 } 1112 }
1122 1113
1123 opt = malloc(sizeof(*opt)); 1114 opt = malloc(sizeof(*opt));
1124 if (!opt) 1115 if (!opt)
1125 { 1116 {
1126 fputs("ERROR: could not allocate table option data.\n", stderr); 1117 ERROR("could not allocate table option data.");
1127 return EINA_FALSE; 1118 return EINA_FALSE;
1128 } 1119 }
1129 1120
@@ -1226,14 +1217,14 @@ evas_object_table_unpack(Evas_Object *o, Evas_Object *child)
1226 1217
1227 if (o != evas_object_smart_parent_get(child)) 1218 if (o != evas_object_smart_parent_get(child))
1228 { 1219 {
1229 fputs("ERROR: cannot unpack child from incorrect table!\n", stderr); 1220 ERROR("cannot unpack child from incorrect table!");
1230 return EINA_FALSE; 1221 return EINA_FALSE;
1231 } 1222 }
1232 1223
1233 opt = _evas_object_table_option_del(child); 1224 opt = _evas_object_table_option_del(child);
1234 if (!opt) 1225 if (!opt)
1235 { 1226 {
1236 fputs("ERROR: cannot unpack child with no packing option!\n", stderr); 1227 ERROR("cannot unpack child with no packing option!");
1237 return EINA_FALSE; 1228 return EINA_FALSE;
1238 } 1229 }
1239 1230
diff --git a/legacy/evas/src/lib/canvas/evas_render.c b/legacy/evas/src/lib/canvas/evas_render.c
index 21d8558e63..39eb429916 100644
--- a/legacy/evas/src/lib/canvas/evas_render.c
+++ b/legacy/evas/src/lib/canvas/evas_render.c
@@ -404,7 +404,7 @@ evas_render_updates_internal(Evas *e, unsigned char make_updates, unsigned char
404 } 404 }
405 if ((e->output.w != e->viewport.w) || (e->output.h != e->viewport.h)) 405 if ((e->output.w != e->viewport.w) || (e->output.h != e->viewport.h))
406 { 406 {
407 printf("EVAS: error: viewport size != output size!\n"); 407 ERROR("viewport size != output size!");
408 } 408 }
409 /* phase 5. add obscures */ 409 /* phase 5. add obscures */
410 EINA_LIST_FOREACH(e->obscures, ll, r) 410 EINA_LIST_FOREACH(e->obscures, ll, r)
diff --git a/legacy/evas/src/lib/canvas/evas_smart.c b/legacy/evas/src/lib/canvas/evas_smart.c
index eed9a6aac9..09769e1736 100644
--- a/legacy/evas/src/lib/canvas/evas_smart.c
+++ b/legacy/evas/src/lib/canvas/evas_smart.c
@@ -65,8 +65,8 @@ evas_smart_new(const char *name,
65 Evas_Smart *s; 65 Evas_Smart *s;
66 Evas_Smart_Class *sc; 66 Evas_Smart_Class *sc;
67 67
68 printf("----- WARNING. evas_smart_new() will be deprecated and removed soon\n" 68 WARN("----- WARNING. evas_smart_new() will be deprecated and removed soon"
69 "----- Please use evas_smart_class_new() instead\n"); 69 "----- Please use evas_smart_class_new() instead");
70 70
71 if (!name) return NULL; 71 if (!name) return NULL;
72 72
diff --git a/legacy/evas/src/lib/canvas/evas_stack.c b/legacy/evas/src/lib/canvas/evas_stack.c
index d70db5edd2..84e600a883 100644
--- a/legacy/evas/src/lib/canvas/evas_stack.c
+++ b/legacy/evas/src/lib/canvas/evas_stack.c
@@ -187,7 +187,7 @@ evas_object_stack_above(Evas_Object *obj, Evas_Object *above)
187 { 187 {
188 if (obj->smart.parent != above->smart.parent) 188 if (obj->smart.parent != above->smart.parent)
189 { 189 {
190// printf("BITCH! evas_object_stack_above(), %p not inside same smart as %p!\n", obj, above); 190// ERROR("BITCH! evas_object_stack_above(), %p not inside same smart as %p!", obj, above);
191 return; 191 return;
192 } 192 }
193 evas_object_smart_member_stack_above(obj, above); 193 evas_object_smart_member_stack_above(obj, above);
@@ -275,7 +275,7 @@ evas_object_stack_below(Evas_Object *obj, Evas_Object *below)
275 { 275 {
276 if (obj->smart.parent != below->smart.parent) 276 if (obj->smart.parent != below->smart.parent)
277 { 277 {
278// printf("BITCH! evas_object_stack_below(), %p not inside same smart as %p!\n", obj, below); 278// ERROR("BITCH! evas_object_stack_below(), %p not inside same smart as %p!", obj, below);
279 return; 279 return;
280 } 280 }
281 evas_object_smart_member_stack_below(obj, below); 281 evas_object_smart_member_stack_below(obj, below);
diff --git a/legacy/evas/src/lib/cserve/evas_cs_client.c b/legacy/evas/src/lib/cserve/evas_cs_client.c
index e1148a3039..ea3da306b2 100644
--- a/legacy/evas/src/lib/cserve/evas_cs_client.c
+++ b/legacy/evas/src/lib/cserve/evas_cs_client.c
@@ -145,8 +145,8 @@ server_read(Server *s, int channel, int *opcode, int *size)
145 if ((*size < 0) || (*size > (1024 * 1024))) return NULL; 145 if ((*size < 0) || (*size > (1024 * 1024))) return NULL;
146 if (ints[2] != (s->ch[channel].req_from + 1)) 146 if (ints[2] != (s->ch[channel].req_from + 1))
147 { 147 {
148 printf("EEK! sequence number mismatch from serer with pid: %i\n" 148 ERROR("EEK! sequence number mismatch from serer with pid: %i\n"
149 "---- num %i is not 1 more than %i\n" 149 "---- num %i is not 1 more than %i"
150 , 150 ,
151 s->pid, ints[2], s->ch[channel].req_from); 151 s->pid, ints[2], s->ch[channel].req_from);
152 return NULL; 152 return NULL;
diff --git a/legacy/evas/src/lib/cserve/evas_cs_server.c b/legacy/evas/src/lib/cserve/evas_cs_server.c
index b10e038b61..d73f04278d 100644
--- a/legacy/evas/src/lib/cserve/evas_cs_server.c
+++ b/legacy/evas/src/lib/cserve/evas_cs_server.c
@@ -225,8 +225,8 @@ server_parse(Server *s, Client *c)
225 data = c->inbuf + (sizeof(int) * 3); 225 data = c->inbuf + (sizeof(int) * 3);
226 if (ints[2] != (c->req_from + 1)) 226 if (ints[2] != (c->req_from + 1))
227 { 227 {
228 printf("EEK! sequence number mismatch from client with pid: %i\n" 228 ERROR("EEK! sequence number mismatch from client with pid: %i\n"
229 "---- num %i is not 1 more than %i\n" 229 "---- num %i is not 1 more than %i"
230 , 230 ,
231 c->pid, ints[2], c->req_from); 231 c->pid, ints[2], c->req_from);
232 return 0; 232 return 0;
diff --git a/legacy/evas/src/lib/engines/common/evas_convert_main.c b/legacy/evas/src/lib/engines/common/evas_convert_main.c
index 6182667d0a..a460109db9 100644
--- a/legacy/evas/src/lib/engines/common/evas_convert_main.c
+++ b/legacy/evas/src/lib/engines/common/evas_convert_main.c
@@ -591,7 +591,7 @@ evas_common_convert_func_get(DATA8 *dest, int w, int h, int depth, DATA32 rmask,
591 } 591 }
592#endif 592#endif
593 } 593 }
594 printf("depth = %i mode = %i\n", depth, pal_mode); 594 INFO("depth = %i mode = %i", depth, pal_mode);
595 if (depth == 8) 595 if (depth == 8)
596 { 596 {
597#ifdef BUILD_CONVERT_8_RGB_332 597#ifdef BUILD_CONVERT_8_RGB_332
diff --git a/legacy/evas/src/lib/engines/common/evas_convert_rgb_16.c b/legacy/evas/src/lib/engines/common/evas_convert_rgb_16.c
index 844fe38698..f46f770549 100644
--- a/legacy/evas/src/lib/engines/common/evas_convert_rgb_16.c
+++ b/legacy/evas/src/lib/engines/common/evas_convert_rgb_16.c
@@ -715,7 +715,7 @@ evas_common_convert_rgba_to_16bpp_bgr_565_dith_rot_180 (DATA32 *src, DATA8 *dst,
715 715
716 dst_ptr = (DATA16 *)dst; 716 dst_ptr = (DATA16 *)dst;
717 717
718 fprintf(stderr, "evas_common_convert_rgba_to_16bpp_bgr_565_dith_rot_180\n"); 718 ERROR("evas_common_convert_rgba_to_16bpp_bgr_565_dith_rot_180");
719 719
720 CONVERT_LOOP_START_ROT_180(); 720 CONVERT_LOOP_START_ROT_180();
721 721
diff --git a/legacy/evas/src/lib/engines/common/evas_cpu.c b/legacy/evas/src/lib/engines/common/evas_cpu.c
index 1cc567f497..f4cc528e30 100644
--- a/legacy/evas/src/lib/engines/common/evas_cpu.c
+++ b/legacy/evas/src/lib/engines/common/evas_cpu.c
@@ -3,7 +3,6 @@
3 */ 3 */
4 4
5#include "evas_common.h" 5#include "evas_common.h"
6
7#if defined BUILD_MMX || defined BUILD_SSE 6#if defined BUILD_MMX || defined BUILD_SSE
8#include "evas_mmx.h" 7#include "evas_mmx.h"
9#endif 8#endif
@@ -222,7 +221,7 @@ evas_common_cpu_can_do(int *mmx, int *sse, int *sse2)
222 if (cpu_feature_mask & CPU_FEATURE_MMX2) do_sse = 1; 221 if (cpu_feature_mask & CPU_FEATURE_MMX2) do_sse = 1;
223 if (cpu_feature_mask & CPU_FEATURE_SSE) do_sse = 1; 222 if (cpu_feature_mask & CPU_FEATURE_SSE) do_sse = 1;
224 } 223 }
225// printf("%i %i %i\n", do_mmx, do_sse, do_sse2); 224// INFO("%i %i %i", do_mmx, do_sse, do_sse2);
226 *mmx = do_mmx; 225 *mmx = do_mmx;
227 *sse = do_sse; 226 *sse = do_sse;
228 *sse2 = do_sse2; 227 *sse2 = do_sse2;
diff --git a/legacy/evas/src/lib/engines/common/evas_font_draw.c b/legacy/evas/src/lib/engines/common/evas_font_draw.c
index 9f531f0082..c2076d5f33 100644
--- a/legacy/evas/src/lib/engines/common/evas_font_draw.c
+++ b/legacy/evas/src/lib/engines/common/evas_font_draw.c
@@ -8,6 +8,7 @@
8 8
9 9
10#include "evas_common.h" 10#include "evas_common.h"
11#include "evas_private.h"
11#include "evas_blend_private.h" 12#include "evas_blend_private.h"
12 13
13#include "evas_intl_utils.h" /*defines INTERNATIONAL_SUPPORT if possible */ 14#include "evas_intl_utils.h" /*defines INTERNATIONAL_SUPPORT if possible */
diff --git a/legacy/evas/src/lib/engines/common/evas_font_main.c b/legacy/evas/src/lib/engines/common/evas_font_main.c
index ee8bf34cdd..73479cec95 100644
--- a/legacy/evas/src/lib/engines/common/evas_font_main.c
+++ b/legacy/evas/src/lib/engines/common/evas_font_main.c
@@ -3,7 +3,7 @@
3 */ 3 */
4 4
5#include "evas_common.h" 5#include "evas_common.h"
6 6#include "evas_private.h"
7FT_Library evas_ft_lib = 0; 7FT_Library evas_ft_lib = 0;
8static int initialised = 0; 8static int initialised = 0;
9 9
diff --git a/legacy/evas/src/lib/engines/common/evas_font_query.c b/legacy/evas/src/lib/engines/common/evas_font_query.c
index cd269153b6..972076b393 100644
--- a/legacy/evas/src/lib/engines/common/evas_font_query.c
+++ b/legacy/evas/src/lib/engines/common/evas_font_query.c
@@ -147,11 +147,11 @@ evas_common_font_query_inset(RGBA_Font *fn, const char *text)
147 fg = evas_common_font_int_cache_glyph_get(fi, index); 147 fg = evas_common_font_int_cache_glyph_get(fi, index);
148 if (!fg) return 0; 148 if (!fg) return 0;
149/* 149/*
150 printf("fg->glyph_out->left = %i\n" 150 INFO("fg->glyph_out->left = %i\n"
151 "fi->src->ft.face->glyph->bitmap_left = %i\n" 151 "fi->src->ft.face->glyph->bitmap_left = %i\n"
152 "fi->src->ft.face->glyph->metrics.horiBearingX = %i\n" 152 "fi->src->ft.face->glyph->metrics.horiBearingX = %i\n"
153 "fi->src->ft.face->glyph->metrics.horiBearingY = %i\n" 153 "fi->src->ft.face->glyph->metrics.horiBearingY = %i\n"
154 "fi->src->ft.face->glyph->metrics.horiAdvance = %i\n" 154 "fi->src->ft.face->glyph->metrics.horiAdvance = %i"
155 , 155 ,
156 (int)fg->glyph_out->left, 156 (int)fg->glyph_out->left,
157 (int)fi->src->ft.face->glyph->bitmap_left, 157 (int)fi->src->ft.face->glyph->bitmap_left,
diff --git a/legacy/evas/src/lib/engines/common/evas_image_main.c b/legacy/evas/src/lib/engines/common/evas_image_main.c
index 35c02b864c..4e1fe3ac14 100644
--- a/legacy/evas/src/lib/engines/common/evas_image_main.c
+++ b/legacy/evas/src/lib/engines/common/evas_image_main.c
@@ -53,7 +53,7 @@ static int _evas_common_rgba_image_dirty(Image_Entry* dst, const I
53static void 53static void
54_evas_common_rgba_image_debug(const char* context, Image_Entry *eim) 54_evas_common_rgba_image_debug(const char* context, Image_Entry *eim)
55{ 55{
56 fprintf(stderr, "%p = [%s] {%s,%s} %i [%i|%i]\n", eim, context, eim->file, eim->key, eim->references, eim->w, eim->h); 56 DEBUG("%p = [%s] {%s,%s} %i [%i|%i]", eim, context, eim->file, eim->key, eim->references, eim->w, eim->h);
57} 57}
58 58
59static const Evas_Cache_Image_Func _evas_common_image_func = 59static const Evas_Cache_Image_Func _evas_common_image_func =
@@ -83,7 +83,7 @@ evas_common_image_init(void)
83 if (!eci) 83 if (!eci)
84 eci = evas_cache_image_init(&_evas_common_image_func); 84 eci = evas_cache_image_init(&_evas_common_image_func);
85 reference++; 85 reference++;
86//// printf("REF++=%i\n", reference); 86//// ERROR("REF++=%i", reference);
87 87
88#ifdef BUILD_LOADER_EET 88#ifdef BUILD_LOADER_EET
89 eet_init(); 89 eet_init();
diff --git a/legacy/evas/src/lib/engines/common/evas_image_scalecache.c b/legacy/evas/src/lib/engines/common/evas_image_scalecache.c
index 0ac4995ee7..d66b2501b6 100644
--- a/legacy/evas/src/lib/engines/common/evas_image_scalecache.c
+++ b/legacy/evas/src/lib/engines/common/evas_image_scalecache.c
@@ -118,7 +118,7 @@ evas_common_rgba_image_scalecache_dirty(Image_Entry *ie)
118 im->cache.list = eina_list_remove(im->cache.list, sci); 118 im->cache.list = eina_list_remove(im->cache.list, sci);
119 if (sci->im) 119 if (sci->im)
120 { 120 {
121// printf(" 0- %i\n", sci->dst_w * sci->dst_h * 4); 121// INFO(" 0- %i", sci->dst_w * sci->dst_h * 4);
122 LKL(cache_lock); 122 LKL(cache_lock);
123 evas_common_rgba_image_free(&sci->im->cache_entry); 123 evas_common_rgba_image_free(&sci->im->cache_entry);
124 if (!sci->forced_unload) 124 if (!sci->forced_unload)
@@ -185,7 +185,7 @@ _sci_fix_newest(RGBA_Image *im)
185 if (sci->usage_count > im->cache.newest_usage_count) 185 if (sci->usage_count > im->cache.newest_usage_count)
186 im->cache.newest_usage_count = sci->usage_count; 186 im->cache.newest_usage_count = sci->usage_count;
187 } 187 }
188// printf("_sci_fix_newest! -> %i\n", im->cache.newest_usage); 188// INFO("_sci_fix_newest! -> %i", im->cache.newest_usage);
189} 189}
190 190
191static Scaleitem * 191static Scaleitem *
@@ -233,7 +233,7 @@ _sci_find(RGBA_Image *im,
233 cache_size -= sci->dst_w * sci->dst_h * 4; 233 cache_size -= sci->dst_w * sci->dst_h * 4;
234 else 234 else
235 cache_size -= sci->size_adjust; 235 cache_size -= sci->size_adjust;
236// printf(" 1- %i\n", sci->dst_w * sci->dst_h * 4); 236// INFO(" 1- %i", sci->dst_w * sci->dst_h * 4);
237 cache_list = eina_inlist_remove(cache_list, (Eina_Inlist *)sci); 237 cache_list = eina_inlist_remove(cache_list, (Eina_Inlist *)sci);
238 } 238 }
239 if (max_scale_items < 1) return NULL; 239 if (max_scale_items < 1) return NULL;
@@ -291,11 +291,11 @@ _cache_prune(Scaleitem *notsci, Eina_Bool copies_only)
291 cache_size -= sci->dst_w * sci->dst_h * 4; 291 cache_size -= sci->dst_w * sci->dst_h * 4;
292 else 292 else
293 cache_size -= sci->size_adjust; 293 cache_size -= sci->size_adjust;
294// printf(" 2- %i\n", sci->dst_w * sci->dst_h * 4); 294// INFO(" 2- %i", sci->dst_w * sci->dst_h * 4);
295 cache_list = eina_inlist_remove(cache_list, (Eina_Inlist *)sci); 295 cache_list = eina_inlist_remove(cache_list, (Eina_Inlist *)sci);
296 memset(sci, 0, sizeof(Eina_Inlist)); 296 memset(sci, 0, sizeof(Eina_Inlist));
297 } 297 }
298// printf("FLUSH %i > %i\n", cache_size, max_cache_size); 298// INFO("FLUSH %i > %i", cache_size, max_cache_size);
299 } 299 }
300} 300}
301#endif 301#endif
@@ -385,7 +385,7 @@ evas_common_rgba_image_scalecache_prepare(Image_Entry *ie, RGBA_Image *dst,
385 LKU(im->cache.lock); 385 LKU(im->cache.lock);
386 return; 386 return;
387 } 387 }
388// printf("%10i | %4i %4i %4ix%4i -> %4i %4i %4ix%4i | %i\n", 388// INFO("%10i | %4i %4i %4ix%4i -> %4i %4i %4ix%4i | %i",
389// (int)use_counter, 389// (int)use_counter,
390// src_region_x, src_region_y, src_region_w, src_region_h, 390// src_region_x, src_region_y, src_region_w, src_region_h,
391// dst_region_x, dst_region_y, dst_region_w, dst_region_h, 391// dst_region_x, dst_region_y, dst_region_w, dst_region_h,
@@ -413,12 +413,12 @@ evas_common_rgba_image_scalecache_prepare(Image_Entry *ie, RGBA_Image *dst,
413 LKU(cache_lock); 413 LKU(cache_lock);
414 if (sci->usage > im->cache.newest_usage) 414 if (sci->usage > im->cache.newest_usage)
415 im->cache.newest_usage = sci->usage; 415 im->cache.newest_usage = sci->usage;
416// printf("newset? %p %i > %i\n", im, 416// INFO("newset? %p %i > %i", im,
417// (int)sci->usage, 417// (int)sci->usage,
418// (int)im->cache.newest_usage); 418// (int)im->cache.newest_usage);
419 if (sci->usage_count > im->cache.newest_usage_count) 419 if (sci->usage_count > im->cache.newest_usage_count)
420 im->cache.newest_usage_count = sci->usage_count; 420 im->cache.newest_usage_count = sci->usage_count;
421// printf(" -------------- used %8i#, %8i@\n", (int)sci->usage, (int)sci->usage_count); 421// INFO(" -------------- used %8i#, %8i@", (int)sci->usage, (int)sci->usage_count);
422 LKU(im->cache.lock); 422 LKU(im->cache.lock);
423#endif 423#endif
424} 424}
@@ -449,7 +449,7 @@ evas_common_rgba_image_scalecache_do(Image_Entry *ie, RGBA_Image *dst,
449 i++; 449 i++;
450 if (i > 2000) 450 if (i > 2000)
451 { 451 {
452 printf("p: %6i, h: %6i, m: %6i, n: %6i\n", 452 INFO("p: %6i, h: %6i, m: %6i, n: %6i",
453 pops, hits, misses, noscales); 453 pops, hits, misses, noscales);
454 i = 0; 454 i = 0;
455 } 455 }
@@ -552,7 +552,7 @@ evas_common_rgba_image_scalecache_do(Image_Entry *ie, RGBA_Image *dst,
552 } 552 }
553 if (sci->populate_me) 553 if (sci->populate_me)
554 { 554 {
555// printf("##! populate!\n"); 555// INFO("##! populate!");
556 sci->im = evas_common_image_new 556 sci->im = evas_common_image_new
557 (dst_region_w, dst_region_h, im->cache_entry.flags.alpha); 557 (dst_region_w, dst_region_h, im->cache_entry.flags.alpha);
558 if (sci->im) 558 if (sci->im)
@@ -625,7 +625,7 @@ evas_common_rgba_image_scalecache_do(Image_Entry *ie, RGBA_Image *dst,
625 { 625 {
626 cache_size += sci->dst_w * sci->dst_h * 4; 626 cache_size += sci->dst_w * sci->dst_h * 4;
627 } 627 }
628// printf(" + %i @ flop: %i (%ix%i)\n", 628// INFO(" + %i @ flop: %i (%ix%i)",
629// sci->dst_w * sci->dst_h * 4, sci->flop, 629// sci->dst_w * sci->dst_h * 4, sci->flop,
630// sci->dst_w, sci->dst_h); 630// sci->dst_w, sci->dst_h);
631 cache_list = eina_inlist_append(cache_list, (Eina_Inlist *)sci); 631 cache_list = eina_inlist_append(cache_list, (Eina_Inlist *)sci);
@@ -645,7 +645,7 @@ evas_common_rgba_image_scalecache_do(Image_Entry *ie, RGBA_Image *dst,
645 { 645 {
646 if (sci->flop > 0) sci->flop -= FLOP_DEL; 646 if (sci->flop > 0) sci->flop -= FLOP_DEL;
647 } 647 }
648// printf("use cached!\n"); 648// INFO("use cached!");
649 evas_common_scale_rgba_in_to_out_clip_sample 649 evas_common_scale_rgba_in_to_out_clip_sample
650 (sci->im, dst, dc, 650 (sci->im, dst, dc,
651 0, 0, 651 0, 0,
@@ -653,7 +653,7 @@ evas_common_rgba_image_scalecache_do(Image_Entry *ie, RGBA_Image *dst,
653 dst_region_x, dst_region_y, 653 dst_region_x, dst_region_y,
654 dst_region_w, dst_region_h); 654 dst_region_w, dst_region_h);
655// hits++; 655// hits++;
656// printf("check %p %i < %i\n", 656// INFO("check %p %i < %i",
657// im, 657// im,
658// (int)im->cache.orig_usage, 658// (int)im->cache.orig_usage,
659// (int)im->cache.newest_usage); 659// (int)im->cache.newest_usage);
diff --git a/legacy/evas/src/lib/engines/common/evas_op_add_main_.c b/legacy/evas/src/lib/engines/common/evas_op_add_main_.c
index a4eface482..538fb29b56 100644
--- a/legacy/evas/src/lib/engines/common/evas_op_add_main_.c
+++ b/legacy/evas/src/lib/engines/common/evas_op_add_main_.c
@@ -3,7 +3,6 @@
3 */ 3 */
4 4
5#include "evas_common.h" 5#include "evas_common.h"
6
7static RGBA_Gfx_Func op_add_span_funcs[SP_LAST][SM_LAST][SC_LAST][DP_LAST][CPU_LAST]; 6static RGBA_Gfx_Func op_add_span_funcs[SP_LAST][SM_LAST][SC_LAST][DP_LAST][CPU_LAST];
8static RGBA_Gfx_Pt_Func op_add_pt_funcs[SP_LAST][SM_LAST][SC_LAST][DP_LAST][CPU_LAST]; 7static RGBA_Gfx_Pt_Func op_add_pt_funcs[SP_LAST][SM_LAST][SC_LAST][DP_LAST][CPU_LAST];
9 8
diff --git a/legacy/evas/src/lib/engines/common/evas_pipe.c b/legacy/evas/src/lib/engines/common/evas_pipe.c
index 9d35b257c9..e33093dd00 100644
--- a/legacy/evas/src/lib/engines/common/evas_pipe.c
+++ b/legacy/evas/src/lib/engines/common/evas_pipe.c
@@ -73,7 +73,7 @@ evas_common_pipe_thread(void *data)
73{ 73{
74 Thinfo *thinfo; 74 Thinfo *thinfo;
75 75
76// printf("TH [...........\n"); 76// INFO("TH [...........");
77 thinfo = data; 77 thinfo = data;
78 for (;;) 78 for (;;)
79 { 79 {
@@ -81,13 +81,13 @@ evas_common_pipe_thread(void *data)
81 RGBA_Pipe *p; 81 RGBA_Pipe *p;
82 82
83 /* wait for start signal */ 83 /* wait for start signal */
84// printf(" TH %i START...\n", thinfo->thread_num); 84// INFO(" TH %i START...", thinfo->thread_num);
85 pthread_barrier_wait(&(thinfo->barrier[0])); 85 pthread_barrier_wait(&(thinfo->barrier[0]));
86 info = thinfo->info; 86 info = thinfo->info;
87// if (info) 87// if (info)
88// { 88// {
89// thinfo->info = NULL; 89// thinfo->info = NULL;
90// printf(" TH %i GO\n", thinfo->thread_num); 90// INFO(" TH %i GO", thinfo->thread_num);
91 EINA_INLIST_FOREACH(EINA_INLIST_GET(info->im->pipe), p) 91 EINA_INLIST_FOREACH(EINA_INLIST_GET(info->im->pipe), p)
92 { 92 {
93 int i; 93 int i;
@@ -100,7 +100,7 @@ evas_common_pipe_thread(void *data)
100 } 100 }
101 free(info); 101 free(info);
102// } 102// }
103// printf(" TH %i DONE\n", thinfo->thread_num); 103// INFO(" TH %i DONE", thinfo->thread_num);
104 /* send finished signal */ 104 /* send finished signal */
105 pthread_barrier_wait(&(thinfo->barrier[1])); 105 pthread_barrier_wait(&(thinfo->barrier[1]));
106 } 106 }
diff --git a/legacy/evas/src/lib/engines/common/evas_tiler.c b/legacy/evas/src/lib/engines/common/evas_tiler.c
index 66f20819ce..c28641cc45 100644
--- a/legacy/evas/src/lib/engines/common/evas_tiler.c
+++ b/legacy/evas/src/lib/engines/common/evas_tiler.c
@@ -1,5 +1,4 @@
1#include "evas_common.h" 1#include "evas_common.h"
2
3#ifdef EVAS_RECT_SPLIT 2#ifdef EVAS_RECT_SPLIT
4 3
5static const list_node_t list_node_zeroed = { NULL }; 4static const list_node_t list_node_zeroed = { NULL };
@@ -95,7 +94,7 @@ rect_init(rect_t *r, int x, int y, int w, int h)
95void 94void
96rect_print(const rect_t r) 95rect_print(const rect_t r)
97{ 96{
98 printf("<rect(%d, %d, %d, %d)>", r.left, r.top, r.width, r.height); 97 INFO("<rect(%d, %d, %d, %d)>", r.left, r.top, r.width, r.height);
99} 98}
100 99
101void 100void
@@ -107,7 +106,7 @@ rect_list_print(const list_t rects)
107 len = 0; 106 len = 0;
108 for (node = rects.head; node != NULL; node = node->next) len++; 107 for (node = rects.head; node != NULL; node = node->next) len++;
109 108
110 printf("["); 109 putchar('[');
111 for (node = rects.head; node != NULL; node = node->next) 110 for (node = rects.head; node != NULL; node = node->next)
112 { 111 {
113 rect_print(((rect_node_t *)node)->rect); 112 rect_print(((rect_node_t *)node)->rect);
@@ -122,7 +121,7 @@ rect_list_print(const list_t rects)
122 } 121 }
123 } 122 }
124 } 123 }
125 printf("]\n"); 124 putchar(']');
126} 125}
127 126
128inline void 127inline void
@@ -717,7 +716,7 @@ rect_list_add_split_fuzzy(list_t *rects, list_node_t *node, int accepted_error)
717 */ 716 */
718 /* prev_cur_node = cur_node; */ 717 /* prev_cur_node = cur_node; */
719 /* cur_node = cur_node->next; */ 718 /* cur_node = cur_node->next; */
720 printf("Should not get here!\n"); 719 WARN("Should not get here!");
721 abort(); 720 abort();
722 } 721 }
723 722
@@ -920,7 +919,7 @@ _add_redraw(list_t *rects, int max_w, int max_h, int x, int y, int w, int h)
920 rn = (rect_node_t *)rect_list_node_pool_get(); 919 rn = (rect_node_t *)rect_list_node_pool_get();
921 rn->_lst = list_node_zeroed; 920 rn->_lst = list_node_zeroed;
922 rect_init(&rn->rect, x, y, w, h); 921 rect_init(&rn->rect, x, y, w, h);
923 //fprintf(stderr, "ACCOUNTING: add_redraw: %4d,%4d %3dx%3d\n", x, y, w, h); 922 //INFO(stderr, "ACCOUNTING: add_redraw: %4d,%4d %3dx%3d", x, y, w, h);
924 //testing on my core2 duo desktop - fuzz of 32 or 48 is best. 923 //testing on my core2 duo desktop - fuzz of 32 or 48 is best.
925#define FUZZ 32 924#define FUZZ 32
926 rect_list_add_split_fuzzy_and_merge(rects, (list_node_t *)rn, 925 rect_list_add_split_fuzzy_and_merge(rects, (list_node_t *)rn,
@@ -1008,7 +1007,7 @@ evas_common_tilebuf_del_redraw(Tilebuf *tb, int x, int y, int w, int h)
1008 if ((w <= 0) || (h <= 0)) return 0; 1007 if ((w <= 0) || (h <= 0)) return 0;
1009 1008
1010 rect_init(&r, x, y, w, h); 1009 rect_init(&r, x, y, w, h);
1011 //fprintf(stderr, "ACCOUNTING: del_redraw: %4d,%4d %3dx%3d\n", x, y, w, h); 1010 //ERROR("ACCOUNTING: del_redraw: %4d,%4d %3dx%3d", x, y, w, h);
1012 1011
1013 rect_list_del_split_strict(&tb->rects, r); 1012 rect_list_del_split_strict(&tb->rects, r);
1014 tb->need_merge = 1; 1013 tb->need_merge = 1;
diff --git a/legacy/evas/src/lib/engines/common_16/evas_soft16_image_scaled_sampled.c b/legacy/evas/src/lib/engines/common_16/evas_soft16_image_scaled_sampled.c
index 71f9914755..675be741da 100644
--- a/legacy/evas/src/lib/engines/common_16/evas_soft16_image_scaled_sampled.c
+++ b/legacy/evas/src/lib/engines/common_16/evas_soft16_image_scaled_sampled.c
@@ -101,9 +101,8 @@ _soft16_image_draw_scaled_no_mul(Soft16_Image *src, Soft16_Image *dst,
101 _soft16_image_draw_scaled_solid_solid 101 _soft16_image_draw_scaled_solid_solid
102 (src, dst, dc, dst_offset, w, h, offset_x, offset_y); 102 (src, dst, dc, dst_offset, w, h, offset_x, offset_y);
103 else 103 else
104 fprintf(stderr, 104 ERROR("Unsupported draw of scaled images src->cache_entry.flags.alpha=%d, "
105 "Unsupported draw of scaled images src->cache_entry.flags.alpha=%d, " 105 "dst->cache_entry.flags.alpha=%d, WITHOUT COLOR MUL",
106 "dst->cache_entry.flags.alpha=%d, WITHOUT COLOR MUL\n",
107 src->cache_entry.flags.alpha, dst->cache_entry.flags.alpha); 106 src->cache_entry.flags.alpha, dst->cache_entry.flags.alpha);
108} 107}
109 108
@@ -214,10 +213,9 @@ _soft16_image_draw_scaled_mul_alpha(Soft16_Image *src, Soft16_Image *dst,
214 _soft16_image_draw_scaled_solid_solid_mul_alpha 213 _soft16_image_draw_scaled_solid_solid_mul_alpha
215 (src, dst, dc, dst_offset, w, h, offset_x, offset_y, a); 214 (src, dst, dc, dst_offset, w, h, offset_x, offset_y, a);
216 else 215 else
217 fprintf(stderr, 216 ERROR("Unsupported draw of scaled images src->cache_entry.flags.alpha=%d, "
218 "Unsupported draw of scaled images src->cache_entry.flags.alpha=%d, " 217 "dst->cache_entry.flags.alpha=%d, WITH ALPHA MUL %d",
219 "dst->cache_entry.flags.alpha=%d, WITH ALPHA MUL %d\n", 218 src->cache_entry.flags.alpha, dst->cache_entry.flags.alpha, A_VAL(&dc->mul.col));
220 src->cache_entry.flags.alpha, dst->cache_entry.flags.alpha, A_VAL(&dc->mul.col));
221} 219}
222 220
223static void 221static void
@@ -397,9 +395,8 @@ _soft16_image_draw_scaled_mul_color(Soft16_Image *src, Soft16_Image *dst,
397 _soft16_image_draw_scaled_solid_solid_mul_color 395 _soft16_image_draw_scaled_solid_solid_mul_color
398 (src, dst, dc, dst_offset, w, h, offset_x, offset_y, r, g, b, a); 396 (src, dst, dc, dst_offset, w, h, offset_x, offset_y, r, g, b, a);
399 else 397 else
400 fprintf(stderr, 398 ERROR("Unsupported draw of scaled images src->cache_entry.flags.alpha=%d, "
401 "Unsupported draw of scaled images src->cache_entry.flags.alpha=%d, " 399 "dst->cache_entry.flags.alpha=%d, WITH COLOR MUL 0x%08x",
402 "dst->cache_entry.flags.alpha=%d, WITH COLOR MUL 0x%08x\n",
403 src->cache_entry.flags.alpha, dst->cache_entry.flags.alpha, dc->mul.col); 400 src->cache_entry.flags.alpha, dst->cache_entry.flags.alpha, dc->mul.col);
404} 401}
405 402
diff --git a/legacy/evas/src/lib/engines/common_16/evas_soft16_image_unscaled.c b/legacy/evas/src/lib/engines/common_16/evas_soft16_image_unscaled.c
index 73d7d44ef5..fc782ad94a 100644
--- a/legacy/evas/src/lib/engines/common_16/evas_soft16_image_unscaled.c
+++ b/legacy/evas/src/lib/engines/common_16/evas_soft16_image_unscaled.c
@@ -60,9 +60,8 @@ _soft16_image_draw_unscaled_no_mul(Soft16_Image *src, Soft16_Image *dst,
60 src_offset, dst_offset, 60 src_offset, dst_offset,
61 width, height); 61 width, height);
62 else 62 else
63 fprintf(stderr, 63 ERROR("Unsupported draw of unscaled images src->cache_entry.flags.alpha=%d, "
64 "Unsupported draw of unscaled images src->cache_entry.flags.alpha=%d, " 64 "dst->cache_entry.flags.alpha=%d, WITHOUT COLOR MUL",
65 "dst->cache_entry.flags.alpha=%d, WITHOUT COLOR MUL\n",
66 src->cache_entry.flags.alpha, dst->cache_entry.flags.alpha); 65 src->cache_entry.flags.alpha, dst->cache_entry.flags.alpha);
67} 66}
68 67
@@ -128,9 +127,8 @@ _soft16_image_draw_unscaled_mul_alpha(Soft16_Image *src, Soft16_Image *dst,
128 _soft16_image_draw_unscaled_solid_solid_mul_alpha 127 _soft16_image_draw_unscaled_solid_solid_mul_alpha
129 (src, dst, dc, src_offset, dst_offset, width, height, a); 128 (src, dst, dc, src_offset, dst_offset, width, height, a);
130 else 129 else
131 fprintf(stderr, 130 ERROR("Unsupported draw of unscaled images src->cache_entry.flags.alpha=%d, "
132 "Unsupported draw of unscaled images src->cache_entry.flags.alpha=%d, " 131 "dst->cache_entry.flags.alpha=%d, WITH ALPHA MUL %d",
133 "dst->cache_entry.flags.alpha=%d, WITH ALPHA MUL %d\n",
134 src->cache_entry.flags.alpha, dst->cache_entry.flags.alpha, A_VAL(&dc->mul.col)); 132 src->cache_entry.flags.alpha, dst->cache_entry.flags.alpha, A_VAL(&dc->mul.col));
135} 133}
136 134
@@ -219,9 +217,8 @@ _soft16_image_draw_unscaled_mul_color(Soft16_Image *src, Soft16_Image *dst,
219 _soft16_image_draw_unscaled_solid_solid_mul_color 217 _soft16_image_draw_unscaled_solid_solid_mul_color
220 (src, dst, dc, src_offset, dst_offset, width, height, r, g, b, a); 218 (src, dst, dc, src_offset, dst_offset, width, height, r, g, b, a);
221 else 219 else
222 fprintf(stderr, 220 ERROR("Unsupported draw of unscaled images src->cache_entry.flags.alpha=%d, "
223 "Unsupported draw of unscaled images src->cache_entry.flags.alpha=%d, " 221 "dst->cache_entry.flags.alpha=%d, WITH COLOR MUL 0x%08x",
224 "dst->cache_entry.flags.alpha=%d, WITH COLOR MUL 0x%08x\n",
225 src->cache_entry.flags.alpha, dst->cache_entry.flags.alpha, dc->mul.col); 222 src->cache_entry.flags.alpha, dst->cache_entry.flags.alpha, dc->mul.col);
226} 223}
227 224
diff --git a/legacy/evas/src/lib/engines/common_16/evas_soft16_main.c b/legacy/evas/src/lib/engines/common_16/evas_soft16_main.c
index 18d3e65725..64b9cb83cc 100644
--- a/legacy/evas/src/lib/engines/common_16/evas_soft16_main.c
+++ b/legacy/evas/src/lib/engines/common_16/evas_soft16_main.c
@@ -28,7 +28,7 @@ static int _evas_common_load_soft16_image_data_from_file(Image_Ent
28/* static void */ 28/* static void */
29/* _evas_common_soft16_image_debug(const char* context, Image_Entry *eim) */ 29/* _evas_common_soft16_image_debug(const char* context, Image_Entry *eim) */
30/* { */ 30/* { */
31/* fprintf(stderr, "[16] %p = [%s] {%s,%s} %i [%i|%i]\n", eim, context, eim->file, eim->key, eim->references, eim->w, eim->h); */ 31/* DEBUG("[16] %p = [%s] {%s,%s} %i [%i|%i]", eim, context, eim->file, eim->key, eim->references, eim->w, eim->h); */
32/* } */ 32/* } */
33 33
34static const Evas_Cache_Image_Func _evas_common_soft16_image_func = 34static const Evas_Cache_Image_Func _evas_common_soft16_image_func =
diff --git a/legacy/evas/src/lib/engines/common_16/evas_soft16_rectangle.c b/legacy/evas/src/lib/engines/common_16/evas_soft16_rectangle.c
index 6e78d6074e..dd5571df71 100644
--- a/legacy/evas/src/lib/engines/common_16/evas_soft16_rectangle.c
+++ b/legacy/evas/src/lib/engines/common_16/evas_soft16_rectangle.c
@@ -71,9 +71,7 @@ _soft16_rectangle_draw_int(Soft16_Image *dst, RGBA_Draw_Context *dc,
71 (dst, dst_offset, dr.w, dr.h, rgb565, alpha); 71 (dst, dst_offset, dr.w, dr.h, rgb565, alpha);
72 } 72 }
73 else 73 else
74 fprintf(stderr, 74 ERROR("Unsupported feature: drawing rectangle to non-opaque destination.");
75 "Unsupported feature: drawing rectangle to non-opaque "
76 "destination.\n");
77} 75}
78 76
79void 77void
diff --git a/legacy/evas/src/lib/include/evas_common.h b/legacy/evas/src/lib/include/evas_common.h
index e00fdb7302..4e848a76ed 100644
--- a/legacy/evas/src/lib/include/evas_common.h
+++ b/legacy/evas/src/lib/include/evas_common.h
@@ -12,6 +12,64 @@
12#include <Eina.h> 12#include <Eina.h>
13#include "Evas.h" 13#include "Evas.h"
14 14
15/* macros needed to log message through eina_log */
16extern int _evas_log_dom_global;
17#ifdef _EVAS_DEFAULT_MODULE_LOG_DOM
18#undef _EVAS_DEFAULT_MODULE_LOG_DOM
19#endif
20#define _EVAS_DEFAULT_MODULE_LOG_DOM _evas_log_dom_global
21
22#ifdef EVAS_DEFAULT_LOG_COLOR
23#undef EVAS_DEFAULT_LOG_COLOR
24#endif
25#define EVAS_DEFAULT_LOG_COLOR "\033[36m"
26#ifdef ERROR
27#undef ERROR
28#endif
29#define ERROR(...) EINA_LOG_DOM_ERR(_evas_log_dom_global, __VA_ARGS__)
30#ifdef DEBUG
31#undef DEBUG
32#endif
33#define DEBUG(...) EINA_LOG_DOM_DBG(_evas_log_dom_global, __VA_ARGS__)
34#ifdef INFO
35#undef INFO
36#endif
37#define INFO(...) EINA_LOG_DOM_INFO(_evas_log_dom_global, __VA_ARGS__)
38#ifdef WARN
39#undef WARN
40#endif
41#define WARN(...) EINA_LOG_DOM_WARN(_evas_log_dom_global, __VA_ARGS__)
42#ifdef CRITICAL
43#undef CRITICAL
44#endif
45#define CRITICAL(...) EINA_LOG_DOM_CRIT(_evas_log_dom_global, __VA_ARGS__)
46/**
47 * macros that are used all around the code for message processing
48 * four macros are defined ERR, WRN, DGB, INF.
49 * EFREET_MODULE_LOG_DOM should be defined individually for each module
50 */
51
52#ifdef ERR
53#undef ERR
54#endif
55#define ERR(...) EINA_LOG_DOM_ERR(_EVAS_DEFAULT_MODULE_LOG_DOM, __VA_ARGS__)
56#ifdef DBG
57#undef DBG
58#endif
59#define DBG(...) EINA_LOG_DOM_DBG(_EVAS_DEFAULT_MODULE_LOG_DOM, __VA_ARGS__)
60#ifdef INF
61#undef INF
62#endif
63#define INF(...) EINA_LOG_DOM_INFO(_EVAS_DEFAULT__MODULE_LOG_DOM, __VA_ARGS__)
64#ifdef WRN
65#undef WRN
66#endif
67#define WRN(...) EINA_LOG_DOM_WARN(_EVAS_DEFAULT_MODULE_LOG_DOM, __VA_ARGS__)
68#ifdef CRIT
69#undef CRIT
70#endif
71#define CRIT(...) EINA_LOG_DOM_CRIT(_EVAS_DEFAULT_MODULE_LOG_DOM, __VA_ARGS__)
72
15/*****************************************************************************/ 73/*****************************************************************************/
16 74
17#include "evas_options.h" 75#include "evas_options.h"
@@ -1156,5 +1214,4 @@ void evas_font_dir_cache_free(void);
1156#ifdef __cplusplus 1214#ifdef __cplusplus
1157} 1215}
1158#endif 1216#endif
1159
1160#endif 1217#endif
diff --git a/legacy/evas/src/lib/main.c b/legacy/evas/src/lib/main.c
index 798bb1685c..f95da6f136 100644
--- a/legacy/evas/src/lib/main.c
+++ b/legacy/evas/src/lib/main.c
@@ -101,8 +101,7 @@ evas_debug_error(void)
101 _evas_debug_init = 1; 101 _evas_debug_init = 1;
102 } 102 }
103 if (_evas_debug_show) 103 if (_evas_debug_show)
104 fprintf(stderr, 104 DEBUG("*** EVAS ERROR: Evas Magic Check Failed!!!");
105 "*** EVAS ERROR: Evas Magic Check Failed!!!\n");
106} 105}
107 106
108void 107void
@@ -115,8 +114,7 @@ evas_debug_input_null(void)
115 _evas_debug_init = 1; 114 _evas_debug_init = 1;
116 } 115 }
117 if (_evas_debug_show) 116 if (_evas_debug_show)
118 fprintf(stderr, 117 DEBUG("Input object pointer is NULL!");
119 " Input object pointer is NULL!\n");
120 if (_evas_debug_abort) abort(); 118 if (_evas_debug_abort) abort();
121} 119}
122 120
@@ -130,8 +128,7 @@ evas_debug_magic_null(void)
130 _evas_debug_init = 1; 128 _evas_debug_init = 1;
131 } 129 }
132 if (_evas_debug_show) 130 if (_evas_debug_show)
133 fprintf(stderr, 131 DEBUG("Input object is zero'ed out (maybe a freed object or zero-filled RAM)!");
134 " Input object is zero'ed out (maybe a freed object or zero-filled RAM)!\n");
135 if (_evas_debug_abort) abort(); 132 if (_evas_debug_abort) abort();
136} 133}
137 134
@@ -145,12 +142,11 @@ evas_debug_magic_wrong(DATA32 expected, DATA32 supplied)
145 _evas_debug_init = 1; 142 _evas_debug_init = 1;
146 } 143 }
147 if (_evas_debug_show) 144 if (_evas_debug_show)
148 fprintf(stderr, 145 DEBUG(" Input object is wrong type\n"
149 " Input object is wrong type\n" 146 " Expected: %08x - %s\n"
150 " Expected: %08x - %s\n" 147 " Supplied: %08x - %s",
151 " Supplied: %08x - %s\n", 148 expected, evas_debug_magic_string_get(expected),
152 expected, evas_debug_magic_string_get(expected), 149 supplied, evas_debug_magic_string_get(supplied));
153 supplied, evas_debug_magic_string_get(supplied));
154 if (_evas_debug_abort) abort(); 150 if (_evas_debug_abort) abort();
155} 151}
156 152
@@ -164,9 +160,8 @@ evas_debug_generic(const char *str)
164 _evas_debug_init = 1; 160 _evas_debug_init = 1;
165 } 161 }
166 if (_evas_debug_show) 162 if (_evas_debug_show)
167 fprintf(stderr, 163 DEBUG("*** EVAS ERROR:\n"
168 "*** EVAS ERROR:\n" 164 "%s", (char *)str);
169 "%s", (char *)str);
170 if (_evas_debug_abort) abort(); 165 if (_evas_debug_abort) abort();
171} 166}
172 167
diff --git a/legacy/evas/src/modules/engines/cairo_x11/evas_engine.c b/legacy/evas/src/modules/engines/cairo_x11/evas_engine.c
index 89c1b3e3fd..e9a8100cca 100644
--- a/legacy/evas/src/modules/engines/cairo_x11/evas_engine.c
+++ b/legacy/evas/src/modules/engines/cairo_x11/evas_engine.c
@@ -257,7 +257,7 @@ eng_info(Evas *e)
257 info = calloc(1, sizeof(Evas_Engine_Info_Cairo_X11)); 257 info = calloc(1, sizeof(Evas_Engine_Info_Cairo_X11));
258 if (!info) return NULL; 258 if (!info) return NULL;
259 info->magic.magic = rand(); 259 info->magic.magic = rand();
260 printf("CAIRO: create info...\n"); 260 INFO("CAIRO: create info...");
261 return info; 261 return info;
262 e = NULL; 262 e = NULL;
263} 263}
@@ -278,7 +278,7 @@ eng_setup(Evas *e, void *in)
278 Evas_Engine_Info_Cairo_X11 *info; 278 Evas_Engine_Info_Cairo_X11 *info;
279 279
280 info = (Evas_Engine_Info_Cairo_X11 *)in; 280 info = (Evas_Engine_Info_Cairo_X11 *)in;
281 printf("CAIRO: setup info...\n"); 281 INFO("CAIRO: setup info...");
282 if (!e->engine.data.output) 282 if (!e->engine.data.output)
283 e->engine.data.output = 283 e->engine.data.output =
284 eng_output_setup(e->output.w, 284 eng_output_setup(e->output.w,
@@ -314,7 +314,7 @@ eng_output_setup(int w, int h, Display *disp, Drawable draw, Visual *vis, Colorm
314 free(re); 314 free(re);
315 return NULL; 315 return NULL;
316 } 316 }
317 printf("CAIRO: cairo window setup done.\n"); 317 INFO("CAIRO: cairo window setup done.");
318 evas_common_cpu_init(); 318 evas_common_cpu_init();
319 319
320 evas_common_blend_init(); 320 evas_common_blend_init();
diff --git a/legacy/evas/src/modules/engines/direct3d/evas_engine.h b/legacy/evas/src/modules/engines/direct3d/evas_engine.h
index 84c043172a..6257227066 100644
--- a/legacy/evas/src/modules/engines/direct3d/evas_engine.h
+++ b/legacy/evas/src/modules/engines/direct3d/evas_engine.h
@@ -22,7 +22,7 @@ extern "C" {
22 22
23//#define ENABLE_LOG_PRINTF 23//#define ENABLE_LOG_PRINTF
24#ifdef ENABLE_LOG_PRINTF 24#ifdef ENABLE_LOG_PRINTF
25#define Log(str, ...) printf("D3D "str"\n", __VA_ARGS__) 25#define Log(str, ...) INFO("D3D "str, __VA_ARGS__)
26#else 26#else
27#define Log(str, ...) 27#define Log(str, ...)
28#endif 28#endif
diff --git a/legacy/evas/src/modules/engines/directfb/evas_engine.c b/legacy/evas/src/modules/engines/directfb/evas_engine.c
index 28840314ca..aa91d4881f 100644
--- a/legacy/evas/src/modules/engines/directfb/evas_engine.c
+++ b/legacy/evas/src/modules/engines/directfb/evas_engine.c
@@ -69,8 +69,8 @@ _dfb_surface_clear(IDirectFBSurface *surface, int x, int y, int w, int h)
69 return; 69 return;
70 70
71 error: 71 error:
72 fprintf(stderr, "ERROR: could not clear surface: %s\n", 72 ERROR("DirectFB: could not clear surface: %s",
73 DirectFBErrorString(r)); 73 DirectFBErrorString(r));
74} 74}
75 75
76static void 76static void
@@ -93,7 +93,7 @@ _image_autoset_alpha(DirectFB_Engine_Image_Entry *image)
93 r = surface->GetPixelFormat(surface, &fmt); 93 r = surface->GetPixelFormat(surface, &fmt);
94 if (r != DFB_OK) 94 if (r != DFB_OK)
95 { 95 {
96 fprintf(stderr, "ERROR: could not get pixel format: %s\n", 96 ERROR("DirectFB: could not get pixel format: %s",
97 DirectFBErrorString(r)); 97 DirectFBErrorString(r));
98 return; 98 return;
99 } 99 }
@@ -114,8 +114,8 @@ _dfb_surface_update(IDirectFBSurface *surface, int x, int y, int w, int h)
114 cr.y2 = y + h - 1; 114 cr.y2 = y + h - 1;
115 r = surface->Flip(surface, &cr, DSFLIP_NONE); 115 r = surface->Flip(surface, &cr, DSFLIP_NONE);
116 if (r != DFB_OK) 116 if (r != DFB_OK)
117 fprintf(stderr, "ERROR: could not update surface: %s\n", 117 WARN("DirectFB: could not update surface: %s",
118 DirectFBErrorString(r)); 118 DirectFBErrorString(r));
119} 119}
120 120
121static IDirectFBSurface * 121static IDirectFBSurface *
@@ -138,7 +138,7 @@ _dfb_surface_from_data(IDirectFB *dfb, int w, int h, void *data)
138 r = dfb->CreateSurface(dfb, &desc, &s); 138 r = dfb->CreateSurface(dfb, &desc, &s);
139 if (r != DFB_OK) 139 if (r != DFB_OK)
140 { 140 {
141 fprintf(stderr, "ERROR: cannot create DirectFB surface: %s\n", 141 ERROR("DirectFB: cannot create DirectFB surface: %s",
142 DirectFBErrorString(r)); 142 DirectFBErrorString(r));
143 return NULL; 143 return NULL;
144 } 144 }
@@ -165,14 +165,14 @@ _dfb_blit_accel_caps_print(IDirectFBSurface *dst, IDirectFBSurface *src)
165 r = dst->GetAccelerationMask(dst, src, &mask); 165 r = dst->GetAccelerationMask(dst, src, &mask);
166 if (r != DFB_OK) 166 if (r != DFB_OK)
167 { 167 {
168 fprintf(stderr, "ERROR: Could not retrieve acceleration mask: %s\n", 168 ERROR("DirectFB: Could not retrieve acceleration mask: %s",
169 DirectFBErrorString(r)); 169 DirectFBErrorString(r));
170 return; 170 return;
171 } 171 }
172 172
173 fputs("Acceleration: ", stderr); 173 DEBUG("Acceleration: ");
174 174
175#define O(m) if (mask & m) fputs(#m " ", stderr) 175#define O(m) if (mask & m) DEBUG(#m " ")
176 O(DFXL_FILLRECTANGLE); 176 O(DFXL_FILLRECTANGLE);
177 O(DFXL_DRAWRECTANGLE); 177 O(DFXL_DRAWRECTANGLE);
178 O(DFXL_DRAWLINE); 178 O(DFXL_DRAWLINE);
@@ -183,8 +183,7 @@ _dfb_blit_accel_caps_print(IDirectFBSurface *dst, IDirectFBSurface *src)
183 O(DFXL_DRAWSTRING); 183 O(DFXL_DRAWSTRING);
184#undef O 184#undef O
185 185
186 if (mask == DFXL_NONE) fputs("<NONE>", stderr); 186 if (mask == DFXL_NONE) DEBUG("<NONE>");
187 fputc('\n', stderr);
188#endif /* DFB_DEBUG_ACCELERATION */ 187#endif /* DFB_DEBUG_ACCELERATION */
189} 188}
190 189
@@ -300,14 +299,14 @@ _dfb_surface_set_color_from_context(IDirectFBSurface *surface, RGBA_Draw_Context
300 goto error; 299 goto error;
301 300
302#ifdef DFB_DEBUG_FLAGS 301#ifdef DFB_DEBUG_FLAGS
303 printf("DRAW: color=%d %d %d %d, flags=%s\n", 302 DEBUG("DirectFB DRAW: color=%d %d %d %d, flags=%s",
304 r, g, b, a, _dfb_draw_flags_str(flags)); 303 r, g, b, a, _dfb_draw_flags_str(flags));
305#endif /* DFB_DEBUG_FLAGS */ 304#endif /* DFB_DEBUG_FLAGS */
306 305
307 return 1; 306 return 1;
308 307
309 error: 308 error:
310 fprintf(stderr, "ERROR: could not set color from context: %s\n", 309 ERROR("DirectFB: could not set color from context: %s",
311 DirectFBErrorString(res)); 310 DirectFBErrorString(res));
312 return 0; 311 return 0;
313} 312}
@@ -354,7 +353,7 @@ _dfb_surface_set_blit_params(DirectFB_Engine_Image_Entry *d, DirectFB_Engine_Ima
354 goto error; 353 goto error;
355 354
356#ifdef DFB_DEBUG_FLAGS 355#ifdef DFB_DEBUG_FLAGS
357 printf("BLIT: sfunc=%s, dfunc=%s, color=%d %d %d %d\n\tblit=%s\n\tdraw=%s\n", 356 DEBUG("DirectFB BLIT: sfunc=%s, dfunc=%s, color=%d %d %d %d\n\tblit=%s\n\tdraw=%s",
358 _dfb_blend_func_str(src_func), _dfb_blend_func_str(dst_func), 357 _dfb_blend_func_str(src_func), _dfb_blend_func_str(dst_func),
359 r, g, b, a, 358 r, g, b, a,
360 _dfb_blit_flags_str(blit_flags), _dfb_draw_flags_str(draw_flags)); 359 _dfb_blit_flags_str(blit_flags), _dfb_draw_flags_str(draw_flags));
@@ -363,8 +362,8 @@ _dfb_surface_set_blit_params(DirectFB_Engine_Image_Entry *d, DirectFB_Engine_Ima
363 return 1; 362 return 1;
364 363
365 error: 364 error:
366 fprintf(stderr, "ERROR: Could not set blit params: %s\n", 365 ERROR("DirectFB: Could not set blit params: %s",
367 DirectFBErrorString(res)); 366 DirectFBErrorString(res));
368 return 0; 367 return 0;
369} 368}
370 369
@@ -386,9 +385,8 @@ _dfb_lock_and_sync_image(IDirectFBSurface *surface, RGBA_Image *image, DFBSurfac
386 if (pitch != (sw * 4)) 385 if (pitch != (sw * 4))
387 { 386 {
388 /* XXX TODO: support other pixel formats. */ 387 /* XXX TODO: support other pixel formats. */
389 fprintf(stderr, 388 ERROR("DirectFB: IDirectFBSurface pitch(%d) is not supported: "
390 "ERROR: IDirectFBSurface pitch(%d) is not supported: " 389 "should be %d.",
391 "should be %d.\n",
392 pitch, sw * 4); 390 pitch, sw * 4);
393 surface->Unlock(surface); 391 surface->Unlock(surface);
394 return 0; 392 return 0;
@@ -613,7 +611,7 @@ evas_cache_image_dfb_mem_size_get(Engine_Image_Entry *eie)
613 r = deie->surface->GetSize(deie->surface, &w, &h); 611 r = deie->surface->GetSize(deie->surface, &w, &h);
614 if (r != DFB_OK) 612 if (r != DFB_OK)
615 { 613 {
616 fprintf(stderr, "ERROR: Could not get surface size: %s\n", 614 ERROR("DirectFB: Could not get surface size: %s",
617 DirectFBErrorString(r)); 615 DirectFBErrorString(r));
618 return size; 616 return size;
619 } 617 }
@@ -629,22 +627,20 @@ evas_cache_image_dfb_debug(const char *context, Engine_Image_Entry* eie)
629{ 627{
630 DirectFB_Engine_Image_Entry *eim = (DirectFB_Engine_Image_Entry *)eie; 628 DirectFB_Engine_Image_Entry *eim = (DirectFB_Engine_Image_Entry *)eie;
631 629
632 fprintf(stderr, "*** %s image (%p) ***\n", context, eim); 630 DEBUG("*** %s image (%p) ***", context, eim);
633 if (eim) 631 if (eim)
634 { 632 {
635 fprintf(stderr, 633 DEBUG("* W: %d\n"
636 "* W: %d\n"
637 "* H: %d\n" 634 "* H: %d\n"
638 "* R: %d\n" 635 "* R: %d\n"
639 "* Key: %s\n" 636 "* Key: %s\n"
640 "* DFB Surface: %p\n", 637 "* DFB Surface: %p",
641 eie->w, eie->h, eie->references, eie->cache_key, eim->surface); 638 eie->w, eie->h, eie->references, eie->cache_key, eim->surface);
642 639
643 if (eie->src) 640 if (eie->src)
644 fprintf(stderr, 641 DEBUG("* Pixels: %p", ((RGBA_Image*) eie->src)->image.data);
645 "* Pixels: %p\n", ((RGBA_Image*) eie->src)->image.data);
646 } 642 }
647 fputs("*** ***\n", stderr); 643 DEBUG("*** ***");
648} 644}
649#endif 645#endif
650 646
@@ -701,29 +697,28 @@ _is_dfb_data_ok(IDirectFB *idfb, IDirectFBSurface *surface, int w, int h)
701 697
702 if (!idfb) 698 if (!idfb)
703 { 699 {
704 fputs("ERROR: missing IDirectFB\n", stderr); 700 ERROR("missing IDirectFB");
705 return EINA_FALSE; 701 return EINA_FALSE;
706 } 702 }
707 dfb = idfb; 703 dfb = idfb;
708 704
709 if (!surface) 705 if (!surface)
710 { 706 {
711 fputs("ERROR: missing IDirectFBSurface\n", stderr); 707 ERROR("missing IDirectFBSurface");
712 return EINA_FALSE; 708 return EINA_FALSE;
713 } 709 }
714 710
715 r = surface->GetSize(surface, &sw, &sh); 711 r = surface->GetSize(surface, &sw, &sh);
716 if (r != DFB_OK) 712 if (r != DFB_OK)
717 { 713 {
718 fprintf(stderr, "ERROR: could not get surface %p size: %s\n", 714 ERROR("DirectFB: could not get surface %p size: %s",
719 surface, DirectFBErrorString(r)); 715 surface, DirectFBErrorString(r));
720 return EINA_FALSE; 716 return EINA_FALSE;
721 } 717 }
722 718
723 if ((w > sw) || (h > sh)) 719 if ((w > sw) || (h > sh))
724 { 720 {
725 fprintf(stderr, 721 ERROR("DirectFB: requested size is larger than surface: %dx%d > %dx%d",
726 "ERROR: requested size is larger than surface: %dx%d > %dx%d\n",
727 w, h, sw, sh); 722 w, h, sw, sh);
728 return EINA_FALSE; 723 return EINA_FALSE;
729 } 724 }
@@ -750,7 +745,7 @@ _evas_common_init(void)
750 evas_common_line_init(); 745 evas_common_line_init();
751 evas_common_font_init(); 746 evas_common_font_init();
752 evas_common_draw_init(); 747 evas_common_draw_init();
753 evas_common_tilebuf_init(); 748 evas_common_tilebuf_init();
754} 749}
755 750
756static int 751static int
@@ -765,7 +760,7 @@ evas_engine_dfb_output_reconfigure(Render_Engine *re, int w, int h)
765 re->tb = evas_common_tilebuf_new(w, h); 760 re->tb = evas_common_tilebuf_new(w, h);
766 if (!re->tb) 761 if (!re->tb)
767 { 762 {
768 fputs("ERROR: could not allocate tile buffer.\n", stderr); 763 ERROR("DirectFB: could not allocate tile buffer.");
769 goto failed_tilebuf; 764 goto failed_tilebuf;
770 } 765 }
771 evas_common_tilebuf_set_tile_size(re->tb, TILESIZE, TILESIZE); 766 evas_common_tilebuf_set_tile_size(re->tb, TILESIZE, TILESIZE);
@@ -778,7 +773,7 @@ evas_engine_dfb_output_reconfigure(Render_Engine *re, int w, int h)
778 evas_cache_engine_image_engine(re->cache, re->spec->surface); 773 evas_cache_engine_image_engine(re->cache, re->spec->surface);
779 if (!re->screen_image) 774 if (!re->screen_image)
780 { 775 {
781 fputs("ERROR: RGBA_Image allocation from DFB failed\n", stderr); 776 ERROR("DirectFB: RGBA_Image allocation from DFB failed");
782 goto failed_image; 777 goto failed_image;
783 } 778 }
784 re->screen_image->flags.engine_surface = 1; 779 re->screen_image->flags.engine_surface = 1;
@@ -793,7 +788,7 @@ evas_engine_dfb_output_reconfigure(Render_Engine *re, int w, int h)
793 re->tb = NULL; 788 re->tb = NULL;
794 failed_tilebuf: 789 failed_tilebuf:
795 re->screen_image = NULL; 790 re->screen_image = NULL;
796 fputs("ERROR: Evas DirectFB reconfigure failed\n", stderr); 791 ERROR("DirectFB: Evas DirectFB reconfigure failed");
797 return 0; 792 return 0;
798} 793}
799 794
@@ -819,13 +814,13 @@ _dfb_output_setup(int w, int h, const struct Evas_Engine_DirectFB_Spec *spec)
819 evas_common_image_cache_get()); 814 evas_common_image_cache_get());
820 if (!re->cache) 815 if (!re->cache)
821 { 816 {
822 fputs("ERROR: Evas_Cache_Engine_Image allocation failed!\n", stderr); 817 ERROR("DirectFB: Evas_Cache_Engine_Image allocation failed!");
823 goto fatal_after_engine; 818 goto fatal_after_engine;
824 } 819 }
825 820
826 if (!evas_engine_dfb_output_reconfigure(re, w, h)) 821 if (!evas_engine_dfb_output_reconfigure(re, w, h))
827 { 822 {
828 fputs("ERROR: Could not reconfigure evas engine.\n", stderr); 823 ERROR("DirectFB: Could not reconfigure evas engine.");
829 goto fatal_after_reconfigure; 824 goto fatal_after_reconfigure;
830 } 825 }
831 826
@@ -839,7 +834,7 @@ _dfb_output_setup(int w, int h, const struct Evas_Engine_DirectFB_Spec *spec)
839 fatal_after_engine: 834 fatal_after_engine:
840 free(re); 835 free(re);
841 fatal: 836 fatal:
842 fputs("FATAL: unable to continue, abort()!\n", stderr); 837 CRITICAL("DirectFB: unable to continue, abort()!");
843 abort(); 838 abort();
844 return NULL; 839 return NULL;
845} 840}
@@ -887,7 +882,7 @@ static void
887evas_engine_dfb_output_resize(void *data, int w, int h) 882evas_engine_dfb_output_resize(void *data, int w, int h)
888{ 883{
889 if (!evas_engine_dfb_output_reconfigure(data, w, h)) 884 if (!evas_engine_dfb_output_reconfigure(data, w, h))
890 fputs("ERROR: failed to resize DirectFB evas\n", stderr); 885 ERROR("DirectFB: failed to resize DirectFB evas");
891} 886}
892 887
893static void 888static void
@@ -1031,7 +1026,7 @@ evas_engine_dfb_output_idle_flush(void *data)
1031 Render_Engine *re = data; 1026 Render_Engine *re = data;
1032 1027
1033 if (re->update_regions_count != 0) 1028 if (re->update_regions_count != 0)
1034 fputs("ERROR: update_regions_count not 0 as it should be!\n", stderr); 1029 ERROR("DirectFB: update_regions_count not 0 as it should be!");
1035 1030
1036 free(re->update_regions); 1031 free(re->update_regions);
1037 re->update_regions_count = 0; 1032 re->update_regions_count = 0;
@@ -1351,7 +1346,7 @@ evas_engine_dfb_image_data_get(void *data __UNUSED__, void *image, int to_write,
1351 break; 1346 break;
1352 1347
1353 error: 1348 error:
1354 fprintf(stderr, "ERROR: could not lock surface %p: %s\n", 1349 ERROR("DirectFB: could not lock surface %p: %s",
1355 s, DirectFBErrorString(r)); 1350 s, DirectFBErrorString(r));
1356 *image_data = NULL; 1351 *image_data = NULL;
1357 break; 1352 break;
diff --git a/legacy/evas/src/modules/engines/fb/evas_fb_main.c b/legacy/evas/src/modules/engines/fb/evas_fb_main.c
index c764a22ea8..114cc25ba6 100644
--- a/legacy/evas/src/modules/engines/fb/evas_fb_main.c
+++ b/legacy/evas/src/modules/engines/fb/evas_fb_main.c
@@ -377,8 +377,8 @@ fb_getmode(void)
377 bpp = mode->fb_var.bits_per_pixel / 8; 377 bpp = mode->fb_var.bits_per_pixel / 8;
378 break; 378 break;
379 default: 379 default:
380 fprintf(stderr, "Cannot handle framebuffer of depth %i\n", 380 ERROR("EvasFB: Cannot handle framebuffer of depth %i",
381 mode->fb_var.bits_per_pixel); 381 mode->fb_var.bits_per_pixel);
382 fb_cleanup(); 382 fb_cleanup();
383 free(mode); 383 free(mode);
384 return NULL; 384 return NULL;
@@ -418,7 +418,7 @@ fb_setvt(int vtno)
418 chown(vtname, getuid(), getgid()); 418 chown(vtname, getuid(), getgid());
419 if (access(vtname,R_OK | W_OK) == -1) 419 if (access(vtname,R_OK | W_OK) == -1)
420 { 420 {
421 fprintf(stderr,"access %s: %s\n",vtname,strerror(errno)); 421 CRITICAL("EvasFB: access %s: %s",vtname,strerror(errno));
422 exit(1); 422 exit(1);
423 } 423 }
424 open(vtname,O_RDWR); 424 open(vtname,O_RDWR);
@@ -463,7 +463,7 @@ fb_init(int vt, int device)
463 } 463 }
464 if (fb == -1) 464 if (fb == -1)
465 { 465 {
466 fprintf(stderr,"open %s: %s\n", dev, strerror(errno)); 466 CRITICAL("open %s: %s", dev, strerror(errno));
467 fb_cleanup(); 467 fb_cleanup();
468 exit(1); 468 exit(1);
469 } 469 }
@@ -495,7 +495,7 @@ fb_init(int vt, int device)
495 tty = 0; 495 tty = 0;
496 else if ((tty = open("/dev/tty",O_RDWR)) == -1) 496 else if ((tty = open("/dev/tty",O_RDWR)) == -1)
497 { 497 {
498 fprintf(stderr,"open %s: %s\n", "/dev/tty", strerror(errno)); 498 CITICAL("open %s: %s", "/dev/tty", strerror(errno));
499 exit(1); 499 exit(1);
500 } 500 }
501 if (tty) 501 if (tty)
@@ -527,7 +527,7 @@ fb_postinit(FB_Mode *mode)
527 527
528 if (fb_fix.type != FB_TYPE_PACKED_PIXELS) 528 if (fb_fix.type != FB_TYPE_PACKED_PIXELS)
529 { 529 {
530 fprintf(stderr,"can handle only packed pixel frame buffers\n"); 530 CRITICAL("can handle only packed pixel frame buffers");
531 fb_cleanup(); 531 fb_cleanup();
532 exit(1); 532 exit(1);
533 } 533 }
diff --git a/legacy/evas/src/modules/engines/fb/evas_outbuf.c b/legacy/evas/src/modules/engines/fb/evas_outbuf.c
index 322502495e..e2210e7b83 100644
--- a/legacy/evas/src/modules/engines/fb/evas_outbuf.c
+++ b/legacy/evas/src/modules/engines/fb/evas_outbuf.c
@@ -12,7 +12,7 @@ void
12evas_fb_outbuf_fb_free(Outbuf *buf) 12evas_fb_outbuf_fb_free(Outbuf *buf)
13{ 13{
14 /* FIXME: impliment */ 14 /* FIXME: impliment */
15 printf("destroying fb info.. not implemented!!!! WARNING. LEAK!\n"); 15 WARN("destroying fb info.. not implemented!!!! WARNING. LEAK!");
16 if (buf->priv.back_buf) 16 if (buf->priv.back_buf)
17 evas_cache_image_drop(&buf->priv.back_buf->cache_entry); 17 evas_cache_image_drop(&buf->priv.back_buf->cache_entry);
18 free(buf); 18 free(buf);
diff --git a/legacy/evas/src/modules/engines/gl_glew/evas_glew_main.c b/legacy/evas/src/modules/engines/gl_glew/evas_glew_main.c
index 1981719d3f..68a67d7f5c 100644
--- a/legacy/evas/src/modules/engines/gl_glew/evas_glew_main.c
+++ b/legacy/evas/src/modules/engines/gl_glew/evas_glew_main.c
@@ -44,7 +44,7 @@ evas_glew_init(HWND window, HDC *dc, HGLRC *context)
44 44
45 if (GLEW_VERSION_2_0) 45 if (GLEW_VERSION_2_0)
46 { 46 {
47 printf ("2.0\n"); 47 INFO("2.0");
48 } 48 }
49 49
50 return 1; 50 return 1;
diff --git a/legacy/evas/src/modules/engines/gl_x11/evas_engine.c b/legacy/evas/src/modules/engines/gl_x11/evas_engine.c
index 14cbed88f7..d11e7e631a 100644
--- a/legacy/evas/src/modules/engines/gl_x11/evas_engine.c
+++ b/legacy/evas/src/modules/engines/gl_x11/evas_engine.c
@@ -198,7 +198,7 @@ eng_output_redraws_clear(void *data)
198 198
199 re = (Render_Engine *)data; 199 re = (Render_Engine *)data;
200 re->win->draw.redraw = 0; 200 re->win->draw.redraw = 0;
201// printf("GL: finish update cycle!\n"); 201// INFO("GL: finish update cycle!");
202} 202}
203 203
204/* at least the nvidia drivers are so abysmal that copying from the backbuffer 204/* at least the nvidia drivers are so abysmal that copying from the backbuffer
diff --git a/legacy/evas/src/modules/engines/quartz/evas_engine.c b/legacy/evas/src/modules/engines/quartz/evas_engine.c
index 56377027f8..91c646d9a6 100644
--- a/legacy/evas/src/modules/engines/quartz/evas_engine.c
+++ b/legacy/evas/src/modules/engines/quartz/evas_engine.c
@@ -686,15 +686,15 @@ eng_gradient_draw(void *data, void *context, void *surface, void *gradient, int
686 RGBA_Draw_Context *dc = (RGBA_Draw_Context *)context; 686 RGBA_Draw_Context *dc = (RGBA_Draw_Context *)context;
687 Evas_Quartz_Gradient *gr = (Evas_Quartz_Gradient *)gradient; 687 Evas_Quartz_Gradient *gr = (Evas_Quartz_Gradient *)gradient;
688 688
689 printf("#Gradient#\n"); 689 INFO("#Gradient#");
690 printf("Fill: %i %i %i %i\n", gr->grad->fill.x, gr->grad->fill.y, gr->grad->fill.w, gr->grad->fill.h); 690 INFO("Fill: %i %i %i %i", gr->grad->fill.x, gr->grad->fill.y, gr->grad->fill.w, gr->grad->fill.h);
691 printf("Type: %s %s\n", gr->grad->type.name, gr->grad->type.params); 691 INFO("Type: %s %s", gr->grad->type.name, gr->grad->type.params);
692 printf("XYWH: %i %i %i %i\n", x, y, w, h); 692 INFO("XYWH: %i %i %i %i", x, y, w, h);
693 printf("Geom: %p %p\n", gr->grad->type.geometer, gr->grad->type.geometer->get_fill_func); 693 INFO("Geom: %p %p", gr->grad->type.geometer, gr->grad->type.geometer->get_fill_func);
694 printf("Map: len: %d angle: %f direction: %d offset: %f\n", gr->grad->map.len, gr->grad->map.angle, gr->grad->map.direction, gr->grad->map.offset); 694 INFO("Map: len: %d angle: %f direction: %d offset: %f", gr->grad->map.len, gr->grad->map.angle, gr->grad->map.direction, gr->grad->map.offset);
695 printf("Color: nstops: %d len: %d\n", gr->grad->color.nstops, gr->grad->color.len); 695 INFO("Color: nstops: %d len: %d", gr->grad->color.nstops, gr->grad->color.len);
696 printf("Alpha: nstops: %d len: %d\n", gr->grad->alpha.nstops, gr->grad->alpha.len); 696 INFO("Alpha: nstops: %d len: %d", gr->grad->alpha.nstops, gr->grad->alpha.len);
697 printf("\n"); 697 INFO("");
698 698
699 if ((gr->sw != w) || (gr->sh != h)) 699 if ((gr->sw != w) || (gr->sh != h))
700 gr->changed = 1; 700 gr->changed = 1;
diff --git a/legacy/evas/src/modules/engines/software_16/evas_engine.c b/legacy/evas/src/modules/engines/software_16/evas_engine.c
index 25c8867314..70cf51e199 100644
--- a/legacy/evas/src/modules/engines/software_16/evas_engine.c
+++ b/legacy/evas/src/modules/engines/software_16/evas_engine.c
@@ -11,7 +11,7 @@
11 */ 11 */
12 12
13#define NOT_IMPLEMENTED() \ 13#define NOT_IMPLEMENTED() \
14 fprintf(stderr, "NOT_IMPLEMENTED: %s() at %s:%d\n", \ 14 WARN("NOT_IMPLEMENTED: %s() at %s:%d", \
15 __FUNCTION__, __FILE__, __LINE__) 15 __FUNCTION__, __FILE__, __LINE__)
16 16
17static void * 17static void *
@@ -509,7 +509,7 @@ eng_image_new_from_data(void *data __UNUSED__, int w, int h, DATA32 *image_data,
509{ 509{
510 if ((image_data) && (cspace != EVAS_COLORSPACE_RGB565_A5P)) 510 if ((image_data) && (cspace != EVAS_COLORSPACE_RGB565_A5P))
511 { 511 {
512 fprintf(stderr, "Unsupported colorspace %d in %s() (%s:%d)\n", 512 WARN("Unsupported colorspace %d in %s() (%s:%d)",
513 cspace, __FUNCTION__, __FILE__, __LINE__); 513 cspace, __FUNCTION__, __FILE__, __LINE__);
514 return NULL; 514 return NULL;
515 } 515 }
@@ -521,7 +521,7 @@ eng_image_new_from_copied_data(void *data __UNUSED__, int w, int h, DATA32 *imag
521{ 521{
522 if ((image_data) && (cspace != EVAS_COLORSPACE_RGB565_A5P)) 522 if ((image_data) && (cspace != EVAS_COLORSPACE_RGB565_A5P))
523 { 523 {
524 fprintf(stderr, "Unsupported colorspace %d in %s() (%s:%d)\n", 524 WARN("Unsupported colorspace %d in %s() (%s:%d)",
525 cspace, __FUNCTION__, __FILE__, __LINE__); 525 cspace, __FUNCTION__, __FILE__, __LINE__);
526 return NULL; 526 return NULL;
527 } 527 }
diff --git a/legacy/evas/src/modules/engines/software_16_sdl/evas_engine.c b/legacy/evas/src/modules/engines/software_16_sdl/evas_engine.c
index 6828f6a106..5ccb789630 100644
--- a/legacy/evas/src/modules/engines/software_16_sdl/evas_engine.c
+++ b/legacy/evas/src/modules/engines/software_16_sdl/evas_engine.c
@@ -5,6 +5,7 @@
5#include <time.h> 5#include <time.h>
6#include <SDL/SDL.h> 6#include <SDL/SDL.h>
7 7
8#include "evas_common.h"
8#include "evas_engine.h" 9#include "evas_engine.h"
9 10
10/* function tables - filled in later (func and parent func) */ 11/* function tables - filled in later (func and parent func) */
@@ -143,7 +144,7 @@ _sdl16_output_setup(int w, int h, int rotation, int fullscreen, int noframe, int
143 re->cache = evas_cache_engine_image_init(&_sdl16_cache_engine_image_cb, evas_common_soft16_image_cache_get()); 144 re->cache = evas_cache_engine_image_init(&_sdl16_cache_engine_image_cb, evas_common_soft16_image_cache_get());
144 if (!re->cache) 145 if (!re->cache)
145 { 146 {
146 fprintf(stderr, "Evas_Cache_Engine_Image allocation failed!\n"); 147 ERROR("Evas_Cache_Engine_Image allocation failed!");
147 free(re); 148 free(re);
148 return NULL; 149 return NULL;
149 } 150 }
@@ -169,7 +170,7 @@ _sdl16_output_setup(int w, int h, int rotation, int fullscreen, int noframe, int
169 | (noframe ? SDL_NOFRAME : 0)); 170 | (noframe ? SDL_NOFRAME : 0));
170 if (!surface) 171 if (!surface)
171 { 172 {
172 fprintf(stderr, "SDL_SetVideoMode [ %i x %i x 16 ] failed\n", w, h); 173 ERROR("SDL_SetVideoMode [ %i x %i x 16 ] failed", w, h);
173 evas_cache_engine_image_shutdown(re->cache); 174 evas_cache_engine_image_shutdown(re->cache);
174 free(re); 175 free(re);
175 return NULL; 176 return NULL;
@@ -181,7 +182,7 @@ _sdl16_output_setup(int w, int h, int rotation, int fullscreen, int noframe, int
181 re->soft16_engine_image = (SDL_Engine_Image_Entry *) evas_cache_engine_image_engine(re->cache, surface); 182 re->soft16_engine_image = (SDL_Engine_Image_Entry *) evas_cache_engine_image_engine(re->cache, surface);
182 if (!re->soft16_engine_image) 183 if (!re->soft16_engine_image)
183 { 184 {
184 fprintf(stderr, "Soft16_Image allocation from SDL failed\n"); 185 ERROR("Soft16_Image allocation from SDL failed");
185 evas_cache_engine_image_shutdown(re->cache); 186 evas_cache_engine_image_shutdown(re->cache);
186 free(re); 187 free(re);
187 return NULL; 188 return NULL;
@@ -203,7 +204,7 @@ evas_engine_sdl16_setup(Evas *e, void *in)
203 204
204 if (SDL_InitSubSystem(SDL_INIT_VIDEO) < 0) 205 if (SDL_InitSubSystem(SDL_INIT_VIDEO) < 0)
205 { 206 {
206 fprintf(stderr, "SDL_Init failed with %s\n", SDL_GetError()); 207 ERROR("SDL_Init failed with %s", SDL_GetError());
207 SDL_Quit(); 208 SDL_Quit();
208 return 0; 209 return 0;
209 } 210 }
@@ -262,13 +263,13 @@ evas_engine_sdl16_output_resize(void *data, int w, int h)
262 | (re->flags.noframe ? SDL_NOFRAME : 0)); 263 | (re->flags.noframe ? SDL_NOFRAME : 0));
263 if (!surface) 264 if (!surface)
264 { 265 {
265 fprintf(stderr, "Unable to change the resolution to : %ix%i\n", w, h); 266 ERROR("Unable to change the resolution to : %ix%i", w, h);
266 exit(-1); 267 exit(-1);
267 } 268 }
268 re->soft16_engine_image = (SDL_Engine_Image_Entry *) evas_cache_engine_image_engine(re->cache, surface); 269 re->soft16_engine_image = (SDL_Engine_Image_Entry *) evas_cache_engine_image_engine(re->cache, surface);
269 if (!re->soft16_engine_image) 270 if (!re->soft16_engine_image)
270 { 271 {
271 fprintf(stderr, "RGBA_Image allocation from SDL failed\n"); 272 ERROR("RGBA_Image allocation from SDL failed");
272 exit(-1); 273 exit(-1);
273 } 274 }
274 275
@@ -611,12 +612,12 @@ evas_engine_sdl16_image_new_from_copied_data(void *data,
611 612
612 if (cspace != EVAS_COLORSPACE_RGB565_A5P) 613 if (cspace != EVAS_COLORSPACE_RGB565_A5P)
613 { 614 {
614 fprintf(stderr, "Unsupported colorspace %d in %s() (%s:%d)\n", 615 WARN("Unsupported colorspace %d in %s() (%s:%d)",
615 cspace, __FUNCTION__, __FILE__, __LINE__); 616 cspace, __FUNCTION__, __FILE__, __LINE__);
616 return NULL; 617 return NULL;
617 } 618 }
618 619
619 fprintf(stderr, "s image_data: %p\n", image_data); 620 WARN("s image_data: %p", image_data);
620 621
621 return evas_cache_engine_image_copied_data(re->cache, 622 return evas_cache_engine_image_copied_data(re->cache,
622 w, h, 623 w, h,
@@ -631,7 +632,7 @@ evas_engine_sdl16_image_new_from_data(void *data, int w, int h, DATA32* image_da
631 632
632 if (cspace != EVAS_COLORSPACE_RGB565_A5P) 633 if (cspace != EVAS_COLORSPACE_RGB565_A5P)
633 { 634 {
634 fprintf(stderr, "Unsupported colorspace %d in %s() (%s:%d)\n", 635 WARN("Unsupported colorspace %d in %s() (%s:%d)",
635 cspace, __FUNCTION__, __FILE__, __LINE__); 636 cspace, __FUNCTION__, __FILE__, __LINE__);
636 return NULL; 637 return NULL;
637 } 638 }
diff --git a/legacy/evas/src/modules/engines/software_16_wince/evas_wince_ddraw_buffer.cpp b/legacy/evas/src/modules/engines/software_16_wince/evas_wince_ddraw_buffer.cpp
index 4c6663d90e..d3e887c1d8 100644
--- a/legacy/evas/src/modules/engines/software_16_wince/evas_wince_ddraw_buffer.cpp
+++ b/legacy/evas/src/modules/engines/software_16_wince/evas_wince_ddraw_buffer.cpp
@@ -38,32 +38,32 @@ evas_software_wince_ddraw_init(HWND window,
38 priv = (Evas_Engine_WinCE_DDraw_Priv *)malloc(sizeof(Evas_Engine_WinCE_DDraw_Priv)); 38 priv = (Evas_Engine_WinCE_DDraw_Priv *)malloc(sizeof(Evas_Engine_WinCE_DDraw_Priv));
39 if (!priv) 39 if (!priv)
40 return NULL; 40 return NULL;
41 41
42 priv->module = LoadLibrary(L"ddraw.dll"); 42 priv->module = LoadLibrary(L"ddraw.dll");
43 if (!priv->module) 43 if (!priv->module)
44 { 44 {
45 fprintf(stderr, "[Evas] [Engine] [WinCE DDraw] Can not load ddraw.dll\n"); 45 CRITICAL("[Engine] [WinCE DDraw] Can not load ddraw.dll");
46 goto free_priv; 46 goto free_priv;
47 } 47 }
48 48
49 lib_DirectDrawCreate = (fct_DirectDrawCreate)GetProcAddress(priv->module, L"DirectDrawCreate"); 49 lib_DirectDrawCreate = (fct_DirectDrawCreate)GetProcAddress(priv->module, L"DirectDrawCreate");
50 if (!lib_DirectDrawCreate) 50 if (!lib_DirectDrawCreate)
51 { 51 {
52 fprintf(stderr, "[Evas] [Engine] [WinCE DDraw] Can not initialize DirectDraw\n"); 52 CRITICAL("[Engine] [WinCE DDraw] Can not initialize DirectDraw");
53 goto free_lib; 53 goto free_lib;
54 } 54 }
55 55
56 res = lib_DirectDrawCreate(NULL, (IUnknown**)&priv->object, NULL); 56 res = lib_DirectDrawCreate(NULL, (IUnknown**)&priv->object, NULL);
57 if (FAILED(res)) 57 if (FAILED(res))
58 { 58 {
59 fprintf(stderr, "[Evas] [Engine] [WinCE DDraw] Can not create DirectDraw object\n"); 59 CRITICAL("[Engine] [WinCE DDraw] Can not create DirectDraw object");
60 goto free_lib; 60 goto free_lib;
61 } 61 }
62 62
63 res = priv->object->SetCooperativeLevel(window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); 63 res = priv->object->SetCooperativeLevel(window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN);
64 if (FAILED(res)) 64 if (FAILED(res))
65 { 65 {
66 fprintf(stderr, "[Evas] [Engine] [WinCE DDraw] Can not set window to fullscreen\n"); 66 CRITICAL("[Engine] [WinCE DDraw] Can not set window to fullscreen");
67 goto release_object; 67 goto release_object;
68 } 68 }
69 69
@@ -75,7 +75,7 @@ evas_software_wince_ddraw_init(HWND window,
75 res = priv->object->CreateSurface(&surface_desc, &priv->surface, NULL); 75 res = priv->object->CreateSurface(&surface_desc, &priv->surface, NULL);
76 if (FAILED(res)) 76 if (FAILED(res))
77 { 77 {
78 fprintf(stderr, "[Evas] [Engine] [WinCE DDraw] Can not create surface\n"); 78 CRITICAL("[Engine] [WinCE DDraw] Can not create surface");
79 goto release_object; 79 goto release_object;
80 } 80 }
81 81
@@ -84,7 +84,7 @@ evas_software_wince_ddraw_init(HWND window,
84 res = priv->surface->Lock(NULL, &surface_desc, DDLOCK_READONLY, NULL); 84 res = priv->surface->Lock(NULL, &surface_desc, DDLOCK_READONLY, NULL);
85 if (FAILED(res)) 85 if (FAILED(res))
86 { 86 {
87 fprintf(stderr, "[Evas] [Engine] [WinCE DDraw] Can not lock surface\n"); 87 CRITICAL("[Evas] [Engine] [WinCE DDraw] Can not lock surface");
88 goto release_surface; 88 goto release_surface;
89 } 89 }
90 90
@@ -95,16 +95,16 @@ evas_software_wince_ddraw_init(HWND window,
95 if ((priv->width != width) || 95 if ((priv->width != width) ||
96 (priv->height != height)) 96 (priv->height != height))
97 { 97 {
98 fprintf(stderr, "[Evas] [Engine] [WinCE DDraw] Size mismatch\n"); 98 CRITICAL("[Engine] [WinCE DDraw] Size mismatch");
99 fprintf(stderr, "[Evas] [Engine] [WinCE DDraw] asked : %dx%d\n", width, height); 99 CRITICAL("[Engine] [WinCE DDraw] asked : %dx%d", width, height);
100 fprintf(stderr, "[Evas] [Engine] [WinCE DDraw] got : %dx%d\n", priv->width, priv->height); 100 CRITICAL("[Engine] [WinCE DDraw] got : %dx%d", priv->width, priv->height);
101 goto release_surface; 101 goto release_surface;
102 } 102 }
103 103
104 res = priv->surface->Unlock(NULL); 104 res = priv->surface->Unlock(NULL);
105 if (FAILED(res)) 105 if (FAILED(res))
106 { 106 {
107 fprintf(stderr, "[Evas] [Engine] [WinCE DDraw] Can not unlock surface\n"); 107 CRITICAL("[Engine] [WinCE DDraw] Can not unlock surface");
108 goto release_surface; 108 goto release_surface;
109 } 109 }
110 110
diff --git a/legacy/evas/src/modules/engines/software_16_wince/evas_wince_fb_buffer.c b/legacy/evas/src/modules/engines/software_16_wince/evas_wince_fb_buffer.c
index 165e7521ad..84cf484dd2 100644
--- a/legacy/evas/src/modules/engines/software_16_wince/evas_wince_fb_buffer.c
+++ b/legacy/evas/src/modules/engines/software_16_wince/evas_wince_fb_buffer.c
@@ -51,7 +51,7 @@ _evas_software_wince_gxinfo_init(HDC dc, int *width, int *height, void **buffer)
51 (char *) &gxInfo); 51 (char *) &gxInfo);
52 if (result <= 0) 52 if (result <= 0)
53 { 53 {
54 fprintf (stderr, "[Evas] [Engine] [WinCE FB] ExtEscape() with GETGXINFO failed\n"); 54 ERROR("[Engine] [WinCE FB] ExtEscape() with GETGXINFO failed");
55 return 0; 55 return 0;
56 } 56 }
57 57
@@ -79,7 +79,7 @@ evas_software_wince_fb_init(HWND window,
79 dc = GetDC (window); 79 dc = GetDC (window);
80 if (!dc) 80 if (!dc)
81 { 81 {
82 fprintf (stderr, "[Evas] [Engine] [WinCE FB] Can not get DC\n"); 82 ERROR("[Engine] [WinCE FB] Can not get DC");
83 free(priv); 83 free(priv);
84 return NULL; 84 return NULL;
85 } 85 }
@@ -102,9 +102,9 @@ evas_software_wince_fb_init(HWND window,
102 if ((priv->width != width) || 102 if ((priv->width != width) ||
103 (priv->height != height)) 103 (priv->height != height))
104 { 104 {
105 fprintf (stderr, "[Evas] [Engine] [WinCE FB] Size mismatch\n"); 105 ERROR("[Engine] [WinCE FB] Size mismatch");
106 fprintf (stderr, "[Evas] [Engine] [WinCE FB] asked: %dx%d\n", width, height); 106 ERROR("[Engine] [WinCE FB] asked: %dx%d", width, height);
107 fprintf (stderr, "[Evas] [Engine] [WinCE FB] got : %dx%d\n", priv->width, priv->height); 107 ERROR("[Engine] [WinCE FB] got : %dx%d", priv->width, priv->height);
108 ReleaseDC(window, dc); 108 ReleaseDC(window, dc);
109 free(priv); 109 free(priv);
110 return NULL; 110 return NULL;
@@ -119,8 +119,8 @@ evas_software_wince_fb_init(HWND window,
119 (rfbi.wBPP != 16) || 119 (rfbi.wBPP != 16) ||
120 (rfbi.wFormat != 1)) 120 (rfbi.wFormat != 1))
121 { 121 {
122 fprintf (stderr, "[Evas] [Engine] [WinCE FB] ExtEscape() with GETRAWFRAMEBUFFER failed\n"); 122 ERRPR("[Engine] [WinCE FB] ExtEscape() with GETRAWFRAMEBUFFER failed");
123 fprintf (stderr, "[Evas] [Engine] [WinCE FB] trying ExtEscape() with GETGXINFO\n"); 123 ERROR("[Engine] [WinCE FB] trying ExtEscape() with GETGXINFO");
124 if (!_evas_software_wince_gxinfo_init(dc, &priv->width, &priv->height, &priv->buffer)) 124 if (!_evas_software_wince_gxinfo_init(dc, &priv->width, &priv->height, &priv->buffer))
125 { 125 {
126 ReleaseDC(window, dc); 126 ReleaseDC(window, dc);
@@ -139,9 +139,9 @@ evas_software_wince_fb_init(HWND window,
139 if ((priv->width != width) || 139 if ((priv->width != width) ||
140 (priv->height != height)) 140 (priv->height != height))
141 { 141 {
142 fprintf (stderr, "[Evas] [Engine] [WinCE FB] Size mismatch\n"); 142 ERROR("[Engine] [WinCE FB] Size mismatch");
143 fprintf (stderr, "[Evas] [Engine] [WinCE FB] asked: %dx%d\n", width, height); 143 ERROR("[Engine] [WinCE FB] asked: %dx%d", width, height);
144 fprintf (stderr, "[Evas] [Engine] [WinCE FB] got : %dx%d\n", priv->width, priv->height); 144 ERROR("[Engine] [WinCE FB] got : %dx%d", priv->width, priv->height);
145 ReleaseDC(window, dc); 145 ReleaseDC(window, dc);
146 free(priv); 146 free(priv);
147 return NULL; 147 return NULL;
diff --git a/legacy/evas/src/modules/engines/software_16_wince/evas_wince_gapi_buffer.c b/legacy/evas/src/modules/engines/software_16_wince/evas_wince_gapi_buffer.c
index 486b095cce..ecb47952ba 100644
--- a/legacy/evas/src/modules/engines/software_16_wince/evas_wince_gapi_buffer.c
+++ b/legacy/evas/src/modules/engines/software_16_wince/evas_wince_gapi_buffer.c
@@ -110,7 +110,7 @@ evas_software_wince_gapi_init(HWND window,
110 gapi_lib = LoadLibrary(L"gx.dll"); 110 gapi_lib = LoadLibrary(L"gx.dll");
111 if (!gapi_lib) 111 if (!gapi_lib)
112 { 112 {
113 fprintf (stderr, "[Evas] [Engine] [WinCE GAPI] Can not load gx.dll\n"); 113 ERROR("[Engine] [WinCE GAPI] Can not load gx.dll");
114 goto free_priv; 114 goto free_priv;
115 } 115 }
116 } 116 }
@@ -131,13 +131,13 @@ evas_software_wince_gapi_init(HWND window,
131 !suspend || 131 !suspend ||
132 !resume) 132 !resume)
133 { 133 {
134 fprintf (stderr, "[Evas] [Engine] [WinCE GAPI] Can not find valid symbols\n"); 134 ERROR("[Engine] [WinCE GAPI] Can not find valid symbols");
135 goto free_lib; 135 goto free_lib;
136 } 136 }
137 137
138 if (!display_open(window, GX_FULLSCREEN)) 138 if (!display_open(window, GX_FULLSCREEN))
139 { 139 {
140 fprintf (stderr, "[Evas] [Engine] [WinCE GAPI] Can not open display\n"); 140 ERROR("[Engine] [WinCE GAPI] Can not open display");
141 goto free_lib; 141 goto free_lib;
142 } 142 }
143 143
@@ -146,7 +146,7 @@ evas_software_wince_gapi_init(HWND window,
146 // verify pixel format 146 // verify pixel format
147 if(!(prop.ffFormat & kfDirect565) || (prop.cBPP != 16)) 147 if(!(prop.ffFormat & kfDirect565) || (prop.cBPP != 16))
148 { 148 {
149 fprintf (stderr, "[Evas] [Engine] [WinCE GAPI] display format mismatch\n"); 149 ERROR("[Engine] [WinCE GAPI] display format mismatch");
150 goto close_display; 150 goto close_display;
151 } 151 }
152 152
@@ -154,7 +154,7 @@ evas_software_wince_gapi_init(HWND window,
154 if ((GetSystemMetrics(SM_CXSCREEN) != (int)prop.cxWidth) || 154 if ((GetSystemMetrics(SM_CXSCREEN) != (int)prop.cxWidth) ||
155 (GetSystemMetrics(SM_CYSCREEN) != (int)prop.cyHeight)) 155 (GetSystemMetrics(SM_CYSCREEN) != (int)prop.cyHeight))
156 { 156 {
157 fprintf (stderr, "[Evas] [Engine] [WinCE GAPI] display size mismatch\n"); 157 ERROR("[Engine] [WinCE GAPI] display size mismatch");
158 goto close_display; 158 goto close_display;
159 } 159 }
160 160
@@ -221,7 +221,7 @@ v | |
221 dc = GetDC (window); 221 dc = GetDC (window);
222 if (!dc) 222 if (!dc)
223 { 223 {
224 fprintf (stderr, "[Evas] [Engine] [WinCE GAPI] Can not get device\n"); 224 ERROR("[Engine] [WinCE GAPI] Can not get device");
225 goto close_display; 225 goto close_display;
226 } 226 }
227 227
@@ -230,7 +230,7 @@ v | |
230 (char *) &gxInfo); 230 (char *) &gxInfo);
231 if (result <= 0) 231 if (result <= 0)
232 { 232 {
233 fprintf (stderr, "[Evas] [Engine] [WinCE GAPI] ExtEscape failed\n"); 233 ERROR("[Engine] [WinCE GAPI] ExtEscape failed");
234 ReleaseDC(window, dc); 234 ReleaseDC(window, dc);
235 goto close_display; 235 goto close_display;
236 } 236 }
@@ -249,9 +249,9 @@ v | |
249 if ((priv->width != width) || 249 if ((priv->width != width) ||
250 (priv->height != height)) 250 (priv->height != height))
251 { 251 {
252 fprintf (stderr, "[Evas] [Engine] [WinCE GAPI] Size mismatch\n"); 252 WARN("[Engine] [WinCE GAPI] Size mismatch");
253 fprintf (stderr, "[Evas] [Engine] [WinCE GAPI] asked: %dx%d\n", width, height); 253 WARN("[Engine] [WinCE GAPI] asked: %dx%d", width, height);
254 fprintf (stderr, "[Evas] [Engine] [WinCE GAPI] got : %dx%d\n", priv->width, priv->height); 254 WARN("[Engine] [WinCE GAPI] got : %dx%d", priv->width, priv->height);
255 goto close_display; 255 goto close_display;
256 } 256 }
257 257
diff --git a/legacy/evas/src/modules/engines/software_16_wince/evas_wince_gdi_buffer.c b/legacy/evas/src/modules/engines/software_16_wince/evas_wince_gdi_buffer.c
index e935c7b9e4..1bc43ce781 100644
--- a/legacy/evas/src/modules/engines/software_16_wince/evas_wince_gdi_buffer.c
+++ b/legacy/evas/src/modules/engines/software_16_wince/evas_wince_gdi_buffer.c
@@ -37,7 +37,7 @@ evas_software_wince_gdi_init(HWND window,
37 priv->dc = GetDC(window); 37 priv->dc = GetDC(window);
38 if (!priv->dc) 38 if (!priv->dc)
39 { 39 {
40 fprintf (stderr, "[Evas] [Engine] [WinCE GDI] Can not get DC\n"); 40 WARN("[Engine] [WinCE GDI] Can not get DC");
41 free(priv); 41 free(priv);
42 return NULL; 42 return NULL;
43 } 43 }
@@ -56,7 +56,7 @@ evas_software_wince_gdi_init(HWND window,
56 priv->bitmap_info = (BITMAPINFO_16bpp *)malloc(sizeof(BITMAPINFO_16bpp)); 56 priv->bitmap_info = (BITMAPINFO_16bpp *)malloc(sizeof(BITMAPINFO_16bpp));
57 if (!priv->bitmap_info) 57 if (!priv->bitmap_info)
58 { 58 {
59 fprintf (stderr, "[Evas] [Engine] [WinCE GDI] Can not allocate bitmap info\n"); 59 WARN("[Engine] [WinCE GDI] Can not allocate bitmap info");
60 ReleaseDC(window, priv->dc); 60 ReleaseDC(window, priv->dc);
61 free(priv); 61 free(priv);
62 return NULL; 62 return NULL;
diff --git a/legacy/evas/src/modules/engines/software_ddraw/evas_outbuf.c b/legacy/evas/src/modules/engines/software_ddraw/evas_outbuf.c
index 9c2daf5561..9e01670dbe 100644
--- a/legacy/evas/src/modules/engines/software_ddraw/evas_outbuf.c
+++ b/legacy/evas/src/modules/engines/software_ddraw/evas_outbuf.c
@@ -160,12 +160,12 @@ evas_software_ddraw_outbuf_setup(int width,
160 160
161 if (!conv_func) 161 if (!conv_func)
162 { 162 {
163 fprintf(stderr, ".[ Evas Error ].\n" 163 ERROR("DDraw engine Error"
164 " {\n" 164 " {"
165 " At depth %i:\n" 165 " At depth %i:"
166 " RGB format mask: %08x, %08x, %08x\n" 166 " RGB format mask: %08x, %08x, %08x"
167 " Not supported by and compiled in converters!\n" 167 " Not supported by and compiled in converters!"
168 " }\n", 168 " }",
169 buf->priv.dd.depth, 169 buf->priv.dd.depth,
170 buf->priv.mask.r, 170 buf->priv.mask.r,
171 buf->priv.mask.g, 171 buf->priv.mask.g,
diff --git a/legacy/evas/src/modules/engines/software_gdi/evas_gdi_main.c b/legacy/evas/src/modules/engines/software_gdi/evas_gdi_main.c
index 0a793a7586..53126a53ac 100644
--- a/legacy/evas/src/modules/engines/software_gdi/evas_gdi_main.c
+++ b/legacy/evas/src/modules/engines/software_gdi/evas_gdi_main.c
@@ -15,7 +15,7 @@ evas_software_gdi_init (HWND window,
15 15
16 if (!window) 16 if (!window)
17 { 17 {
18 fprintf (stderr, "[Evas] [Engine] [GDI] Window is NULL\n"); 18 ERROR("[Engine] [GDI] Window is NULL");
19 return 0; 19 return 0;
20 } 20 }
21 21
@@ -24,14 +24,14 @@ evas_software_gdi_init (HWND window,
24 buf->priv.gdi.dc = GetDC(window); 24 buf->priv.gdi.dc = GetDC(window);
25 if (!buf->priv.gdi.dc) 25 if (!buf->priv.gdi.dc)
26 { 26 {
27 fprintf (stderr, "[Evas] [Engine] [GDI] Can not get DC\n"); 27 ERROR("[Engine] [GDI] Can not get DC");
28 return 0; 28 return 0;
29 } 29 }
30 30
31 /* FIXME: check depth */ 31 /* FIXME: check depth */
32 if (depth != GetDeviceCaps(buf->priv.gdi.dc, BITSPIXEL)) 32 if (depth != GetDeviceCaps(buf->priv.gdi.dc, BITSPIXEL))
33 { 33 {
34 fprintf (stderr, "[Evas] [Engine] [GDI] no compatible depth\n"); 34 ERROR("[Engine] [GDI] no compatible depth");
35 ReleaseDC(window, buf->priv.gdi.dc); 35 ReleaseDC(window, buf->priv.gdi.dc);
36 return 0; 36 return 0;
37 } 37 }
@@ -58,7 +58,7 @@ evas_software_gdi_init (HWND window,
58 buf->priv.gdi.bitmap_info = (BITMAPINFO_GDI *)malloc(sizeof(BITMAPINFO_GDI)); 58 buf->priv.gdi.bitmap_info = (BITMAPINFO_GDI *)malloc(sizeof(BITMAPINFO_GDI));
59 if (!buf->priv.gdi.bitmap_info) 59 if (!buf->priv.gdi.bitmap_info)
60 { 60 {
61 fprintf (stderr, "[Evas] [Engine] [GDI] Can not allocate bitmap info\n"); 61 ERROR("[Engine] [GDI] Can not allocate bitmap info");
62 ReleaseDC(window, buf->priv.gdi.dc); 62 ReleaseDC(window, buf->priv.gdi.dc);
63 return 0; 63 return 0;
64 } 64 }
@@ -88,7 +88,7 @@ evas_software_gdi_init (HWND window,
88 buf->priv.gdi.bitmap_info->masks[2] = 0x000000ff; 88 buf->priv.gdi.bitmap_info->masks[2] = 0x000000ff;
89 break; 89 break;
90 default: 90 default:
91 fprintf (stderr, "[Evas] [Engine] [GDI] wrong depth\n"); 91 ERROR("[Engine] [GDI] wrong depth");
92 free(buf->priv.gdi.bitmap_info); 92 free(buf->priv.gdi.bitmap_info);
93 ReleaseDC(window, buf->priv.gdi.dc); 93 ReleaseDC(window, buf->priv.gdi.dc);
94 return 0; 94 return 0;
diff --git a/legacy/evas/src/modules/engines/software_gdi/evas_outbuf.c b/legacy/evas/src/modules/engines/software_gdi/evas_outbuf.c
index 9c9fe92639..dd8d89d5c0 100644
--- a/legacy/evas/src/modules/engines/software_gdi/evas_outbuf.c
+++ b/legacy/evas/src/modules/engines/software_gdi/evas_outbuf.c
@@ -193,12 +193,12 @@ evas_software_gdi_outbuf_setup(int width,
193 193
194 if (!conv_func) 194 if (!conv_func)
195 { 195 {
196 fprintf(stderr, ".[ Evas Error ].\n" 196 ERROR(".[ soft_gdi engine Error ]."
197 " {\n" 197 " {"
198 " At depth %i:\n" 198 " At depth %i:"
199 " RGB format mask: %08lx, %08lx, %08lx\n" 199 " RGB format mask: %08lx, %08lx, %08lx"
200 " Not supported by and compiled in converters!\n" 200 " Not supported by and compiled in converters!"
201 " }\n", 201 " }",
202 buf->priv.gdi.depth, 202 buf->priv.gdi.depth,
203 buf->priv.gdi.bitmap_info->masks[0], 203 buf->priv.gdi.bitmap_info->masks[0],
204 buf->priv.gdi.bitmap_info->masks[1], 204 buf->priv.gdi.bitmap_info->masks[1],
diff --git a/legacy/evas/src/modules/engines/software_sdl/evas_engine.c b/legacy/evas/src/modules/engines/software_sdl/evas_engine.c
index dd3974d363..64a80d6c6b 100644
--- a/legacy/evas/src/modules/engines/software_sdl/evas_engine.c
+++ b/legacy/evas/src/modules/engines/software_sdl/evas_engine.c
@@ -5,6 +5,7 @@
5#include <time.h> 5#include <time.h>
6#include <SDL/SDL.h> 6#include <SDL/SDL.h>
7 7
8#include "evas_common.h"
8#include "evas_engine.h" 9#include "evas_engine.h"
9 10
10/* #define DEBUG_SDL */ 11/* #define DEBUG_SDL */
@@ -99,7 +100,7 @@ evas_engine_sdl_setup (Evas* e, void* in)
99 100
100 if (SDL_InitSubSystem(SDL_INIT_VIDEO) < 0) 101 if (SDL_InitSubSystem(SDL_INIT_VIDEO) < 0)
101 { 102 {
102 fprintf(stderr, "SDL_Init failed with %s\n", SDL_GetError()); 103 ERROR("SDL_Init failed with %s", SDL_GetError());
103 SDL_Quit(); 104 SDL_Quit();
104 return 0; 105 return 0;
105 } 106 }
@@ -170,13 +171,13 @@ evas_engine_sdl_output_resize (void *data, int w, int h)
170 171
171 if (!surface) 172 if (!surface)
172 { 173 {
173 fprintf(stderr, "Unable to change the resolution to : %ix%i\n", w, h); 174 ERROR("Unable to change the resolution to : %ix%i", w, h);
174 exit(-1); 175 exit(-1);
175 } 176 }
176 re->rgba_engine_image = (SDL_Engine_Image_Entry *) evas_cache_engine_image_engine(re->cache, surface); 177 re->rgba_engine_image = (SDL_Engine_Image_Entry *) evas_cache_engine_image_engine(re->cache, surface);
177 if (!re->rgba_engine_image) 178 if (!re->rgba_engine_image)
178 { 179 {
179 fprintf(stderr, "RGBA_Image allocation from SDL failed\n"); 180 ERROR("RGBA_Image allocation from SDL failed");
180 exit(-1); 181 exit(-1);
181 } 182 }
182 183
@@ -924,7 +925,7 @@ _sdl_output_setup (int w, int h, int fullscreen, int noframe, int alpha, int hw
924 re->cache = evas_cache_engine_image_init(&_sdl_cache_engine_image_cb, evas_common_image_cache_get()); 925 re->cache = evas_cache_engine_image_init(&_sdl_cache_engine_image_cb, evas_common_image_cache_get());
925 if (!re->cache) 926 if (!re->cache)
926 { 927 {
927 fprintf(stderr, "Evas_Cache_Engine_Image allocation failed!\n"); 928 CRITICAL("Evas_Cache_Engine_Image allocation failed!");
928 exit(-1); 929 exit(-1);
929 } 930 }
930 931
@@ -939,7 +940,7 @@ _sdl_output_setup (int w, int h, int fullscreen, int noframe, int alpha, int hw
939 940
940 if (!surface) 941 if (!surface)
941 { 942 {
942 fprintf(stderr, "SDL_SetVideoMode [ %i x %i x 32 ] failed.\n", w, h); 943 CRITICAL("SDL_SetVideoMode [ %i x %i x 32 ] failed.", w, h);
943 exit(-1); 944 exit(-1);
944 } 945 }
945 946
@@ -951,7 +952,7 @@ _sdl_output_setup (int w, int h, int fullscreen, int noframe, int alpha, int hw
951 re->rgba_engine_image = (SDL_Engine_Image_Entry *) evas_cache_engine_image_engine(re->cache, surface); 952 re->rgba_engine_image = (SDL_Engine_Image_Entry *) evas_cache_engine_image_engine(re->cache, surface);
952 if (!re->rgba_engine_image) 953 if (!re->rgba_engine_image)
953 { 954 {
954 fprintf(stderr, "RGBA_Image allocation from SDL failed\n"); 955 CRITICAL("RGBA_Image allocation from SDL failed");
955 exit(-1); 956 exit(-1);
956 } 957 }
957 958
@@ -1136,17 +1137,17 @@ _sdl_image_debug(const char* context, Engine_Image_Entry* eie)
1136{ 1137{
1137 SDL_Engine_Image_Entry *eim = (SDL_Engine_Image_Entry *) eie; 1138 SDL_Engine_Image_Entry *eim = (SDL_Engine_Image_Entry *) eie;
1138 1139
1139 printf ("*** %s image (%p) ***\n", context, eim); 1140 DEBUG("*** %s image (%p) ***", context, eim);
1140 if (eim) 1141 if (eim)
1141 { 1142 {
1142 printf ("* W: %i\n* H: %i\n* R: %i\n", eim->cache_entry.w, eim->cache_entry.h, eim->cache_entry.references); 1143 DEBUG ("* W: %i\n* H: %i\n* R: %i", eim->cache_entry.w, eim->cache_entry.h, eim->cache_entry.references);
1143 if (eim->cache_entry.src) 1144 if (eim->cache_entry.src)
1144 printf ("* Pixels: %p\n* SDL Surface: %p\n",((RGBA_Image*) eim->cache_entry.src)->image.data, eim->surface); 1145 DEBUG ("* Pixels: %p\n* SDL Surface: %p",((RGBA_Image*) eim->cache_entry.src)->image.data, eim->surface);
1145 if (eim->surface) 1146 if (eim->surface)
1146 printf ("* Surface->pixels: %p\n", eim->surface->pixels); 1147 DEBUG ("* Surface->pixels: %p", eim->surface->pixels);
1147 printf ("* Key: %s\n", eim->cache_entry.cache_key); 1148 DEBUG ("* Key: %s", eim->cache_entry.cache_key);
1148 printf ("* Reference: %i\n", eim->cache_entry.references); 1149 DEBUG ("* Reference: %i", eim->cache_entry.references);
1149 } 1150 }
1150 printf ("*** ***\n"); 1151 DEBUG ("*** ***");
1151} 1152}
1152#endif 1153#endif
diff --git a/legacy/evas/src/modules/engines/software_x11/evas_xcb_outbuf.c b/legacy/evas/src/modules/engines/software_x11/evas_xcb_outbuf.c
index 3b0dba9448..defce8058b 100644
--- a/legacy/evas/src/modules/engines/software_x11/evas_xcb_outbuf.c
+++ b/legacy/evas/src/modules/engines/software_x11/evas_xcb_outbuf.c
@@ -355,13 +355,13 @@ evas_software_xcb_outbuf_setup_x(int w,
355 evas_software_xcb_x_output_buffer_free(xcbob, 1); 355 evas_software_xcb_x_output_buffer_free(xcbob, 1);
356 if (!conv_func) 356 if (!conv_func)
357 { 357 {
358 printf(".[ Evas Error ].\n" 358 ERROR("XCB Engine"
359 " {\n" 359 " {"
360 " At depth %i:\n" 360 " At depth %i:"
361 " RGB format mask: %08x, %08x, %08x\n" 361 " RGB format mask: %08x, %08x, %08x"
362 " Palette mode: %i\n" 362 " Palette mode: %i"
363 " Not supported by and compiled in converters!\n" 363 " Not supported by and compiled in converters!"
364 " }\n", 364 " }",
365 buf->priv.x11.xcb.depth, 365 buf->priv.x11.xcb.depth,
366 buf->priv.mask.r, 366 buf->priv.mask.r,
367 buf->priv.mask.g, 367 buf->priv.mask.g,
diff --git a/legacy/evas/src/modules/loaders/tiff/evas_image_load_tiff.c b/legacy/evas/src/modules/loaders/tiff/evas_image_load_tiff.c
index e8bb74f56b..f6e98b40f3 100644
--- a/legacy/evas/src/modules/loaders/tiff/evas_image_load_tiff.c
+++ b/legacy/evas/src/modules/loaders/tiff/evas_image_load_tiff.c
@@ -266,17 +266,17 @@ evas_image_load_file_data_tiff(Image_Entry *ie, const char *file, const char *ke
266 266
267 if (!rast) 267 if (!rast)
268 { 268 {
269 fprintf(stderr, "Evas Tiff loader: out of memory\n"); 269 ERROR("Evas Tiff loader: out of memory");
270 270
271 TIFFRGBAImageEnd((TIFFRGBAImage *) & rgba_image); 271 TIFFRGBAImageEnd((TIFFRGBAImage *) & rgba_image);
272 TIFFClose(tif); 272 TIFFClose(tif);
273 273
274 return 0; 274 return 0;
275 } 275 }
276 276
277 if (rgba_image.rgba.put.any == NULL) 277 if (rgba_image.rgba.put.any == NULL)
278 { 278 {
279 fprintf(stderr, "Evas Tiff loader: no put function"); 279 ERROR("Evas Tiff loader: no put function");
280 280
281 _TIFFfree(rast); 281 _TIFFfree(rast);
282 TIFFRGBAImageEnd((TIFFRGBAImage *) & rgba_image); 282 TIFFRGBAImageEnd((TIFFRGBAImage *) & rgba_image);
@@ -312,7 +312,7 @@ evas_image_load_file_data_tiff(Image_Entry *ie, const char *file, const char *ke
312 } 312 }
313 else 313 else
314 { 314 {
315 printf("channel bits == %i\n", (int)rgba_image.rgba.samplesperpixel); 315 INFO("channel bits == %i", (int)rgba_image.rgba.samplesperpixel);
316 } 316 }
317 317
318 _TIFFfree(rast); 318 _TIFFfree(rast);
diff --git a/legacy/evas/src/modules/loaders/xpm/evas_image_load_xpm.c b/legacy/evas/src/modules/loaders/xpm/evas_image_load_xpm.c
index 46519ce4f1..806e1d57d4 100644
--- a/legacy/evas/src/modules/loaders/xpm/evas_image_load_xpm.c
+++ b/legacy/evas/src/modules/loaders/xpm/evas_image_load_xpm.c
@@ -202,8 +202,7 @@ evas_image_load_file_xpm(Image_Entry *ie, const char *file, const char *key __UN
202 /* Header */ 202 /* Header */
203 if (sscanf(line, "%i %i %i %i", &w, &h, &ncolors, &cpp) != 4) 203 if (sscanf(line, "%i %i %i %i", &w, &h, &ncolors, &cpp) != 4)
204 { 204 {
205 fprintf(stderr, 205 ERROR("XPM ERROR: XPM file malformed header");
206 "XPM ERROR: XPM file malformed header\