summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOleksii Piskun <o.piskun@samsung.com>2017-11-27 09:31:37 +0200
committerMykyta Biliavskyi <m.biliavskyi@samsung.com>2017-11-27 09:31:37 +0200
commit839544d5e7ea68bb03c6c9fed061134418a94133 (patch)
tree92235c93bbf3f9d2d0f8c04798df83c47f60de8e
parent1da062cdd2870f836260d82df76d0b031c326768 (diff)
Summary: Fix codestyle and return dropped lines. Reviewers: i.furs, NikaWhite Reviewed By: NikaWhite Differential Revision: https://phab.enlightenment.org/D5532
-rw-r--r--src/lib/CMakeLists.txt4
-rw-r--r--src/lib/find.c126
-rw-r--r--src/lib/interval_fill.c2
-rw-r--r--src/lib/ui.c2
-rw-r--r--src/lib/ui_private.h2
5 files changed, 70 insertions, 66 deletions
diff --git a/src/lib/CMakeLists.txt b/src/lib/CMakeLists.txt
index 209e67a..38682ba 100644
--- a/src/lib/CMakeLists.txt
+++ b/src/lib/CMakeLists.txt
@@ -13,6 +13,9 @@ set(LIB_SOURCE
13 #filters support 13 #filters support
14 filters.c 14 filters.c
15 filters.h 15 filters.h
16 #find support
17 find.c
18 find.h
16 #helpers functionality 19 #helpers functionality
17 helper.c 20 helper.c
18 helper.h 21 helper.h
@@ -28,7 +31,6 @@ set(LIB_SOURCE
28 tasks/cpuuse.c 31 tasks/cpuuse.c
29 tasks/state.c 32 tasks/state.c
30 tasks/timemarks.c 33 tasks/timemarks.c
31 find.c
32 CACHE INTERNAL LIB_SOURCE) 34 CACHE INTERNAL LIB_SOURCE)
33 35
34add_definitions (${FLAGS}) 36add_definitions (${FLAGS})
diff --git a/src/lib/find.c b/src/lib/find.c
index d799d38..60377ce 100644
--- a/src/lib/find.c
+++ b/src/lib/find.c
@@ -9,7 +9,7 @@ typedef struct _Find_Data
9 double time_current; 9 double time_current;
10 Find_Mode mode; 10 Find_Mode mode;
11 char *name; 11 char *name;
12}Find_Data; 12} Find_Data;
13 13
14static Event_Offsets* 14static Event_Offsets*
15_event_array_name_find(Find_Data *find_data, Eina_Array *events) 15_event_array_name_find(Find_Data *find_data, Eina_Array *events)
@@ -31,35 +31,35 @@ _event_array_name_find(Find_Data *find_data, Eina_Array *events)
31 time_select = interval.start + interval.length; 31 time_select = interval.start + interval.length;
32 32
33 EINA_ARRAY_ITER_NEXT(events, index, event, it) 33 EINA_ARRAY_ITER_NEXT(events, index, event, it)
34 { 34 {
35 time_start = event->time_start; 35 time_start = event->time_start;
36 if (event->offset_finish) 36 if (event->offset_finish)
37 time_end = event->time_end; 37 time_end = event->time_end;
38 else 38 else
39 time_end = time_start; 39 time_end = time_start;
40 40
41 if (time_end < interval.start) 41 if (time_end < interval.start)
42 continue; 42 continue;
43 43
44 if (time_start > interval.start + interval.length) 44 if (time_start > interval.start + interval.length)
45 break; 45 break;
46 46
47 if (mode == FIND_MODE_NEXT) 47 if (mode == FIND_MODE_NEXT)
48 { 48 {
49 if (time_start <= time_select) 49 if (time_start <= time_select)
50 continue; 50 continue;
51 51
52 event_out = event; 52 event_out = event;
53 break; 53 break;
54 } 54 }
55 else 55 else
56 { 56 {
57 if (time_start >= time_select) 57 if (time_start >= time_select)
58 break; 58 break;
59 59
60 event_out = event; 60 event_out = event;
61 } 61 }
62 } 62 }
63 63
64 return event_out; 64 return event_out;
65} 65}
@@ -103,22 +103,22 @@ _event_thread_name_find(Find_Data *find_data)
103 103
104 switch (find_data->mode) 104 switch (find_data->mode)
105 { 105 {
106 case FIND_MODE_NEXT: 106 case FIND_MODE_NEXT:
107 if (time_diff > time_start - find_data->time_current) 107 if (time_diff > time_start - find_data->time_current)
108 { 108 {
109 time_diff = time_start - find_data->time_current; 109 time_diff = time_start - find_data->time_current;
110 event_out = event; 110 event_out = event;
111 } 111 }
112 break; 112 break;
113 case FIND_MODE_PREVIOUS: 113 case FIND_MODE_PREVIOUS:
114 if (time_diff > find_data->time_current - time_start) 114 if (time_diff > find_data->time_current - time_start)
115 { 115 {
116 time_diff = find_data->time_current - time_start; 116 time_diff = find_data->time_current - time_start;
117 event_out = event; 117 event_out = event;
118 } 118 }
119 break; 119 break;
120 default: 120 default:
121 return event_out; 121 return event_out;
122 } 122 }
123 } 123 }
124 } 124 }
@@ -154,22 +154,22 @@ _event_name_find(Find_Data *find_data)
154 154
155 switch (find_data->mode) 155 switch (find_data->mode)
156 { 156 {
157 case FIND_MODE_NEXT: 157 case FIND_MODE_NEXT:
158 if (time_state_start < time_thread_start) 158 if (time_state_start < time_thread_start)
159 evas_object_smart_callback_call(find_data->content, "event,state,found,show", event_state); 159 evas_object_smart_callback_call(find_data->content, "event,state,found,show", event_state);
160 else 160 else
161 evas_object_smart_callback_call(find_data->content, "event,thread,found,show", event_thread); 161 evas_object_smart_callback_call(find_data->content, "event,thread,found,show", event_thread);
162 162
163 break; 163 break;
164 case FIND_MODE_PREVIOUS: 164 case FIND_MODE_PREVIOUS:
165 if (time_state_start > time_thread_start) 165 if (time_state_start > time_thread_start)
166 evas_object_smart_callback_call(find_data->content, "event,state,found,show", event_state); 166 evas_object_smart_callback_call(find_data->content, "event,state,found,show", event_state);
167 else 167 else
168 evas_object_smart_callback_call(find_data->content, "event,thread,found,show", event_thread); 168 evas_object_smart_callback_call(find_data->content, "event,thread,found,show", event_thread);
169 169
170 break; 170 break;
171 default: 171 default:
172 return EINA_FALSE; 172 return EINA_FALSE;
173 } 173 }
174 return EINA_TRUE; 174 return EINA_TRUE;
175 } 175 }
@@ -216,7 +216,7 @@ _event_name_next_find_cb(void *data, Evas_Object *obj EINA_UNUSED, void *name)
216{ 216{
217 Find_Data *find_data = data; 217 Find_Data *find_data = data;
218 find_data->name = name; 218 find_data->name = name;
219 find_data->mode = FIND_MODE_NEXT ; 219 find_data->mode = FIND_MODE_NEXT;
220 _event_name_find(find_data); 220 _event_name_find(find_data);
221} 221}
222 222
diff --git a/src/lib/interval_fill.c b/src/lib/interval_fill.c
index d6ffcaa..c4edf54 100644
--- a/src/lib/interval_fill.c
+++ b/src/lib/interval_fill.c
@@ -409,7 +409,7 @@ _active_events_fill(Events_Filling_Data data, double **filled)
409 409
410 if (is_thread) 410 if (is_thread)
411 { 411 {
412 _slot_filled_update(thd, filled[event->thread_slot], event, NULL); 412 _slot_filled_update(thd, filled[event->thread_slot], event, NULL);
413 _grid_info_save(thd, event->grid_slot, THREAD_EVENT, event); 413 _grid_info_save(thd, event->grid_slot, THREAD_EVENT, event);
414 Task_Thread *task = NULL; 414 Task_Thread *task = NULL;
415 evas_object_smart_callback_call(thd->win, "task,thread,register", &task); 415 evas_object_smart_callback_call(thd->win, "task,thread,register", &task);
diff --git a/src/lib/ui.c b/src/lib/ui.c
index 4e7657a..4470023 100644
--- a/src/lib/ui.c
+++ b/src/lib/ui.c
@@ -99,6 +99,7 @@ _layout_inform_time_fill(Global_Data *gd, Log_Event start, Log_Event end)
99 } 99 }
100} 100}
101 101
102/* events selecting */
102static void 103static void
103_event_unselected_cb(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) 104_event_unselected_cb(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
104{ 105{
@@ -156,6 +157,7 @@ _event_selected_cb(void *data, Evas_Object *obj,
156 157
157 eina_evlog("-event select", NULL, 0.0, "successful"); 158 eina_evlog("-event select", NULL, 0.0, "successful");
158} 159}
160
159static void 161static void
160_double_clicked_event_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj, void *event_info) 162_double_clicked_event_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj, void *event_info)
161{ 163{
diff --git a/src/lib/ui_private.h b/src/lib/ui_private.h
index ea792e7..75d74bf 100644
--- a/src/lib/ui_private.h
+++ b/src/lib/ui_private.h
@@ -97,7 +97,7 @@ typedef struct _UI_Elements
97 Elm_Object_Item *filters; 97 Elm_Object_Item *filters;
98 Elm_Object_Item *time_range; 98 Elm_Object_Item *time_range;
99 Elm_Object_Item *find; 99 Elm_Object_Item *find;
100 Eina_Bool status_val; 100 Eina_Bool status_val;
101 } ctx_menu; 101 } ctx_menu;
102 Find_UI find; 102 Find_UI find;
103} UI_Elements; 103} UI_Elements;