summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/lib/edje/edje_cache.c9
-rw-r--r--src/lib/eina/eina_mempool.c9
-rw-r--r--src/lib/eio/eio_monitor.c9
-rw-r--r--src/lib/elementary/elm_config.c210
-rw-r--r--src/lib/evas/file/evas_module.c41
-rw-r--r--src/modules/evas/engines/gl_common/evas_gl_texture.c9
6 files changed, 178 insertions, 109 deletions
diff --git a/src/lib/edje/edje_cache.c b/src/lib/edje/edje_cache.c
index 23ced3c684..97d82ba58d 100644
--- a/src/lib/edje/edje_cache.c
+++ b/src/lib/edje/edje_cache.c
@@ -104,7 +104,14 @@ _edje_programs_patterns_init(Edje_Part_Collection *edc)
104 if (ssp->signals_patterns) 104 if (ssp->signals_patterns)
105 return; 105 return;
106 106
107 if (getenv("EDJE_DUMP_PROGRAMS")) 107 static signed char dump_programs = -1;
108
109 if (dump_programs == -1)
110 {
111 if (getenv("EDJE_DUMP_PROGRAMS")) dump_programs = 1;
112 else dump_programs = 0;
113 }
114 if (dump_programs == 1)
108 { 115 {
109 INF("Group '%s' programs:", edc->part); 116 INF("Group '%s' programs:", edc->part);
110#define EDJE_DUMP_PROGRAM(Section) \ 117#define EDJE_DUMP_PROGRAM(Section) \
diff --git a/src/lib/eina/eina_mempool.c b/src/lib/eina/eina_mempool.c
index a6d0d18fe2..56144a0f1c 100644
--- a/src/lib/eina/eina_mempool.c
+++ b/src/lib/eina/eina_mempool.c
@@ -68,7 +68,14 @@ _new_va(const char *name,
68 Eina_Mempool_Backend *be; 68 Eina_Mempool_Backend *be;
69 Eina_Mempool *mp = NULL; 69 Eina_Mempool *mp = NULL;
70 70
71 if (getenv("EINA_MEMPOOL_PASS")) 71 static signed char mempool_pass = -1;
72
73 if (mempool_pass == -1)
74 {
75 if (getenv("EINA_MEMPOOL_PASS")) mempool_pass = 1;
76 else mempool_pass = 0;
77 }
78 if (mempool_pass == 1)
72 { 79 {
73 be = eina_hash_find(_backends, "pass_through"); 80 be = eina_hash_find(_backends, "pass_through");
74 if (!be) be = eina_hash_find(_backends, name); 81 if (!be) be = eina_hash_find(_backends, name);
diff --git a/src/lib/eio/eio_monitor.c b/src/lib/eio/eio_monitor.c
index 84262bb329..bc1ed07db0 100644
--- a/src/lib/eio/eio_monitor.c
+++ b/src/lib/eio/eio_monitor.c
@@ -371,7 +371,14 @@ eio_monitor_stringshared_add(const char *path)
371 371
372 EINA_REFCOUNT_INIT(monitor); 372 EINA_REFCOUNT_INIT(monitor);
373 373
374 if (getenv("EIO_MONITOR_POLL")) 374 static signed char monpoll = -1;
375
376 if (monpoll == -1)
377 {
378 if (getenv("EIO_MONITOR_POLL")) monpoll = 1;
379 else monpoll = 0;
380 }
381 if (monpoll)
375 eio_monitor_fallback_add(monitor); 382 eio_monitor_fallback_add(monitor);
376 else 383 else
377 eio_monitor_backend_add(monitor); 384 eio_monitor_backend_add(monitor);
diff --git a/src/lib/elementary/elm_config.c b/src/lib/elementary/elm_config.c
index c6da38ed27..e663ea5b24 100644
--- a/src/lib/elementary/elm_config.c
+++ b/src/lib/elementary/elm_config.c
@@ -634,6 +634,35 @@ end:
634 return off; 634 return off;
635} 635}
636 636
637static Eina_Hash *_getenv_once_envs = NULL;
638static const char *_getenv_once_empty = "";
639
640static const char *
641_getenv_once(const char *env)
642{
643 const char *s;
644
645 if (_getenv_once_envs)
646 {
647 s = eina_hash_find(_getenv_once_envs, env);
648 if (s == _getenv_once_empty) return NULL;
649 if (s) return s;
650 }
651 else _getenv_once_envs = eina_hash_string_superfast_new(NULL);
652 s = getenv(env);
653 if (s)
654 {
655 s = eina_stringshare_add(s);
656 eina_hash_add(_getenv_once_envs, env, s);
657 return s;
658 }
659 else
660 {
661 eina_hash_add(_getenv_once_envs, env, _getenv_once_empty);
662 }
663 return NULL;
664}
665
637size_t 666size_t
638_elm_config_user_dir_snprintf(char *dst, 667_elm_config_user_dir_snprintf(char *dst,
639 size_t size, 668 size_t size,
@@ -647,7 +676,7 @@ _elm_config_user_dir_snprintf(char *dst,
647 676
648 if (use_xdg_config == -1) 677 if (use_xdg_config == -1)
649 { 678 {
650 if (getenv("ELM_CONFIG_DIR_XDG")) use_xdg_config = 1; 679 if (_getenv_once("ELM_CONFIG_DIR_XDG")) use_xdg_config = 1;
651 else use_xdg_config = 0; 680 else use_xdg_config = 0;
652 } 681 }
653 if (use_xdg_config) 682 if (use_xdg_config)
@@ -1443,12 +1472,13 @@ list_free:
1443static void 1472static void
1444_profile_fetch_from_conf(void) 1473_profile_fetch_from_conf(void)
1445{ 1474{
1446 char buf[PATH_MAX], *p, *s; 1475 char buf[PATH_MAX], *p;
1476 const char *s;
1447 Eet_File *ef = NULL; 1477 Eet_File *ef = NULL;
1448 int len = 0, i; 1478 int len = 0, i;
1449 1479
1450 // if env var - use profile without question 1480 // if env var - use profile without question
1451 s = getenv("ELM_PROFILE"); 1481 s = _getenv_once("ELM_PROFILE");
1452 if (s) 1482 if (s)
1453 { 1483 {
1454 _elm_profile = strdup(s); 1484 _elm_profile = strdup(s);
@@ -2091,7 +2121,7 @@ _elm_config_profile_save(const char *profile)
2091 Eet_File *ef; 2121 Eet_File *ef;
2092 size_t len; 2122 size_t len;
2093 2123
2094 if (_use_build_config || ((s = getenv("ELM_PROFILE_NOSAVE")) && atoi(s))) 2124 if (_use_build_config || ((s = _getenv_once("ELM_PROFILE_NOSAVE")) && atoi(s)))
2095 return EINA_TRUE; 2125 return EINA_TRUE;
2096 2126
2097 len = _elm_config_user_dir_snprintf(buf, sizeof(buf), "config/profile.cfg"); 2127 len = _elm_config_user_dir_snprintf(buf, sizeof(buf), "config/profile.cfg");
@@ -2404,10 +2434,10 @@ _config_update(void)
2404static void 2434static void
2405_env_get(void) 2435_env_get(void)
2406{ 2436{
2407 char *s; 2437 const char *s;
2408 double friction; 2438 double friction;
2409 2439
2410 s = getenv("ELM_ENGINE"); 2440 s = _getenv_once("ELM_ENGINE");
2411 if (s) 2441 if (s)
2412 { 2442 {
2413 if ((!strcasecmp(s, "x11")) || 2443 if ((!strcasecmp(s, "x11")) ||
@@ -2464,47 +2494,47 @@ _env_get(void)
2464 eina_stringshare_replace(&_elm_preferred_engine, _elm_config->engine); 2494 eina_stringshare_replace(&_elm_preferred_engine, _elm_config->engine);
2465 } 2495 }
2466 2496
2467 s = getenv("ELM_VSYNC"); 2497 s = _getenv_once("ELM_VSYNC");
2468 if (s) _elm_config->vsync = !!atoi(s); 2498 if (s) _elm_config->vsync = !!atoi(s);
2469 2499
2470 s = getenv("ELM_THUMBSCROLL_ENABLE"); 2500 s = _getenv_once("ELM_THUMBSCROLL_ENABLE");
2471 if (s) _elm_config->thumbscroll_enable = !!atoi(s); 2501 if (s) _elm_config->thumbscroll_enable = !!atoi(s);
2472 s = getenv("ELM_THUMBSCROLL_THRESHOLD"); 2502 s = _getenv_once("ELM_THUMBSCROLL_THRESHOLD");
2473 if (s) _elm_config->thumbscroll_threshold = atoi(s); 2503 if (s) _elm_config->thumbscroll_threshold = atoi(s);
2474 s = getenv("ELM_THUMBSCROLL_HOLD_THRESHOLD"); 2504 s = _getenv_once("ELM_THUMBSCROLL_HOLD_THRESHOLD");
2475 if (s) _elm_config->thumbscroll_hold_threshold = atoi(s); 2505 if (s) _elm_config->thumbscroll_hold_threshold = atoi(s);
2476 // FIXME: floatformat locale issues here 1.0 vs 1,0 - should just be 1.0 2506 // FIXME: floatformat locale issues here 1.0 vs 1,0 - should just be 1.0
2477 s = getenv("ELM_THUMBSCROLL_MOMENTUM_THRESHOLD"); 2507 s = _getenv_once("ELM_THUMBSCROLL_MOMENTUM_THRESHOLD");
2478 if (s) _elm_config->thumbscroll_momentum_threshold = _elm_atof(s); 2508 if (s) _elm_config->thumbscroll_momentum_threshold = _elm_atof(s);
2479 s = getenv("ELM_THUMBSCROLL_FLICK_DISTANCE_TOLERANCE"); 2509 s = _getenv_once("ELM_THUMBSCROLL_FLICK_DISTANCE_TOLERANCE");
2480 if (s) _elm_config->thumbscroll_flick_distance_tolerance = atoi(s); 2510 if (s) _elm_config->thumbscroll_flick_distance_tolerance = atoi(s);
2481 s = getenv("ELM_THUMBSCROLL_MOMENTUM_DISTANCE_MAX"); 2511 s = _getenv_once("ELM_THUMBSCROLL_MOMENTUM_DISTANCE_MAX");
2482 if (s) _elm_config->thumbscroll_momentum_distance_max = atoi(s); 2512 if (s) _elm_config->thumbscroll_momentum_distance_max = atoi(s);
2483 s = getenv("ELM_THUMBSCROLL_FRICTION"); 2513 s = _getenv_once("ELM_THUMBSCROLL_FRICTION");
2484 if (s) _elm_config->thumbscroll_friction = _elm_atof(s); 2514 if (s) _elm_config->thumbscroll_friction = _elm_atof(s);
2485 s = getenv("ELM_THUMBSCROLL_MOMENTUM_FRICTION"); 2515 s = _getenv_once("ELM_THUMBSCROLL_MOMENTUM_FRICTION");
2486 if (s) _elm_config->thumbscroll_momentum_friction = _elm_atof(s); 2516 if (s) _elm_config->thumbscroll_momentum_friction = _elm_atof(s);
2487 s = getenv("ELM_THUMBSCROLL_MIN_FRICTION"); 2517 s = _getenv_once("ELM_THUMBSCROLL_MIN_FRICTION");
2488 if (s) _elm_config->thumbscroll_min_friction = _elm_atof(s); 2518 if (s) _elm_config->thumbscroll_min_friction = _elm_atof(s);
2489 s = getenv("ELM_THUMBSCROLL_FRICTION_STANDARD"); 2519 s = _getenv_once("ELM_THUMBSCROLL_FRICTION_STANDARD");
2490 if (s) _elm_config->thumbscroll_friction_standard = _elm_atof(s); 2520 if (s) _elm_config->thumbscroll_friction_standard = _elm_atof(s);
2491 s = getenv("ELM_THUMBSCROLL_BOUNCE_ENABLE"); 2521 s = _getenv_once("ELM_THUMBSCROLL_BOUNCE_ENABLE");
2492 if (s) _elm_config->thumbscroll_bounce_enable = !!atoi(s); 2522 if (s) _elm_config->thumbscroll_bounce_enable = !!atoi(s);
2493 s = getenv("ELM_THUMBSCROLL_BOUNCE_FRICTION"); 2523 s = _getenv_once("ELM_THUMBSCROLL_BOUNCE_FRICTION");
2494 if (s) _elm_config->thumbscroll_bounce_friction = _elm_atof(s); 2524 if (s) _elm_config->thumbscroll_bounce_friction = _elm_atof(s);
2495 s = getenv("ELM_THUMBSCROLL_ACCELERATION_THRESHOLD"); 2525 s = _getenv_once("ELM_THUMBSCROLL_ACCELERATION_THRESHOLD");
2496 if (s) _elm_config->thumbscroll_acceleration_threshold = _elm_atof(s); 2526 if (s) _elm_config->thumbscroll_acceleration_threshold = _elm_atof(s);
2497 s = getenv("ELM_THUMBSCROLL_ACCELERATION_TIME_LIMIT"); 2527 s = _getenv_once("ELM_THUMBSCROLL_ACCELERATION_TIME_LIMIT");
2498 if (s) _elm_config->thumbscroll_acceleration_time_limit = _elm_atof(s); 2528 if (s) _elm_config->thumbscroll_acceleration_time_limit = _elm_atof(s);
2499 s = getenv("ELM_THUMBSCROLL_ACCELERATION_WEIGHT"); 2529 s = _getenv_once("ELM_THUMBSCROLL_ACCELERATION_WEIGHT");
2500 if (s) _elm_config->thumbscroll_acceleration_weight = _elm_atof(s); 2530 if (s) _elm_config->thumbscroll_acceleration_weight = _elm_atof(s);
2501 s = getenv("ELM_PAGE_SCROLL_FRICTION"); 2531 s = _getenv_once("ELM_PAGE_SCROLL_FRICTION");
2502 if (s) _elm_config->page_scroll_friction = _elm_atof(s); 2532 if (s) _elm_config->page_scroll_friction = _elm_atof(s);
2503 s = getenv("ELM_BRING_IN_SCROLL_FRICTION"); 2533 s = _getenv_once("ELM_BRING_IN_SCROLL_FRICTION");
2504 if (s) _elm_config->bring_in_scroll_friction = _elm_atof(s); 2534 if (s) _elm_config->bring_in_scroll_friction = _elm_atof(s);
2505 s = getenv("ELM_ZOOM_FRICTION"); 2535 s = _getenv_once("ELM_ZOOM_FRICTION");
2506 if (s) _elm_config->zoom_friction = _elm_atof(s); 2536 if (s) _elm_config->zoom_friction = _elm_atof(s);
2507 s = getenv("ELM_THUMBSCROLL_BORDER_FRICTION"); 2537 s = _getenv_once("ELM_THUMBSCROLL_BORDER_FRICTION");
2508 if (s) 2538 if (s)
2509 { 2539 {
2510 friction = _elm_atof(s); 2540 friction = _elm_atof(s);
@@ -2516,7 +2546,7 @@ _env_get(void)
2516 2546
2517 _elm_config->thumbscroll_border_friction = friction; 2547 _elm_config->thumbscroll_border_friction = friction;
2518 } 2548 }
2519 s = getenv("ELM_THUMBSCROLL_SENSITIVITY_FRICTION"); 2549 s = _getenv_once("ELM_THUMBSCROLL_SENSITIVITY_FRICTION");
2520 if (s) 2550 if (s)
2521 { 2551 {
2522 friction = _elm_atof(s); 2552 friction = _elm_atof(s);
@@ -2528,23 +2558,23 @@ _env_get(void)
2528 2558
2529 _elm_config->thumbscroll_sensitivity_friction = friction; 2559 _elm_config->thumbscroll_sensitivity_friction = friction;
2530 } 2560 }
2531 s = getenv("ELM_SCROLL_SMOOTH_START_ENABLE"); 2561 s = _getenv_once("ELM_SCROLL_SMOOTH_START_ENABLE");
2532 if (s) _elm_config->scroll_smooth_start_enable = !!atoi(s); 2562 if (s) _elm_config->scroll_smooth_start_enable = !!atoi(s);
2533 s = getenv("ELM_SCROLL_ANIMATION_DISABLE"); 2563 s = _getenv_once("ELM_SCROLL_ANIMATION_DISABLE");
2534 if (s) _elm_config->scroll_animation_disable = !!atoi(s); 2564 if (s) _elm_config->scroll_animation_disable = !!atoi(s);
2535 s = getenv("ELM_SCROLL_ACCEL_FACTOR"); 2565 s = _getenv_once("ELM_SCROLL_ACCEL_FACTOR");
2536 if (s) _elm_config->scroll_accel_factor = atof(s); 2566 if (s) _elm_config->scroll_accel_factor = atof(s);
2537// s = getenv("ELM_SCROLL_SMOOTH_TIME_INTERVAL"); // not used anymore 2567// s = _getenv_once("ELM_SCROLL_SMOOTH_TIME_INTERVAL"); // not used anymore
2538// if (s) _elm_config->scroll_smooth_time_interval = atof(s); // not used anymore 2568// if (s) _elm_config->scroll_smooth_time_interval = atof(s); // not used anymore
2539 s = getenv("ELM_SCROLL_SMOOTH_AMOUNT"); 2569 s = _getenv_once("ELM_SCROLL_SMOOTH_AMOUNT");
2540 if (s) _elm_config->scroll_smooth_amount = _elm_atof(s); 2570 if (s) _elm_config->scroll_smooth_amount = _elm_atof(s);
2541// s = getenv("ELM_SCROLL_SMOOTH_HISTORY_WEIGHT"); // not used anymore 2571// s = _getenv_once("ELM_SCROLL_SMOOTH_HISTORY_WEIGHT"); // not used anymore
2542// if (s) _elm_config->scroll_smooth_history_weight = _elm_atof(s); // not used anymore 2572// if (s) _elm_config->scroll_smooth_history_weight = _elm_atof(s); // not used anymore
2543// s = getenv("ELM_SCROLL_SMOOTH_FUTURE_TIME"); // not used anymore 2573// s = _getenv_once("ELM_SCROLL_SMOOTH_FUTURE_TIME"); // not used anymore
2544// if (s) _elm_config->scroll_smooth_future_time = _elm_atof(s); // not used anymore 2574// if (s) _elm_config->scroll_smooth_future_time = _elm_atof(s); // not used anymore
2545 s = getenv("ELM_SCROLL_SMOOTH_TIME_WINDOW"); 2575 s = _getenv_once("ELM_SCROLL_SMOOTH_TIME_WINDOW");
2546 if (s) _elm_config->scroll_smooth_time_window = _elm_atof(s); 2576 if (s) _elm_config->scroll_smooth_time_window = _elm_atof(s);
2547 s = getenv("ELM_FOCUS_AUTOSCROLL_MODE"); 2577 s = _getenv_once("ELM_FOCUS_AUTOSCROLL_MODE");
2548 if (s) 2578 if (s)
2549 { 2579 {
2550 if (!strcmp(s, "ELM_FOCUS_AUTOSCROLL_MODE_NONE")) 2580 if (!strcmp(s, "ELM_FOCUS_AUTOSCROLL_MODE_NONE"))
@@ -2554,7 +2584,7 @@ _env_get(void)
2554 else 2584 else
2555 _elm_config->focus_autoscroll_mode = ELM_FOCUS_AUTOSCROLL_MODE_SHOW; 2585 _elm_config->focus_autoscroll_mode = ELM_FOCUS_AUTOSCROLL_MODE_SHOW;
2556 } 2586 }
2557 s = getenv("ELM_SLIDER_INDICATOR_VISIBLE_MODE"); 2587 s = _getenv_once("ELM_SLIDER_INDICATOR_VISIBLE_MODE");
2558 if (s) 2588 if (s)
2559 { 2589 {
2560 if (!strcmp(s, "ELM_SLIDER_INDICATOR_VISIBLE_MODE_DEFAULT")) 2590 if (!strcmp(s, "ELM_SLIDER_INDICATOR_VISIBLE_MODE_DEFAULT"))
@@ -2566,10 +2596,10 @@ _env_get(void)
2566 else 2596 else
2567 _elm_config->slider_indicator_visible_mode = ELM_SLIDER_INDICATOR_VISIBLE_MODE_NONE; 2597 _elm_config->slider_indicator_visible_mode = ELM_SLIDER_INDICATOR_VISIBLE_MODE_NONE;
2568 } 2598 }
2569 s = getenv("ELM_THEME"); 2599 s = _getenv_once("ELM_THEME");
2570 if (s) eina_stringshare_replace(&_elm_config->theme, s); 2600 if (s) eina_stringshare_replace(&_elm_config->theme, s);
2571 2601
2572 s = getenv("ELM_FONT_HINTING"); 2602 s = _getenv_once("ELM_FONT_HINTING");
2573 if (s) 2603 if (s)
2574 { 2604 {
2575 if (!strcasecmp(s, "none")) _elm_config->font_hinting = 0; 2605 if (!strcasecmp(s, "none")) _elm_config->font_hinting = 0;
@@ -2579,7 +2609,7 @@ _env_get(void)
2579 _elm_config->font_hinting = 2; 2609 _elm_config->font_hinting = 2;
2580 } 2610 }
2581 2611
2582 s = getenv("ELM_FONT_PATH"); 2612 s = _getenv_once("ELM_FONT_PATH");
2583 if (s) 2613 if (s)
2584 { 2614 {
2585 const char *p, *pp; 2615 const char *p, *pp;
@@ -2617,22 +2647,22 @@ _env_get(void)
2617 } 2647 }
2618 } 2648 }
2619 2649
2620 s = getenv("ELM_IMAGE_CACHE"); 2650 s = _getenv_once("ELM_IMAGE_CACHE");
2621 if (s) _elm_config->image_cache = atoi(s); 2651 if (s) _elm_config->image_cache = atoi(s);
2622 2652
2623 s = getenv("ELM_FONT_CACHE"); 2653 s = _getenv_once("ELM_FONT_CACHE");
2624 if (s) _elm_config->font_cache = atoi(s); 2654 if (s) _elm_config->font_cache = atoi(s);
2625 2655
2626 s = getenv("ELM_SCALE"); 2656 s = _getenv_once("ELM_SCALE");
2627 if (s) _elm_config->scale = _elm_atof(s); 2657 if (s) _elm_config->scale = _elm_atof(s);
2628 2658
2629 s = getenv("ELM_FINGER_SIZE"); 2659 s = _getenv_once("ELM_FINGER_SIZE");
2630 if (s) _elm_config->finger_size = atoi(s); 2660 if (s) _elm_config->finger_size = atoi(s);
2631 2661
2632 s = getenv("ELM_PASSWORD_SHOW_LAST"); 2662 s = _getenv_once("ELM_PASSWORD_SHOW_LAST");
2633 if (s) _elm_config->password_show_last = !!atoi(s); 2663 if (s) _elm_config->password_show_last = !!atoi(s);
2634 2664
2635 s = getenv("ELM_PASSWORD_SHOW_LAST_TIMEOUT"); 2665 s = _getenv_once("ELM_PASSWORD_SHOW_LAST_TIMEOUT");
2636 if (s) 2666 if (s)
2637 { 2667 {
2638 double pw_show_last_timeout = _elm_atof(s); 2668 double pw_show_last_timeout = _elm_atof(s);
@@ -2640,14 +2670,14 @@ _env_get(void)
2640 _elm_config->password_show_last_timeout = pw_show_last_timeout; 2670 _elm_config->password_show_last_timeout = pw_show_last_timeout;
2641 } 2671 }
2642 2672
2643 s = getenv("ELM_FPS"); 2673 s = _getenv_once("ELM_FPS");
2644 if (s) _elm_config->fps = _elm_atof(s); 2674 if (s) _elm_config->fps = _elm_atof(s);
2645 if (_elm_config->fps < 1.0) _elm_config->fps = 1.0; 2675 if (_elm_config->fps < 1.0) _elm_config->fps = 1.0;
2646 2676
2647 s = getenv("ELM_MODULES"); 2677 s = _getenv_once("ELM_MODULES");
2648 if (s) eina_stringshare_replace(&_elm_config->modules, s); 2678 if (s) eina_stringshare_replace(&_elm_config->modules, s);
2649 2679
2650 s = getenv("ELM_TOOLTIP_DELAY"); 2680 s = _getenv_once("ELM_TOOLTIP_DELAY");
2651 if (s) 2681 if (s)
2652 { 2682 {
2653 double delay = _elm_atof(s); 2683 double delay = _elm_atof(s);
@@ -2655,113 +2685,113 @@ _env_get(void)
2655 _elm_config->tooltip_delay = delay; 2685 _elm_config->tooltip_delay = delay;
2656 } 2686 }
2657 2687
2658 s = getenv("ELM_CURSOR_ENGINE_ONLY"); 2688 s = _getenv_once("ELM_CURSOR_ENGINE_ONLY");
2659 if (s) _elm_config->cursor_engine_only = !!atoi(s); 2689 if (s) _elm_config->cursor_engine_only = !!atoi(s);
2660 2690
2661 s = getenv("ELM_FOCUS_HIGHLIGHT_ENABLE"); 2691 s = _getenv_once("ELM_FOCUS_HIGHLIGHT_ENABLE");
2662 if (s) _elm_config->focus_highlight_enable = !!atoi(s); 2692 if (s) _elm_config->focus_highlight_enable = !!atoi(s);
2663 2693
2664 s = getenv("ELM_FOCUS_HIGHLIGHT_ANIMATE"); 2694 s = _getenv_once("ELM_FOCUS_HIGHLIGHT_ANIMATE");
2665 if (s) _elm_config->focus_highlight_animate = !!atoi(s); 2695 if (s) _elm_config->focus_highlight_animate = !!atoi(s);
2666 2696
2667 s = getenv("ELM_FOCUS_HIGHLIGHT_CLIP_DISABLE"); 2697 s = _getenv_once("ELM_FOCUS_HIGHLIGHT_CLIP_DISABLE");
2668 if (s) _elm_config->focus_highlight_clip_disable = !!atoi(s); 2698 if (s) _elm_config->focus_highlight_clip_disable = !!atoi(s);
2669 2699
2670 s = getenv("ELM_FOCUS_MOVE_POLICY"); 2700 s = _getenv_once("ELM_FOCUS_MOVE_POLICY");
2671 if (s) _elm_config->focus_move_policy = !!atoi(s); 2701 if (s) _elm_config->focus_move_policy = !!atoi(s);
2672 2702
2673 s = getenv("ELM_ITEM_SELECT_ON_FOCUS_DISABLE"); 2703 s = _getenv_once("ELM_ITEM_SELECT_ON_FOCUS_DISABLE");
2674 if (s) _elm_config->item_select_on_focus_disable = !!atoi(s); 2704 if (s) _elm_config->item_select_on_focus_disable = !!atoi(s);
2675 2705
2676 s = getenv("ELM_FIRST_ITEM_FOCUS_ON_FIRST_FOCUS_IN"); 2706 s = _getenv_once("ELM_FIRST_ITEM_FOCUS_ON_FIRST_FOCUS_IN");
2677 if (s) _elm_config->first_item_focus_on_first_focus_in = !!atoi(s); 2707 if (s) _elm_config->first_item_focus_on_first_focus_in = !!atoi(s);
2678 2708
2679 s = getenv("ELM_TOOLBAR_SHRINK_MODE"); 2709 s = _getenv_once("ELM_TOOLBAR_SHRINK_MODE");
2680 if (s) _elm_config->toolbar_shrink_mode = atoi(s); 2710 if (s) _elm_config->toolbar_shrink_mode = atoi(s);
2681 2711
2682 s = getenv("ELM_FILESELECTOR_EXPAND_ENABLE"); 2712 s = _getenv_once("ELM_FILESELECTOR_EXPAND_ENABLE");
2683 if (s) _elm_config->fileselector_expand_enable = !!atoi(s); 2713 if (s) _elm_config->fileselector_expand_enable = !!atoi(s);
2684 2714
2685 s = getenv("ELM_FILESELECTOR_DOUBLE_TAP_NAVIGATION_ENABLE"); 2715 s = _getenv_once("ELM_FILESELECTOR_DOUBLE_TAP_NAVIGATION_ENABLE");
2686 if (s) _elm_config->fileselector_double_tap_navigation_enable = !!atoi(s); 2716 if (s) _elm_config->fileselector_double_tap_navigation_enable = !!atoi(s);
2687 2717
2688 s = getenv("ELM_INWIN_DIALOGS_ENABLE"); 2718 s = _getenv_once("ELM_INWIN_DIALOGS_ENABLE");
2689 if (s) _elm_config->inwin_dialogs_enable = !!atoi(s); 2719 if (s) _elm_config->inwin_dialogs_enable = !!atoi(s);
2690 2720
2691 s = getenv("ELM_ICON_SIZE"); 2721 s = _getenv_once("ELM_ICON_SIZE");
2692 if (s) _elm_config->icon_size = atoi(s); 2722 if (s) _elm_config->icon_size = atoi(s);
2693 2723
2694 s = getenv("ELM_CONTEXT_MENU_DISABLED"); 2724 s = _getenv_once("ELM_CONTEXT_MENU_DISABLED");
2695 if (s) _elm_config->context_menu_disabled = !!atoi(s); 2725 if (s) _elm_config->context_menu_disabled = !!atoi(s);
2696 2726
2697 s = getenv("ELM_LONGPRESS_TIMEOUT"); 2727 s = _getenv_once("ELM_LONGPRESS_TIMEOUT");
2698 if (s) _elm_config->longpress_timeout = _elm_atof(s); 2728 if (s) _elm_config->longpress_timeout = _elm_atof(s);
2699 if (_elm_config->longpress_timeout < 0.0) 2729 if (_elm_config->longpress_timeout < 0.0)
2700 _elm_config->longpress_timeout = 0.0; 2730 _elm_config->longpress_timeout = 0.0;
2701 2731
2702 s = getenv("ELM_EFFECT_ENABLE"); 2732 s = _getenv_once("ELM_EFFECT_ENABLE");
2703 if (s) _elm_config->effect_enable = !!atoi(s); 2733 if (s) _elm_config->effect_enable = !!atoi(s);
2704 2734
2705 s = getenv("ELM_DESKTOP_ENTRY"); 2735 s = _getenv_once("ELM_DESKTOP_ENTRY");
2706 if (s) _elm_config->desktop_entry = !!atoi(s); 2736 if (s) _elm_config->desktop_entry = !!atoi(s);
2707 s = getenv("ELM_ACCESS_MODE"); 2737 s = _getenv_once("ELM_ACCESS_MODE");
2708 if (s) _elm_config->access_mode = ELM_ACCESS_MODE_ON; 2738 if (s) _elm_config->access_mode = ELM_ACCESS_MODE_ON;
2709 2739
2710 s = getenv("ELM_SELECTION_CLEAR_ENABLE"); 2740 s = _getenv_once("ELM_SELECTION_CLEAR_ENABLE");
2711 if (s) _elm_config->selection_clear_enable = !!atoi(s); 2741 if (s) _elm_config->selection_clear_enable = !!atoi(s);
2712 2742
2713 s = getenv("ELM_AUTO_THROTTLE"); 2743 s = _getenv_once("ELM_AUTO_THROTTLE");
2714 if (s) _elm_config->auto_throttle = EINA_TRUE; 2744 if (s) _elm_config->auto_throttle = EINA_TRUE;
2715 s = getenv("ELM_AUTO_THROTTLE_AMOUNT"); 2745 s = _getenv_once("ELM_AUTO_THROTTLE_AMOUNT");
2716 if (s) _elm_config->auto_throttle_amount = _elm_atof(s); 2746 if (s) _elm_config->auto_throttle_amount = _elm_atof(s);
2717 s = getenv("ELM_AUTO_NORENDER_WITHDRAWN"); 2747 s = _getenv_once("ELM_AUTO_NORENDER_WITHDRAWN");
2718 if (s) _elm_config->auto_norender_withdrawn = EINA_TRUE; 2748 if (s) _elm_config->auto_norender_withdrawn = EINA_TRUE;
2719 s = getenv("ELM_AUTO_NORENDER_ICONIFIED_SAME_AS_WITHDRAWN"); 2749 s = _getenv_once("ELM_AUTO_NORENDER_ICONIFIED_SAME_AS_WITHDRAWN");
2720 if (s) _elm_config->auto_norender_iconified_same_as_withdrawn = EINA_TRUE; 2750 if (s) _elm_config->auto_norender_iconified_same_as_withdrawn = EINA_TRUE;
2721 s = getenv("ELM_AUTO_FLUSH_WITHDRAWN"); 2751 s = _getenv_once("ELM_AUTO_FLUSH_WITHDRAWN");
2722 if (s) _elm_config->auto_flush_withdrawn = EINA_TRUE; 2752 if (s) _elm_config->auto_flush_withdrawn = EINA_TRUE;
2723 s = getenv("ELM_AUTO_DUMP_WIDTHDRAWN"); 2753 s = _getenv_once("ELM_AUTO_DUMP_WIDTHDRAWN");
2724 if (s) _elm_config->auto_dump_withdrawn = EINA_TRUE; 2754 if (s) _elm_config->auto_dump_withdrawn = EINA_TRUE;
2725 2755
2726 s = getenv("ELM_INDICATOR_SERVICE_0"); 2756 s = _getenv_once("ELM_INDICATOR_SERVICE_0");
2727 if (s) eina_stringshare_replace(&_elm_config->indicator_service_0, s); 2757 if (s) eina_stringshare_replace(&_elm_config->indicator_service_0, s);
2728 s = getenv("ELM_INDICATOR_SERVICE_90"); 2758 s = _getenv_once("ELM_INDICATOR_SERVICE_90");
2729 if (s) eina_stringshare_replace(&_elm_config->indicator_service_90, s); 2759 if (s) eina_stringshare_replace(&_elm_config->indicator_service_90, s);
2730 s = getenv("ELM_INDICATOR_SERVICE_180"); 2760 s = _getenv_once("ELM_INDICATOR_SERVICE_180");
2731 if (s) eina_stringshare_replace(&_elm_config->indicator_service_180, s); 2761 if (s) eina_stringshare_replace(&_elm_config->indicator_service_180, s);
2732 s = getenv("ELM_INDICATOR_SERVICE_270"); 2762 s = _getenv_once("ELM_INDICATOR_SERVICE_270");
2733 if (s) eina_stringshare_replace(&_elm_config->indicator_service_270, s); 2763 if (s) eina_stringshare_replace(&_elm_config->indicator_service_270, s);
2734 s = getenv("ELM_DISABLE_EXTERNAL_MENU"); 2764 s = _getenv_once("ELM_DISABLE_EXTERNAL_MENU");
2735 if (s) _elm_config->disable_external_menu = !!atoi(s); 2765 if (s) _elm_config->disable_external_menu = !!atoi(s);
2736 2766
2737 s = getenv("ELM_CLOUSEAU"); 2767 s = _getenv_once("ELM_CLOUSEAU");
2738 if (s) _elm_config->clouseau_enable = atoi(s); 2768 if (s) _elm_config->clouseau_enable = atoi(s);
2739 s = getenv("ELM_MAGNIFIER_ENABLE"); 2769 s = _getenv_once("ELM_MAGNIFIER_ENABLE");
2740 if (s) _elm_config->magnifier_enable = !!atoi(s); 2770 if (s) _elm_config->magnifier_enable = !!atoi(s);
2741 s = getenv("ELM_MAGNIFIER_SCALE"); 2771 s = _getenv_once("ELM_MAGNIFIER_SCALE");
2742 if (s) _elm_config->magnifier_scale = _elm_atof(s); 2772 if (s) _elm_config->magnifier_scale = _elm_atof(s);
2743 s = getenv("ELM_ATSPI_MODE"); 2773 s = _getenv_once("ELM_ATSPI_MODE");
2744 if (s) _elm_config->atspi_mode = ELM_ATSPI_MODE_ON; 2774 if (s) _elm_config->atspi_mode = ELM_ATSPI_MODE_ON;
2745 s = getenv("ELM_SPINNER_MIN_MAX_FILTER_ENABLE"); 2775 s = _getenv_once("ELM_SPINNER_MIN_MAX_FILTER_ENABLE");
2746 if (s) _elm_config->spinner_min_max_filter_enable = !!atoi(s); 2776 if (s) _elm_config->spinner_min_max_filter_enable = !!atoi(s);
2747 2777
2748 s = getenv("ELM_TRANSITION_DURATION_FACTOR"); 2778 s = _getenv_once("ELM_TRANSITION_DURATION_FACTOR");
2749 if (s) _elm_config->transition_duration_factor = atof(s); 2779 if (s) _elm_config->transition_duration_factor = atof(s);
2750 2780
2751 s = getenv("ELM_POPUP_HORIZONTAL_ALIGN"); 2781 s = _getenv_once("ELM_POPUP_HORIZONTAL_ALIGN");
2752 if (s) _elm_config->popup_horizontal_align = _elm_atof(s); 2782 if (s) _elm_config->popup_horizontal_align = _elm_atof(s);
2753 s = getenv("ELM_POPUP_VERTICAL_ALIGN"); 2783 s = _getenv_once("ELM_POPUP_VERTICAL_ALIGN");
2754 if (s) _elm_config->popup_vertical_align = _elm_atof(s); 2784 if (s) _elm_config->popup_vertical_align = _elm_atof(s);
2755 s = getenv("ELM_POPUP_SCROLLABLE"); 2785 s = _getenv_once("ELM_POPUP_SCROLLABLE");
2756 if (s) _elm_config->popup_scrollable = atoi(s); 2786 if (s) _elm_config->popup_scrollable = atoi(s);
2757 2787
2758 s = getenv("ELM_GLAYER_TAP_FINGER_SIZE"); 2788 s = _getenv_once("ELM_GLAYER_TAP_FINGER_SIZE");
2759 if (s) _elm_config->glayer_tap_finger_size = atoi(s); 2789 if (s) _elm_config->glayer_tap_finger_size = atoi(s);
2760 2790
2761 s = getenv("EFL_UI_DND_DRAG_ANIM_DURATION"); 2791 s = _getenv_once("EFL_UI_DND_DRAG_ANIM_DURATION");
2762 if (s) _elm_config->drag_anim_duration = _elm_atof(s); 2792 if (s) _elm_config->drag_anim_duration = _elm_atof(s);
2763 2793
2764 s = getenv("ELM_WIN_NO_BORDER"); 2794 s = _getenv_once("ELM_WIN_NO_BORDER");
2765 if (s) _elm_config->win_no_border = EINA_TRUE; 2795 if (s) _elm_config->win_no_border = EINA_TRUE;
2766} 2796}
2767 2797
diff --git a/src/lib/evas/file/evas_module.c b/src/lib/evas/file/evas_module.c
index b467ebcdbf..a1e8b623af 100644
--- a/src/lib/evas/file/evas_module.c
+++ b/src/lib/evas/file/evas_module.c
@@ -116,7 +116,14 @@ evas_module_paths_init(void)
116 if (getuid() == geteuid()) 116 if (getuid() == geteuid())
117#endif 117#endif
118 { 118 {
119 if (getenv("EFL_RUN_IN_TREE")) 119 static signed char run_in_tree = -1;
120
121 if (run_in_tree == -1)
122 {
123 if (getenv("EFL_RUN_IN_TREE")) run_in_tree = 1;
124 else run_in_tree = 0;
125 }
126 if (run_in_tree == 1)
120 { 127 {
121 struct stat st; 128 struct stat st;
122 const char mp[] = PACKAGE_BUILD_DIR"/src/modules/evas"; 129 const char mp[] = PACKAGE_BUILD_DIR"/src/modules/evas";
@@ -432,9 +439,13 @@ evas_module_engine_list(void)
432 const char *s, *s2; 439 const char *s, *s2;
433 char buf[PATH_MAX]; 440 char buf[PATH_MAX];
434#ifdef NEED_RUN_IN_TREE 441#ifdef NEED_RUN_IN_TREE
435 Eina_Bool run_in_tree; 442 static signed char run_in_tree = -1;
436 443
437 run_in_tree = !!getenv("EFL_RUN_IN_TREE"); 444 if (run_in_tree == -1)
445 {
446 if (getenv("EFL_RUN_IN_TREE")) run_in_tree = 1;
447 else run_in_tree = 0;
448 }
438#endif 449#endif
439 450
440 EINA_LIST_FOREACH(evas_module_paths, l, s) 451 EINA_LIST_FOREACH(evas_module_paths, l, s)
@@ -455,7 +466,7 @@ evas_module_engine_list(void)
455 if (getuid() == geteuid()) 466 if (getuid() == geteuid())
456#endif 467#endif
457 { 468 {
458 if (run_in_tree) 469 if (run_in_tree == 1)
459 { 470 {
460 bs_mod_dir_get(buf, sizeof(buf), "evas/engines", fname); 471 bs_mod_dir_get(buf, sizeof(buf), "evas/engines", fname);
461 if (!evas_file_path_exists(buf)) 472 if (!evas_file_path_exists(buf))
@@ -549,7 +560,13 @@ evas_module_find_type(Evas_Module_Type type, const char *name)
549 Eina_Module *en; 560 Eina_Module *en;
550 Eina_List *l; 561 Eina_List *l;
551#ifdef NEED_RUN_IN_TREE 562#ifdef NEED_RUN_IN_TREE
552 Eina_Bool run_in_tree; 563 static signed char run_in_tree = -1;
564
565 if (run_in_tree == -1)
566 {
567 if (getenv("EFL_RUN_IN_TREE")) run_in_tree = 1;
568 else run_in_tree = 0;
569 }
553#endif 570#endif
554 571
555 if ((unsigned int)type > 5) return NULL; 572 if ((unsigned int)type > 5) return NULL;
@@ -561,10 +578,6 @@ evas_module_find_type(Evas_Module_Type type, const char *name)
561 return NULL; 578 return NULL;
562 } 579 }
563 580
564#ifdef NEED_RUN_IN_TREE
565 run_in_tree = !!getenv("EFL_RUN_IN_TREE");
566#endif
567
568 EINA_LIST_FOREACH(evas_module_paths, l, path) 581 EINA_LIST_FOREACH(evas_module_paths, l, path)
569 { 582 {
570 const char *type_str = "unknown"; 583 const char *type_str = "unknown";
@@ -584,7 +597,7 @@ evas_module_find_type(Evas_Module_Type type, const char *name)
584 if (getuid() == geteuid()) 597 if (getuid() == geteuid())
585#endif 598#endif
586 { 599 {
587 if (run_in_tree) 600 if (run_in_tree == 1)
588 { 601 {
589 char subsystem[PATH_MAX]; 602 char subsystem[PATH_MAX];
590 603
@@ -700,7 +713,7 @@ evas_module_clean(void)
700{ 713{
701 static int call_count = 0; 714 static int call_count = 0;
702/* int ago; */ 715/* int ago; */
703 int noclean = -1; 716 static signed char noclean = -1;
704/* Eina_List *l; */ 717/* Eina_List *l; */
705/* Evas_Module *em; */ 718/* Evas_Module *em; */
706 719
@@ -711,10 +724,8 @@ evas_module_clean(void)
711 724
712 if (noclean == -1) 725 if (noclean == -1)
713 { 726 {
714 if (getenv("EVAS_NOCLEAN")) 727 if (getenv("EVAS_NOCLEAN")) noclean = 1;
715 noclean = 1; 728 else noclean = 0;
716 else
717 noclean = 0;
718 } 729 }
719 if (noclean == 1) return; 730 if (noclean == 1) return;
720 731
diff --git a/src/modules/evas/engines/gl_common/evas_gl_texture.c b/src/modules/evas/engines/gl_common/evas_gl_texture.c
index cc5ed6bd13..ef99962261 100644
--- a/src/modules/evas/engines/gl_common/evas_gl_texture.c
+++ b/src/modules/evas/engines/gl_common/evas_gl_texture.c
@@ -180,7 +180,14 @@ evas_gl_common_gl_format_to_colorspace(GLuint f)
180static void 180static void
181_print_tex_count(void) 181_print_tex_count(void)
182{ 182{
183 if (getenv("EVAS_GL_MEMINFO")) 183 static signed char printit = -1;
184
185 if (printit == -1)
186 {
187 if (getenv("EVAS_GL_MEMINFO")) printit = 1;
188 else printit = 0;
189 }
190 if (printit == 1)
184 { 191 {
185 fprintf(stderr, 192 fprintf(stderr,
186 "T: c:%i/%ik | a:%i/%ik | v:%i/%ik | r:%i/%ik | n:%i/%ik | d:%i/%ik\n", 193 "T: c:%i/%ik | a:%i/%ik | v:%i/%ik | r:%i/%ik | n:%i/%ik | d:%i/%ik\n",