summaryrefslogtreecommitdiff
path: root/src/lib/evas
diff options
context:
space:
mode:
authorDaniel Juyung Seo <seojuyung2@gmail.com>2013-12-26 12:22:05 +0900
committerDaniel Juyung Seo <seojuyung2@gmail.com>2013-12-26 12:27:13 +0900
commit76d8532b5465362f85b75a2a7a5cc3c419304a92 (patch)
tree73482a7b3a246f56d555fd206903db683b14c6aa /src/lib/evas
parent10dd650d90d050889771f88d8b01eb7c1f51b0bd (diff)
efl: Unified eina critical manro to CRI.
Being annoyed by different types of eina critical macros - CRI, CRIT, CRITICAL -, I concluded to unify them to one. Discussed on IRC and finally, CRI was chosen to meet the consistency with other macros - ERR, WRN, INF, DBG - in terms of the number of characters. If there is any missing bits, please let me know.
Diffstat (limited to '')
-rw-r--r--src/lib/evas/canvas/evas_clip.c10
-rw-r--r--src/lib/evas/canvas/evas_object_box.c4
-rw-r--r--src/lib/evas/canvas/evas_object_grid.c4
-rw-r--r--src/lib/evas/canvas/evas_object_image.c8
-rw-r--r--src/lib/evas/canvas/evas_object_smart.c8
-rw-r--r--src/lib/evas/canvas/evas_object_table.c4
-rw-r--r--src/lib/evas/canvas/evas_object_textblock.c6
-rw-r--r--src/lib/evas/common/evas_image_load.c4
-rw-r--r--src/lib/evas/common/evas_thread_render.c6
-rw-r--r--src/lib/evas/cserve2/evas_cs2_client.c12
-rw-r--r--src/lib/evas/include/evas_common_private.h6
-rw-r--r--src/lib/evas/main.c10
12 files changed, 41 insertions, 41 deletions
diff --git a/src/lib/evas/canvas/evas_clip.c b/src/lib/evas/canvas/evas_clip.c
index 4472fd59bd..20585be483 100644
--- a/src/lib/evas/canvas/evas_clip.c
+++ b/src/lib/evas/canvas/evas_clip.c
@@ -224,28 +224,28 @@ _clip_set(Eo *eo_obj, void *_pd, va_list *list)
224 if (obj->cur->clipper && obj->cur->clipper->object == eo_clip) return; 224 if (obj->cur->clipper && obj->cur->clipper->object == eo_clip) return;
225 if (eo_obj == eo_clip) 225 if (eo_obj == eo_clip)
226 { 226 {
227 CRIT("Setting clip %p on itself", eo_obj); 227 CRI("Setting clip %p on itself", eo_obj);
228 return; 228 return;
229 } 229 }
230 if (clip->delete_me) 230 if (clip->delete_me)
231 { 231 {
232 CRIT("Setting deleted object %p as clip obj %p", eo_clip, eo_obj); 232 CRI("Setting deleted object %p as clip obj %p", eo_clip, eo_obj);
233 return; 233 return;
234 } 234 }
235 if (obj->delete_me) 235 if (obj->delete_me)
236 { 236 {
237 CRIT("Setting object %p as clip to deleted obj %p", eo_clip, eo_obj); 237 CRI("Setting object %p as clip to deleted obj %p", eo_clip, eo_obj);
238 return; 238 return;
239 } 239 }
240 if (!obj->layer) 240 if (!obj->layer)
241 { 241 {
242 CRIT("No evas surface associated with object (%p)", eo_obj); 242 CRI("No evas surface associated with object (%p)", eo_obj);
243 return; 243 return;
244 } 244 }
245 if ((obj->layer && clip->layer) && 245 if ((obj->layer && clip->layer) &&
246 (obj->layer->evas != clip->layer->evas)) 246 (obj->layer->evas != clip->layer->evas))
247 { 247 {
248 CRIT("Setting object %p from Evas (%p) to another Evas (%p)", obj, obj->layer->evas, clip->layer->evas); 248 CRI("Setting object %p from Evas (%p) to another Evas (%p)", obj, obj->layer->evas, clip->layer->evas);
249 return; 249 return;
250 } 250 }
251 251
diff --git a/src/lib/evas/canvas/evas_object_box.c b/src/lib/evas/canvas/evas_object_box.c
index 194f3e7841..1d27bfade6 100644
--- a/src/lib/evas/canvas/evas_object_box.c
+++ b/src/lib/evas/canvas/evas_object_box.c
@@ -53,7 +53,7 @@ static void _sizing_eval(Evas_Object *obj);
53 EVAS_OBJECT_BOX_DATA_GET(o, ptr); \ 53 EVAS_OBJECT_BOX_DATA_GET(o, ptr); \
54if (!ptr) \ 54if (!ptr) \
55{ \ 55{ \
56 CRIT("no widget data for object %p (%s)", \ 56 CRI("no widget data for object %p (%s)", \
57 o, evas_object_type_get(o)); \ 57 o, evas_object_type_get(o)); \
58 fflush(stderr); \ 58 fflush(stderr); \
59 return; \ 59 return; \
@@ -63,7 +63,7 @@ if (!ptr) \
63 EVAS_OBJECT_BOX_DATA_GET(o, ptr); \ 63 EVAS_OBJECT_BOX_DATA_GET(o, ptr); \
64if (!ptr) \ 64if (!ptr) \
65{ \ 65{ \
66 CRIT("no widget data for object %p (%s)", \ 66 CRI("no widget data for object %p (%s)", \
67 o, evas_object_type_get(o)); \ 67 o, evas_object_type_get(o)); \
68 fflush(stderr); \ 68 fflush(stderr); \
69 return val; \ 69 return val; \
diff --git a/src/lib/evas/canvas/evas_object_grid.c b/src/lib/evas/canvas/evas_object_grid.c
index 67e5d9212b..707dd696b8 100644
--- a/src/lib/evas/canvas/evas_object_grid.c
+++ b/src/lib/evas/canvas/evas_object_grid.c
@@ -53,7 +53,7 @@ struct _Evas_Object_Grid_Accessor
53 EVAS_OBJECT_GRID_DATA_GET(o, ptr); \ 53 EVAS_OBJECT_GRID_DATA_GET(o, ptr); \
54 if (!ptr) \ 54 if (!ptr) \
55 { \ 55 { \
56 CRIT("no widget data for object %p (%s)", \ 56 CRI("no widget data for object %p (%s)", \
57 o, evas_object_type_get(o)); \ 57 o, evas_object_type_get(o)); \
58 abort(); \ 58 abort(); \
59 return; \ 59 return; \
@@ -63,7 +63,7 @@ struct _Evas_Object_Grid_Accessor
63 EVAS_OBJECT_GRID_DATA_GET(o, ptr); \ 63 EVAS_OBJECT_GRID_DATA_GET(o, ptr); \
64 if (!ptr) \ 64 if (!ptr) \
65 { \ 65 { \
66 CRIT("No widget data for object %p (%s)", \ 66 CRI("No widget data for object %p (%s)", \
67 o, evas_object_type_get(o)); \ 67 o, evas_object_type_get(o)); \
68 abort(); \ 68 abort(); \
69 return val; \ 69 return val; \
diff --git a/src/lib/evas/canvas/evas_object_image.c b/src/lib/evas/canvas/evas_object_image.c
index ce2e918349..043ad92b3b 100644
--- a/src/lib/evas/canvas/evas_object_image.c
+++ b/src/lib/evas/canvas/evas_object_image.c
@@ -654,18 +654,18 @@ _image_source_set(Eo *eo_obj, void *_pd, va_list *list)
654 } 654 }
655 if (!src->layer) 655 if (!src->layer)
656 { 656 {
657 CRIT("No evas surface associated with source object (%p)", eo_obj); 657 CRI("No evas surface associated with source object (%p)", eo_obj);
658 return; 658 return;
659 } 659 }
660 if ((obj->layer && src->layer) && 660 if ((obj->layer && src->layer) &&
661 (obj->layer->evas != src->layer->evas)) 661 (obj->layer->evas != src->layer->evas))
662 { 662 {
663 CRIT("Setting object %p from Evas (%p) from another Evas (%p)", eo_src, src->layer->evas, obj->layer->evas); 663 CRI("Setting object %p from Evas (%p) from another Evas (%p)", eo_src, src->layer->evas, obj->layer->evas);
664 return; 664 return;
665 } 665 }
666 if (eo_src == eo_obj) 666 if (eo_src == eo_obj)
667 { 667 {
668 CRIT("Setting object %p as a source for itself", obj); 668 CRI("Setting object %p as a source for itself", obj);
669 return; 669 return;
670 } 670 }
671 } 671 }
@@ -3724,7 +3724,7 @@ evas_process_dirty_pixels(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj,
3724 obj->cur->geometry.y == y && 3724 obj->cur->geometry.y == y &&
3725 obj->cur->geometry.w == w && 3725 obj->cur->geometry.w == w &&
3726 obj->cur->geometry.h == h)) 3726 obj->cur->geometry.h == h))
3727 CRIT("Evas_Object_Image geometry did change during pixels get callback !"); 3727 CRI("Evas_Object_Image geometry did change during pixels get callback !");
3728 3728
3729 o->engine_data = obj->layer->evas->engine.func->image_dirty_region 3729 o->engine_data = obj->layer->evas->engine.func->image_dirty_region
3730 (obj->layer->evas->engine.data.output, o->engine_data, 3730 (obj->layer->evas->engine.data.output, o->engine_data,
diff --git a/src/lib/evas/canvas/evas_object_smart.c b/src/lib/evas/canvas/evas_object_smart.c
index 2e09f8187b..119702aa87 100644
--- a/src/lib/evas/canvas/evas_object_smart.c
+++ b/src/lib/evas/canvas/evas_object_smart.c
@@ -253,26 +253,26 @@ _smart_member_add(Eo *smart_obj, void *_pd, va_list *list)
253 253
254 if (obj->delete_me) 254 if (obj->delete_me)
255 { 255 {
256 CRIT("Adding deleted object %p to smart obj %p", eo_obj, smart_obj); 256 CRI("Adding deleted object %p to smart obj %p", eo_obj, smart_obj);
257 abort(); 257 abort();
258 return; 258 return;
259 } 259 }
260 if (smart->delete_me) 260 if (smart->delete_me)
261 { 261 {
262 CRIT("Adding object %p to deleted smart obj %p", eo_obj, smart_obj); 262 CRI("Adding object %p to deleted smart obj %p", eo_obj, smart_obj);
263 abort(); 263 abort();
264 return; 264 return;
265 } 265 }
266 if (!smart->layer) 266 if (!smart->layer)
267 { 267 {
268 CRIT("No evas surface associated with smart object (%p)", smart_obj); 268 CRI("No evas surface associated with smart object (%p)", smart_obj);
269 abort(); 269 abort();
270 return; 270 return;
271 } 271 }
272 if ((obj->layer && smart->layer) && 272 if ((obj->layer && smart->layer) &&
273 (obj->layer->evas != smart->layer->evas)) 273 (obj->layer->evas != smart->layer->evas))
274 { 274 {
275 CRIT("Adding object %p from Evas (%p) from another Evas (%p)", eo_obj, obj->layer->evas, smart->layer->evas); 275 CRI("Adding object %p from Evas (%p) from another Evas (%p)", eo_obj, obj->layer->evas, smart->layer->evas);
276 abort(); 276 abort();
277 return; 277 return;
278 } 278 }
diff --git a/src/lib/evas/canvas/evas_object_table.c b/src/lib/evas/canvas/evas_object_table.c
index 3b1f533af7..624c6b2baf 100644
--- a/src/lib/evas/canvas/evas_object_table.c
+++ b/src/lib/evas/canvas/evas_object_table.c
@@ -104,7 +104,7 @@ struct _Evas_Object_Table_Accessor
104 EVAS_OBJECT_TABLE_DATA_GET(o, ptr); \ 104 EVAS_OBJECT_TABLE_DATA_GET(o, ptr); \
105if (!ptr) \ 105if (!ptr) \
106{ \ 106{ \
107 CRIT("no widget data for object %p (%s)", \ 107 CRI("no widget data for object %p (%s)", \
108 o, evas_object_type_get(o)); \ 108 o, evas_object_type_get(o)); \
109 return; \ 109 return; \
110} 110}
@@ -113,7 +113,7 @@ if (!ptr) \
113 EVAS_OBJECT_TABLE_DATA_GET(o, ptr); \ 113 EVAS_OBJECT_TABLE_DATA_GET(o, ptr); \
114if (!ptr) \ 114if (!ptr) \
115{ \ 115{ \
116 CRIT("No widget data for object %p (%s)", \ 116 CRI("No widget data for object %p (%s)", \
117 o, evas_object_type_get(o)); \ 117 o, evas_object_type_get(o)); \
118 return val; \ 118 return val; \
119} 119}
diff --git a/src/lib/evas/canvas/evas_object_textblock.c b/src/lib/evas/canvas/evas_object_textblock.c
index 1fe0f1643b..5851918c5e 100644
--- a/src/lib/evas/canvas/evas_object_textblock.c
+++ b/src/lib/evas/canvas/evas_object_textblock.c
@@ -102,10 +102,10 @@ static const char o_type[] = "textblock";
102 ((ch) == _TAB) || \ 102 ((ch) == _TAB) || \
103 ((ch) == _PARAGRAPH_SEPARATOR)) 103 ((ch) == _PARAGRAPH_SEPARATOR))
104 104
105#ifdef CRITICAL 105#ifdef CRI
106#undef CRITICAL 106#undef CRI
107#endif 107#endif
108#define CRITICAL(...) EINA_LOG_DOM_CRIT(EINA_LOG_DOMAIN_DEFAULT, __VA_ARGS__) 108#define CRI(...) EINA_LOG_DOM_CRIT(EINA_LOG_DOMAIN_DEFAULT, __VA_ARGS__)
109 109
110#ifdef ERR 110#ifdef ERR
111#undef ERR 111#undef ERR
diff --git a/src/lib/evas/common/evas_image_load.c b/src/lib/evas/common/evas_image_load.c
index c9b90af7e5..92c6402f8c 100644
--- a/src/lib/evas/common/evas_image_load.c
+++ b/src/lib/evas/common/evas_image_load.c
@@ -274,7 +274,7 @@ evas_common_load_rgba_image_module_from_file(Image_Entry *ie)
274 274
275#ifdef EVAS_CSERVE2 275#ifdef EVAS_CSERVE2
276 if (evas_cserve2_use_get() && evas_cache2_image_cached(ie)) 276 if (evas_cserve2_use_get() && evas_cache2_image_cached(ie))
277 CRIT("This function shouldn't be called anymore!"); 277 CRI("This function shouldn't be called anymore!");
278#endif 278#endif
279 279
280 if (ie->f) 280 if (ie->f)
@@ -391,7 +391,7 @@ evas_common_load_rgba_image_data_from_file(Image_Entry *ie)
391 391
392#ifdef EVAS_CSERVE2 392#ifdef EVAS_CSERVE2
393 if (evas_cserve2_use_get() && evas_cache2_image_cached(ie)) 393 if (evas_cserve2_use_get() && evas_cache2_image_cached(ie))
394 CRIT("This function shouldn't be called anymore!"); 394 CRI("This function shouldn't be called anymore!");
395#endif 395#endif
396 396
397 if (!ie->info.module) return EVAS_LOAD_ERROR_GENERIC; 397 if (!ie->info.module) return EVAS_LOAD_ERROR_GENERIC;
diff --git a/src/lib/evas/common/evas_thread_render.c b/src/lib/evas/common/evas_thread_render.c
index f37f43a6f7..e84eb2c649 100644
--- a/src/lib/evas/common/evas_thread_render.c
+++ b/src/lib/evas/common/evas_thread_render.c
@@ -127,12 +127,12 @@ evas_thread_init(void)
127 eina_inarray_step_set(&evas_thread_queue, sizeof (Eina_Inarray), sizeof (Evas_Thread_Command), 128); 127 eina_inarray_step_set(&evas_thread_queue, sizeof (Eina_Inarray), sizeof (Evas_Thread_Command), 128);
128 128
129 if (!eina_lock_new(&evas_thread_queue_lock)) 129 if (!eina_lock_new(&evas_thread_queue_lock))
130 CRIT("Could not create draw thread lock"); 130 CRI("Could not create draw thread lock");
131 if (!eina_condition_new(&evas_thread_queue_condition, &evas_thread_queue_lock)) 131 if (!eina_condition_new(&evas_thread_queue_condition, &evas_thread_queue_lock))
132 CRIT("Could not create draw thread condition"); 132 CRI("Could not create draw thread condition");
133 if (!eina_thread_create(&evas_thread_worker, EINA_THREAD_NORMAL, 0, 133 if (!eina_thread_create(&evas_thread_worker, EINA_THREAD_NORMAL, 0,
134 evas_thread_worker_func, NULL)) 134 evas_thread_worker_func, NULL))
135 CRIT("Could not create draw thread"); 135 CRI("Could not create draw thread");
136} 136}
137 137
138void 138void
diff --git a/src/lib/evas/cserve2/evas_cs2_client.c b/src/lib/evas/cserve2/evas_cs2_client.c
index c65003f7d6..7609f4b8fd 100644
--- a/src/lib/evas/cserve2/evas_cs2_client.c
+++ b/src/lib/evas/cserve2/evas_cs2_client.c
@@ -507,7 +507,7 @@ evas_cserve2_shutdown(void)
507 507
508 if (cserve2_init <= 0) 508 if (cserve2_init <= 0)
509 { 509 {
510 CRIT("cserve2 is already shutdown"); 510 CRI("cserve2 is already shutdown");
511 return -1; 511 return -1;
512 } 512 }
513 513
@@ -2515,8 +2515,8 @@ _server_index_list_set(Msg_Base *data, int size)
2515 2515
2516 if (size != sizeof(*msg) || msg->base.type != CSERVE2_INDEX_LIST) 2516 if (size != sizeof(*msg) || msg->base.type != CSERVE2_INDEX_LIST)
2517 { 2517 {
2518 CRIT("Invalid message! type: %d, size: %d (expected %d)", 2518 CRI("Invalid message! type: %d, size: %d (expected %d)",
2519 msg->base.type, size, (int) sizeof(*msg)); 2519 msg->base.type, size, (int) sizeof(*msg));
2520 return -1; 2520 return -1;
2521 } 2521 }
2522 2522
@@ -2582,7 +2582,7 @@ _shared_string_internal_get(int id, Eina_Bool safe)
2582 2582
2583 if (!_index.strings_entries.data) 2583 if (!_index.strings_entries.data)
2584 { 2584 {
2585 CRIT("Strings table is not valid: no data"); 2585 CRI("Strings table is not valid: no data");
2586 return NULL; 2586 return NULL;
2587 } 2587 }
2588 2588
@@ -2622,7 +2622,7 @@ _shared_string_get(int id)
2622 2622
2623#define SHARED_INDEX_CHECK(si, typ) \ 2623#define SHARED_INDEX_CHECK(si, typ) \
2624 do { if (!_shared_index_remap_check(&(si), sizeof(typ))) { \ 2624 do { if (!_shared_index_remap_check(&(si), sizeof(typ))) { \
2625 CRIT("Failed to remap index"); return NULL; } } while (0) 2625 CRI("Failed to remap index"); return NULL; } } while (0)
2626 2626
2627static const File_Data * 2627static const File_Data *
2628_shared_image_entry_file_data_find(Image_Entry *ie) 2628_shared_image_entry_file_data_find(Image_Entry *ie)
@@ -2959,7 +2959,7 @@ _shared_image_entry_image_data_find(Image_Entry *ie)
2959 2959
2960 if (!ie->cache_key) 2960 if (!ie->cache_key)
2961 { 2961 {
2962 CRIT("Looking for an image in remote cache without hash key?"); 2962 CRI("Looking for an image in remote cache without hash key?");
2963 return NULL; 2963 return NULL;
2964 } 2964 }
2965 2965
diff --git a/src/lib/evas/include/evas_common_private.h b/src/lib/evas/include/evas_common_private.h
index 4f48fd4aaf..47441f7276 100644
--- a/src/lib/evas/include/evas_common_private.h
+++ b/src/lib/evas/include/evas_common_private.h
@@ -96,10 +96,10 @@ extern EAPI int _evas_log_dom_global;
96#endif 96#endif
97#define WRN(...) EINA_LOG_DOM_WARN(_EVAS_DEFAULT_LOG_DOM, __VA_ARGS__) 97#define WRN(...) EINA_LOG_DOM_WARN(_EVAS_DEFAULT_LOG_DOM, __VA_ARGS__)
98 98
99#ifdef CRIT 99#ifdef CRI
100# undef CRIT 100# undef CRI
101#endif 101#endif
102#define CRIT(...) EINA_LOG_DOM_CRIT(_EVAS_DEFAULT_LOG_DOM, __VA_ARGS__) 102#define CRI(...) EINA_LOG_DOM_CRIT(_EVAS_DEFAULT_LOG_DOM, __VA_ARGS__)
103 103
104#include "evas_options.h" 104#include "evas_options.h"
105 105
diff --git a/src/lib/evas/main.c b/src/lib/evas/main.c
index 92e927c2d5..e59877cdd6 100644
--- a/src/lib/evas/main.c
+++ b/src/lib/evas/main.c
@@ -70,7 +70,7 @@ evas_debug_error(void)
70 _evas_debug_init_from_env(); 70 _evas_debug_init_from_env();
71 } 71 }
72 if (_evas_debug_show == _EVAS_DEBUG_SHOW) 72 if (_evas_debug_show == _EVAS_DEBUG_SHOW)
73 CRIT("Evas Magic Check Failed!!!"); 73 CRI("Evas Magic Check Failed!!!");
74} 74}
75 75
76void 76void
@@ -81,7 +81,7 @@ evas_debug_input_null(void)
81 _evas_debug_init_from_env(); 81 _evas_debug_init_from_env();
82 } 82 }
83 if (_evas_debug_show == _EVAS_DEBUG_SHOW) 83 if (_evas_debug_show == _EVAS_DEBUG_SHOW)
84 CRIT("Input object pointer is NULL!"); 84 CRI("Input object pointer is NULL!");
85 if (_evas_debug_abort) abort(); 85 if (_evas_debug_abort) abort();
86} 86}
87 87
@@ -94,7 +94,7 @@ evas_debug_magic_null(void)
94 } 94 }
95 if ((_evas_debug_show == _EVAS_DEBUG_SHOW) || 95 if ((_evas_debug_show == _EVAS_DEBUG_SHOW) ||
96 (_evas_debug_show == _EVAS_DEBUG_DEFAULT)) 96 (_evas_debug_show == _EVAS_DEBUG_DEFAULT))
97 CRIT("Input object is zero'ed out (maybe a freed object or zero-filled RAM)!"); 97 CRI("Input object is zero'ed out (maybe a freed object or zero-filled RAM)!");
98 if (_evas_debug_abort) abort(); 98 if (_evas_debug_abort) abort();
99} 99}
100 100
@@ -107,7 +107,7 @@ evas_debug_magic_wrong(DATA32 expected, DATA32 supplied)
107 } 107 }
108 if ((_evas_debug_show == _EVAS_DEBUG_SHOW) || 108 if ((_evas_debug_show == _EVAS_DEBUG_SHOW) ||
109 (_evas_debug_show == _EVAS_DEBUG_DEFAULT)) 109 (_evas_debug_show == _EVAS_DEBUG_DEFAULT))
110 CRIT("Input object is wrong type\n" 110 CRI("Input object is wrong type\n"
111 " Expected: %08x - %s\n" 111 " Expected: %08x - %s\n"
112 " Supplied: %08x - %s", 112 " Supplied: %08x - %s",
113 expected, evas_debug_magic_string_get(expected), 113 expected, evas_debug_magic_string_get(expected),
@@ -124,7 +124,7 @@ evas_debug_generic(const char *str)
124 } 124 }
125 if ((_evas_debug_show == _EVAS_DEBUG_SHOW) || 125 if ((_evas_debug_show == _EVAS_DEBUG_SHOW) ||
126 (_evas_debug_show == _EVAS_DEBUG_DEFAULT)) 126 (_evas_debug_show == _EVAS_DEBUG_DEFAULT))
127 CRIT("%s", str); 127 CRI("%s", str);
128 if (_evas_debug_abort) abort(); 128 if (_evas_debug_abort) abort();
129} 129}
130 130