summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorVincent Torri <vincent.torri@gmail.com>2020-09-25 10:30:20 +0100
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2020-09-25 10:30:20 +0100
commite4866ae3ffff95c2235fc853362bac35a2a65d44 (patch)
tree449fb446dcc752a027217761fd13e7f1c5a799a9 /src
parent994904098cfc0178670bf051a2169def7e4cd7ad (diff)
fix order and simplify a bit order of _init|_shutdown functions
Summary: in bin/ ecore_evas.c : remove useless ecore_init eetpack.c : remove use eina_init and evas_init eet_main.c : reorder eet_init efl_debug.c : remove useless eina_init efl_debugd : reorder log domain ethumbd.c : remove eina_init ethumbd_client.c : remove ecore_init (which was anyway misplaced) Test Plan: compilation Reviewers: raster Reviewed By: raster Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D12162
Diffstat (limited to 'src')
-rw-r--r--src/bin/ecore_evas/ecore_evas_convert.c4
-rw-r--r--src/bin/ecore_evas/eetpack.c4
-rw-r--r--src/bin/eet/eet_main.c22
-rw-r--r--src/bin/efl/efl_debug.c2
-rw-r--r--src/bin/efl/efl_debugd.c3
-rw-r--r--src/bin/ethumb_client/ethumbd.c3
-rw-r--r--src/bin/ethumb_client/ethumbd_client.c2
7 files changed, 15 insertions, 25 deletions
diff --git a/src/bin/ecore_evas/ecore_evas_convert.c b/src/bin/ecore_evas/ecore_evas_convert.c
index 8b4f19ab2f..cefc16cc84 100644
--- a/src/bin/ecore_evas/ecore_evas_convert.c
+++ b/src/bin/ecore_evas/ecore_evas_convert.c
@@ -128,7 +128,6 @@ main(int argc, char *argv[])
128 eina_init(); 128 eina_init();
129 _log_dom = eina_log_domain_register(argv[0], EINA_COLOR_CYAN); 129 _log_dom = eina_log_domain_register(argv[0], EINA_COLOR_CYAN);
130 130
131 ecore_init();
132 ecore_evas_init(); 131 ecore_evas_init();
133 132
134 arg_index = ecore_getopt_parse(&optdesc, values, argc, argv); 133 arg_index = ecore_getopt_parse(&optdesc, values, argc, argv);
@@ -211,7 +210,8 @@ main(int argc, char *argv[])
211 end: 210 end:
212 if (flags) eina_strbuf_free(flags); 211 if (flags) eina_strbuf_free(flags);
213 ecore_evas_shutdown(); 212 ecore_evas_shutdown();
214 ecore_shutdown(); 213 eina_log_domain_unregister(_log_dom);
214 eina_shutdown();
215 215
216 return r; 216 return r;
217} 217}
diff --git a/src/bin/ecore_evas/eetpack.c b/src/bin/ecore_evas/eetpack.c
index 6e7616d189..9be4c2f77a 100644
--- a/src/bin/ecore_evas/eetpack.c
+++ b/src/bin/ecore_evas/eetpack.c
@@ -274,9 +274,7 @@ main(int argc, char **argv)
274 274
275 return -1; 275 return -1;
276 } 276 }
277 eina_init();
278 eet_init(); 277 eet_init();
279 evas_init();
280 ecore_evas_init(); 278 ecore_evas_init();
281 279
282 scratch_canvas_init(); 280 scratch_canvas_init();
@@ -285,8 +283,6 @@ main(int argc, char **argv)
285 if (ef) eet_close(ef); 283 if (ef) eet_close(ef);
286 284
287 ecore_evas_shutdown(); 285 ecore_evas_shutdown();
288 evas_shutdown();
289 eet_shutdown(); 286 eet_shutdown();
290 eina_shutdown();
291 return 0; 287 return 0;
292} 288}
diff --git a/src/bin/eet/eet_main.c b/src/bin/eet/eet_main.c
index 7da5cfd4d3..8061dd956e 100644
--- a/src/bin/eet/eet_main.c
+++ b/src/bin/eet/eet_main.c
@@ -440,17 +440,6 @@ int
440main(int argc, 440main(int argc,
441 char **argv) 441 char **argv)
442{ 442{
443 if (!eet_init())
444 return -1;
445
446 _eet_main_log_dom = eina_log_domain_register("eet_main", EINA_COLOR_CYAN);
447 if(_eet_main_log_dom < -1)
448 {
449 EINA_LOG_ERR("Impossible to create a log domain for eet_main.");
450 eet_shutdown();
451 return -1;
452 }
453
454 if (argc < 2) 443 if (argc < 2)
455 { 444 {
456help: 445help:
@@ -468,6 +457,17 @@ help:
468 " eet -h print out this help message\n" 457 " eet -h print out this help message\n"
469 " eet -V [--version] show program version\n" 458 " eet -V [--version] show program version\n"
470 ); 459 );
460
461 return -1;
462 }
463
464 if (!eet_init())
465 return -1;
466
467 _eet_main_log_dom = eina_log_domain_register("eet_main", EINA_COLOR_CYAN);
468 if(_eet_main_log_dom < -1)
469 {
470 EINA_LOG_ERR("Impossible to create a log domain for eet_main.");
471 eet_shutdown(); 471 eet_shutdown();
472 return -1; 472 return -1;
473 } 473 }
diff --git a/src/bin/efl/efl_debug.c b/src/bin/efl/efl_debug.c
index f7829c6545..7cf9768115 100644
--- a/src/bin/efl/efl_debug.c
+++ b/src/bin/efl/efl_debug.c
@@ -254,7 +254,6 @@ EINA_DEBUG_OPCODES_ARRAY_DEFINE(ops,
254int 254int
255main(int argc EINA_UNUSED, char **argv EINA_UNUSED) 255main(int argc EINA_UNUSED, char **argv EINA_UNUSED)
256{ 256{
257 eina_init();
258 ecore_init(); 257 ecore_init();
259 258
260 my_argc = argc; 259 my_argc = argc;
@@ -271,7 +270,6 @@ main(int argc EINA_UNUSED, char **argv EINA_UNUSED)
271 ecore_main_loop_begin(); 270 ecore_main_loop_begin();
272 271
273 ecore_shutdown(); 272 ecore_shutdown();
274 eina_shutdown();
275 273
276 return 0; 274 return 0;
277} 275}
diff --git a/src/bin/efl/efl_debugd.c b/src/bin/efl/efl_debugd.c
index b23db7544c..84f789254b 100644
--- a/src/bin/efl/efl_debugd.c
+++ b/src/bin/efl/efl_debugd.c
@@ -663,11 +663,11 @@ main(int argc EINA_UNUSED, char **argv EINA_UNUSED)
663 ecore_app_no_system_modules(); 663 ecore_app_no_system_modules();
664 664
665 eina_init(); 665 eina_init();
666 _log_dom = eina_log_domain_register("efl_debugd", EINA_COLOR_CYAN);
666 ecore_init(); 667 ecore_init();
667 ecore_con_init(); 668 ecore_con_init();
668 669
669 _retval = EXIT_SUCCESS; 670 _retval = EXIT_SUCCESS;
670 _log_dom = eina_log_domain_register("efl_debugd", EINA_COLOR_CYAN);
671 671
672 _string_to_opcode_hash = eina_hash_string_superfast_new(NULL); 672 _string_to_opcode_hash = eina_hash_string_superfast_new(NULL);
673 _opcode_register("Daemon/opcode_register", EINA_DEBUG_OPCODE_REGISTER, _opcode_register_cb); 673 _opcode_register("Daemon/opcode_register", EINA_DEBUG_OPCODE_REGISTER, _opcode_register_cb);
@@ -683,6 +683,7 @@ main(int argc EINA_UNUSED, char **argv EINA_UNUSED)
683 683
684 ecore_con_shutdown(); 684 ecore_con_shutdown();
685 ecore_shutdown(); 685 ecore_shutdown();
686 eina_log_domain_unregister(_log_dom);
686 eina_shutdown(); 687 eina_shutdown();
687 688
688 return _retval; 689 return _retval;
diff --git a/src/bin/ethumb_client/ethumbd.c b/src/bin/ethumb_client/ethumbd.c
index 02735e34b1..a1790c7be3 100644
--- a/src/bin/ethumb_client/ethumbd.c
+++ b/src/bin/ethumb_client/ethumbd.c
@@ -1755,8 +1755,6 @@ main(int argc, char *argv[])
1755 1755
1756 memset(&ed, 0, sizeof(ed)); 1756 memset(&ed, 0, sizeof(ed));
1757 ecore_init(); 1757 ecore_init();
1758 eina_init();
1759
1760 ethumb_init(); 1758 ethumb_init();
1761 1759
1762 if (_log_domain < 0) 1760 if (_log_domain < 0)
@@ -1861,7 +1859,6 @@ main(int argc, char *argv[])
1861 1859
1862 if (_pfx) eina_prefix_free(_pfx); 1860 if (_pfx) eina_prefix_free(_pfx);
1863 ethumb_shutdown(); 1861 ethumb_shutdown();
1864 eina_shutdown();
1865 ecore_shutdown(); 1862 ecore_shutdown();
1866 return exit_value; 1863 return exit_value;
1867} 1864}
diff --git a/src/bin/ethumb_client/ethumbd_client.c b/src/bin/ethumb_client/ethumbd_client.c
index e81fc2e9a7..d833296f8c 100644
--- a/src/bin/ethumb_client/ethumbd_client.c
+++ b/src/bin/ethumb_client/ethumbd_client.c
@@ -246,7 +246,6 @@ main(int argc, char *argv[])
246 int i, ret = 0; 246 int i, ret = 0;
247 247
248 ethumb_client_init(); 248 ethumb_client_init();
249 ecore_init();
250 249
251 Ecore_Getopt_Value values[] = { 250 Ecore_Getopt_Value values[] = {
252 ECORE_GETOPT_VALUE_PTR_CAST(opts.geometry), 251 ECORE_GETOPT_VALUE_PTR_CAST(opts.geometry),
@@ -323,7 +322,6 @@ main(int argc, char *argv[])
323 eina_stringshare_del(opts.frame.group); 322 eina_stringshare_del(opts.frame.group);
324 eina_stringshare_del(opts.frame.swallow); 323 eina_stringshare_del(opts.frame.swallow);
325 } 324 }
326 ecore_shutdown();
327 ethumb_client_shutdown(); 325 ethumb_client_shutdown();
328 326
329 return ret; 327 return ret;