summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>2012-10-10 07:39:08 +0000
committerMike Blumenkrantz <michael.blumenkrantz@gmail.com>2012-10-10 07:39:08 +0000
commit5923846e24956b5355f03bc861b84f2da8f938d0 (patch)
treed717b15815b44e4cd963e8bf4d7cd297c206d1d3
parent1cdf725b7020a96aae62b52b1b611c9caa8abdff (diff)
remove e17 preload/precache hacks
SVN revision: 77705
-rw-r--r--configure.ac1
-rw-r--r--src/Makefile.am2
-rw-r--r--src/bin/e_start_main.c129
-rw-r--r--src/preload/Makefile.am25
-rw-r--r--src/preload/e_hack.c232
-rw-r--r--src/preload/e_hack.h12
-rw-r--r--src/preload/e_precache.c280
-rw-r--r--src/preload/e_precache.h18
-rwxr-xr-xx-ui.sh1
9 files changed, 4 insertions, 696 deletions
diff --git a/configure.ac b/configure.ac
index aae316284..58a2929ed 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1047,7 +1047,6 @@ src/modules/tiling/Makefile
1047src/modules/tiling/module.desktop 1047src/modules/tiling/module.desktop
1048src/modules/access/Makefile 1048src/modules/access/Makefile
1049src/modules/access/module.desktop 1049src/modules/access/module.desktop
1050src/preload/Makefile
1051data/Makefile 1050data/Makefile
1052data/images/Makefile 1051data/images/Makefile
1053data/flags/Makefile 1052data/flags/Makefile
diff --git a/src/Makefile.am b/src/Makefile.am
index d29641709..c3625499b 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,2 +1,2 @@
1MAINTAINERCLEANFILES = Makefile.in 1MAINTAINERCLEANFILES = Makefile.in
2SUBDIRS = bin modules preload 2SUBDIRS = bin modules
diff --git a/src/bin/e_start_main.c b/src/bin/e_start_main.c
index 6fab98b70..2c4fbedc0 100644
--- a/src/bin/e_start_main.c
+++ b/src/bin/e_start_main.c
@@ -60,69 +60,6 @@ prefix_determine(char *argv0)
60 return 1; 60 return 1;
61} 61}
62 62
63static void
64precache(void)
65{
66 FILE *f;
67 char *home;
68 char buf[4096], tbuf[256 * 1024];
69 struct stat st;
70 int l, fd, children = 0, cret;
71
72 home = getenv("HOME");
73 if (home) snprintf(buf, sizeof(buf), "%s/.e-precache", home);
74 else snprintf(buf, sizeof(buf), "/tmp/.e-precache");
75 f = fopen(buf, "r");
76 if (!f) return;
77 unlink(buf);
78 if (fork()) return;
79// while (fgets(buf, sizeof(buf), f));
80// rewind(f);
81 while (fgets(buf, sizeof(buf), f))
82 {
83 l = strlen(buf);
84 if (l > 0) buf[l - 1] = 0;
85 if (!fork())
86 {
87 if (buf[0] == 's') stat(buf + 2, &st);
88 else if (buf[0] == 'o')
89 {
90 fd = open(buf + 2, O_RDONLY);
91 if (fd >= 0)
92 {
93 while (read(fd, tbuf, 256 * 1024) > 0)
94 ;
95 close(fd);
96 }
97 }
98 else if (buf[0] == 'd')
99 {
100 fd = open(buf + 2, O_RDONLY);
101 if (fd >= 0)
102 {
103 while (read(fd, tbuf, 256 * 1024) > 0)
104 ;
105 close(fd);
106 }
107 }
108 exit(0);
109 }
110 children++;
111 if (children > 400)
112 {
113 wait(&cret);
114 children--;
115 }
116 }
117 fclose(f);
118 while (children > 0)
119 {
120 wait(&cret);
121 children--;
122 }
123 exit(0);
124}
125
126static int 63static int
127find_valgrind(char *path, size_t path_len) 64find_valgrind(char *path, size_t path_len)
128{ 65{
@@ -277,7 +214,7 @@ _env_path_append(const char *env, const char *path)
277int 214int
278main(int argc, char **argv) 215main(int argc, char **argv)
279{ 216{
280 int i, do_precache = 0, valgrind_mode = 0; 217 int i, valgrind_mode = 0;
281 int valgrind_tool = 0; 218 int valgrind_tool = 0;
282 int valgrind_gdbserver = 0; 219 int valgrind_gdbserver = 0;
283 char buf[16384], **args, *p; 220 char buf[16384], **args, *p;
@@ -292,8 +229,7 @@ main(int argc, char **argv)
292 229
293 for (i = 1; i < argc; i++) 230 for (i = 1; i < argc; i++)
294 { 231 {
295 if (!strcmp(argv[i], "-no-precache")) do_precache = 0; 232 if (!strcmp(argv[i], "-valgrind-gdb"))
296 else if (!strcmp(argv[i], "-valgrind-gdb"))
297 valgrind_gdbserver = 1; 233 valgrind_gdbserver = 1;
298 else if (!strncmp(argv[i], "-valgrind", sizeof("-valgrind") - 1)) 234 else if (!strncmp(argv[i], "-valgrind", sizeof("-valgrind") - 1))
299 { 235 {
@@ -329,8 +265,6 @@ main(int argc, char **argv)
329 printf 265 printf
330 ( 266 (
331 "Options:\n" 267 "Options:\n"
332 "\t-no-precache\n"
333 "\t\tDisable pre-caching of files\n"
334 "\t-valgrind[=MODE]\n" 268 "\t-valgrind[=MODE]\n"
335 "\t\tRun enlightenment from inside valgrind, mode is OR of:\n" 269 "\t\tRun enlightenment from inside valgrind, mode is OR of:\n"
336 "\t\t 1 = plain valgrind to catch crashes (default)\n" 270 "\t\t 1 = plain valgrind to catch crashes (default)\n"
@@ -375,7 +309,7 @@ main(int argc, char **argv)
375 } 309 }
376 } 310 }
377 311
378 printf("E - PID=%i, do_precache=%i, valgrind=%d", getpid(), do_precache, valgrind_mode); 312 printf("E - PID=%i, valgrind=%d", getpid(), valgrind_mode);
379 if (valgrind_mode) 313 if (valgrind_mode)
380 { 314 {
381 printf(" valgrind-command='%s'", valgrind_path); 315 printf(" valgrind-command='%s'", valgrind_path);
@@ -383,63 +317,6 @@ main(int argc, char **argv)
383 } 317 }
384 putchar('\n'); 318 putchar('\n');
385 319
386 if (do_precache)
387 {
388 void *lib, *func;
389
390 /* sanity checks - if precache might fail - check here first */
391 lib = dlopen("libeina.so", RTLD_GLOBAL | RTLD_LAZY);
392 if (!lib) dlopen("libeina.so.1", RTLD_GLOBAL | RTLD_LAZY);
393 if (!lib) goto done;
394 func = dlsym(lib, "eina_init");
395 if (!func) goto done;
396
397 lib = dlopen("libecore.so", RTLD_GLOBAL | RTLD_LAZY);
398 if (!lib) dlopen("libecore.so.1", RTLD_GLOBAL | RTLD_LAZY);
399 if (!lib) goto done;
400 func = dlsym(lib, "ecore_init");
401 if (!func) goto done;
402
403 lib = dlopen("libecore_file.so", RTLD_GLOBAL | RTLD_LAZY);
404 if (!lib) dlopen("libecore_file.so.1", RTLD_GLOBAL | RTLD_LAZY);
405 if (!lib) goto done;
406 func = dlsym(lib, "ecore_file_init");
407 if (!func) goto done;
408
409 lib = dlopen("libecore_x.so", RTLD_GLOBAL | RTLD_LAZY);
410 if (!lib) dlopen("libecore_x.so.1", RTLD_GLOBAL | RTLD_LAZY);
411 if (!lib) goto done;
412 func = dlsym(lib, "ecore_x_init");
413 if (!func) goto done;
414
415 lib = dlopen("libevas.so", RTLD_GLOBAL | RTLD_LAZY);
416 if (!lib) dlopen("libevas.so.1", RTLD_GLOBAL | RTLD_LAZY);
417 if (!lib) goto done;
418 func = dlsym(lib, "evas_init");
419 if (!func) goto done;
420
421 lib = dlopen("libedje.so", RTLD_GLOBAL | RTLD_LAZY);
422 if (!lib) dlopen("libedje.so.1", RTLD_GLOBAL | RTLD_LAZY);
423 if (!lib) goto done;
424 func = dlsym(lib, "edje_init");
425 if (!func) goto done;
426
427 lib = dlopen("libeet.so", RTLD_GLOBAL | RTLD_LAZY);
428 if (!lib) dlopen("libeet.so.0", RTLD_GLOBAL | RTLD_LAZY);
429 if (!lib) goto done;
430 func = dlsym(lib, "eet_init");
431 if (!func) goto done;
432
433 /* precache SHOULD work */
434 snprintf(buf, sizeof(buf), "%s/enlightenment/preload/e_precache.so",
435 eina_prefix_lib_get(pfx));
436 env_set("LD_PRELOAD", buf);
437 printf("E - PRECACHE GOING NOW...\n");
438 fflush(stdout);
439 precache();
440 }
441done:
442
443 /* mtrack memory tracker support */ 320 /* mtrack memory tracker support */
444 p = getenv("HOME"); 321 p = getenv("HOME");
445 if (p) 322 if (p)
diff --git a/src/preload/Makefile.am b/src/preload/Makefile.am
deleted file mode 100644
index 1f5fc01f4..000000000
--- a/src/preload/Makefile.am
+++ /dev/null
@@ -1,25 +0,0 @@
1MAINTAINERCLEANFILES = Makefile.in
2
3INCLUDES = -I. \
4 -I$(top_srcdir) \
5 -I$(top_srcdir)src/preload \
6 @e_cflags@
7
8pkgdir = $(libdir)/enlightenment/preload
9
10#pkg_LTLIBRARIES = e_hack.la e_precache.la
11pkg_LTLIBRARIES = e_precache.la
12
13#e_hack_la_SOURCES = \
14#e_hack.c \
15#e_hack.h
16#e_hack_la_LIBADD = @dlopen_libs@
17#e_hack_la_LDFLAGS = -module -avoid-version
18#e_hack_la_DEPENDENCIES = $(top_builddir)/config.h
19
20e_precache_la_SOURCES = \
21e_precache.c \
22e_precache.h
23e_precache_la_LIBADD = @e_libs@ @dlopen_libs@
24e_precache_la_LDFLAGS = -module -avoid-version
25e_precache_la_DEPENDENCIES = $(top_builddir)/config.h
diff --git a/src/preload/e_hack.c b/src/preload/e_hack.c
deleted file mode 100644
index 6562d807e..000000000
--- a/src/preload/e_hack.c
+++ /dev/null
@@ -1,232 +0,0 @@
1#include "config.h"
2#include "e_hack.h"
3
4/* FIXME:
5 * * gnome-terminal does this funky thing where a new gnome-temrinal process
6 * tries to message an existing one asking it to create a new terminal. this
7 * means none of these properties ever end up on a new term window - in fact
8 * only the ones that are on the first term process. we need a way of knowing
9 * this, OR making sure no new iwndows other than the first appear with these
10 * properties. this also leads to handling splash windows - we might want then
11 * the first 2 or 3 windows with it.
12 *
13 * we need to discuss this... it's an interesting hack that solves a LOT of
14 * things (and that we can maybe in future expand to hacking away at gtk and
15 * qt directly)
16 *
17 * anyway - for now this is fairly harmless and just adds a property to all
18 * top-level app windows
19 */
20
21/* prototypes */
22static void __e_hack_set_properties(Display *display, Window window);
23
24/* dlopened xlib so we can find the symbols in the real xlib to call them */
25static void *lib_xlib = NULL;
26
27/* the function that actually sets the properties on toplevel window */
28static void
29__e_hack_set_properties(Display *display, Window window)
30{
31 static Atom a_hack = 0;
32 char *env = NULL;
33 char buf[4096];
34 char buf2[4096];
35 uid_t uid;
36 pid_t pid, ppid;
37 struct utsname ubuf;
38
39 if (!a_hack) a_hack = XInternAtom(display, "__E_HACK", False);
40 buf[0] = 0;
41 buf[sizeof(buf) - 1] = 0;
42 uid = getuid();
43 snprintf(buf2, sizeof(buf2), "uid: %i\n", uid);
44 strncat(buf, buf2, sizeof(buf) - strlen(buf) - 1);
45 pid = getpid();
46 snprintf(buf2, sizeof(buf2), "pid: %i\n", pid);
47 strncat(buf, buf2, sizeof(buf) - strlen(buf) - 1);
48 ppid = getppid();
49 snprintf(buf2, sizeof(buf2), "ppid: %i\n", ppid);
50 strncat(buf, buf2, sizeof(buf) - strlen(buf) - 1);
51 if (!uname(&ubuf))
52 {
53 snprintf(buf2, sizeof(buf2), "machine_name: %s\n", ubuf.nodename);
54 strncat(buf, buf2, sizeof(buf) - strlen(buf) - 1);
55 }
56 if ((env = getenv("E_LAUNCH_ID")))
57 {
58 snprintf(buf2, sizeof(buf2), "launch_id: %s\n", env);
59 strncat(buf, buf2, sizeof(buf) - strlen(buf) - 1);
60 }
61 if ((env = getenv("USER")))
62 {
63 snprintf(buf2, sizeof(buf2), "username: %s\n", env);
64 strncat(buf, buf2, sizeof(buf) - strlen(buf) - 1);
65 }
66 if ((env = getenv("E_DESK")))
67 {
68 snprintf(buf2, sizeof(buf2), "e_desk: %s\n", env);
69 strncat(buf, buf2, sizeof(buf) - strlen(buf) - 1);
70 }
71 if ((env = getenv("E_ZONE")))
72 {
73 snprintf(buf2, sizeof(buf2), "e_zone: %s\n", env);
74 strncat(buf, buf2, sizeof(buf) - strlen(buf) - 1);
75 }
76 if ((env = getenv("E_CONTAINER")))
77 {
78 snprintf(buf2, sizeof(buf2), "e_container: %s\n", env);
79 strncat(buf, buf2, sizeof(buf) - strlen(buf) - 1);
80 }
81 if ((env = getenv("E_MANAGER")))
82 {
83 snprintf(buf2, sizeof(buf2), "e_manager: %s\n", env);
84 strncat(buf, buf2, sizeof(buf) - strlen(buf) - 1);
85 }
86 XChangeProperty(display, window, a_hack, XA_STRING, 8, PropModeReplace, (unsigned char *)buf, strlen(buf));
87}
88
89/* XCreateWindow intercept hack */
90Window
91XCreateWindow(
92 Display *display,
93 Window parent,
94 int x, int y,
95 unsigned int width, unsigned int height,
96 unsigned int border_width,
97 int depth,
98 unsigned int class,
99 Visual *visual,
100 unsigned long valuemask,
101 XSetWindowAttributes *attributes
102 )
103{
104 static Window (*func)
105 (
106 Display *display,
107 Window parent,
108 int x, int y,
109 unsigned int width, unsigned int height,
110 unsigned int border_width,
111 int depth,
112 unsigned int class,
113 Visual *visual,
114 unsigned long valuemask,
115 XSetWindowAttributes *attributes
116 ) = NULL;
117 int i;
118
119 /* find the real Xlib and the real X function */
120 if (!lib_xlib) lib_xlib = dlopen("libX11.so", RTLD_GLOBAL | RTLD_LAZY);
121 if (!func) func = dlsym (lib_xlib, "XCreateWindow");
122
123 /* multihead screen handling loop */
124 for (i = 0; i < ScreenCount(display); i++)
125 {
126 /* if the window is created as a toplevel window */
127 if (parent == RootWindow(display, i))
128 {
129 Window window;
130
131 /* create it */
132 window = (*func) (display, parent, x, y, width, height,
133 border_width, depth, class, visual, valuemask,
134 attributes);
135 /* set properties */
136 __e_hack_set_properties(display, window);
137 /* return it */
138 return window;
139 }
140 }
141 /* normal child window - create as usual */
142 return (*func) (display, parent, x, y, width, height, border_width, depth,
143 class, visual, valuemask, attributes);
144}
145
146/* XCreateSimpleWindow intercept hack */
147Window
148XCreateSimpleWindow(
149 Display *display,
150 Window parent,
151 int x, int y,
152 unsigned int width, unsigned int height,
153 unsigned int border_width,
154 unsigned long border,
155 unsigned long background
156 )
157{
158 static Window (*func)
159 (
160 Display *display,
161 Window parent,
162 int x, int y,
163 unsigned int width, unsigned int height,
164 unsigned int border_width,
165 unsigned long border,
166 unsigned long background
167 ) = NULL;
168 int i;
169
170 /* find the real Xlib and the real X function */
171 if (!lib_xlib) lib_xlib = dlopen("libX11.so", RTLD_GLOBAL | RTLD_LAZY);
172 if (!func) func = dlsym (lib_xlib, "XCreateSimpleWindow");
173
174 /* multihead screen handling loop */
175 for (i = 0; i < ScreenCount(display); i++)
176 {
177 /* if the window is created as a toplevel window */
178 if (parent == RootWindow(display, i))
179 {
180 Window window;
181
182 /* create it */
183 window = (*func) (display, parent, x, y, width, height,
184 border_width, border, background);
185 /* set properties */
186 __e_hack_set_properties(display, window);
187 /* return it */
188 return window;
189 }
190 }
191 /* normal child window - create as usual */
192 return (*func) (display, parent, x, y, width, height,
193 border_width, border, background);
194}
195
196/* XReparentWindow intercept hack */
197int
198XReparentWindow(
199 Display *display,
200 Window window,
201 Window parent,
202 int x, int y
203 )
204{
205 static int (*func)
206 (
207 Display *display,
208 Window window,
209 Window parent,
210 int x, int y
211 ) = NULL;
212 int i;
213
214 /* find the real Xlib and the real X function */
215 if (!lib_xlib) lib_xlib = dlopen("libX11.so", RTLD_GLOBAL | RTLD_LAZY);
216 if (!func) func = dlsym (lib_xlib, "XReparentWindow");
217
218 /* multihead screen handling loop */
219 for (i = 0; i < ScreenCount(display); i++)
220 {
221 /* if the window is created as a toplevel window */
222 if (parent == RootWindow(display, i))
223 {
224 /* set properties */
225 __e_hack_set_properties(display, window);
226 /* reparent it */
227 return (*func) (display, window, parent, x, y);
228 }
229 }
230 /* normal child window reparenting - reparent as usual */
231 return (*func) (display, window, parent, x, y);
232}
diff --git a/src/preload/e_hack.h b/src/preload/e_hack.h
deleted file mode 100644
index a2948c95d..000000000
--- a/src/preload/e_hack.h
+++ /dev/null
@@ -1,12 +0,0 @@
1#include <stdio.h>
2#include <stdlib.h>
3#include <stdarg.h>
4#include <string.h>
5#include <dlfcn.h>
6#include <unistd.h>
7#include <sys/types.h>
8#include <sys/stat.h>
9#include <sys/utsname.h>
10#include <X11/Xlib.h>
11#include <X11/X.h>
12#include <X11/Xatom.h>
diff --git a/src/preload/e_precache.c b/src/preload/e_precache.c
deleted file mode 100644
index 272fa2ad1..000000000
--- a/src/preload/e_precache.c
+++ /dev/null
@@ -1,280 +0,0 @@
1#include "config.h"
2#include "e_precache.h"
3
4static void *lib_eina = NULL;
5static void *lib_ecore = NULL;
6static void *lib_ecore_file = NULL;
7static void *lib_ecore_x = NULL;
8static void *lib_evas = NULL;
9static void *lib_edje = NULL;
10static void *lib_eet = NULL;
11
12static int *e_precache_end = NULL;
13
14/* internal calls */
15static int log_fd = -1;
16static int do_log = 0;
17
18static void
19log_open(void)
20{
21 char buf[4096] = "DUMMY", *home;
22
23 if (log_fd != -1) return;
24 if (!e_precache_end)
25 {
26#ifdef HAVE_UNSETENV
27 unsetenv("LD_PRELOAD");
28#else
29 if (getenv("LD_PRELOAD")) putenv("LD_PRELOAD");
30#endif
31 e_precache_end = dlsym(NULL, "e_precache_end");
32 }
33 if (!e_precache_end) return;
34 if (*e_precache_end) return;
35
36 home = getenv("HOME");
37 if (home)
38 snprintf(buf, sizeof(buf), "%s/.e-precache", home);
39 else
40 snprintf(buf, sizeof(buf), "/tmp/.e-precache");
41 log_fd = open(buf, O_CREAT | O_TRUNC | O_WRONLY, S_IRUSR | S_IWUSR);
42 if (log_fd) do_log = 1;
43}
44
45static void
46log_close(void)
47{
48 if (log_fd >= 0)
49 {
50 close(log_fd);
51 log_fd = -1;
52 }
53 do_log = 0;
54}
55
56static void
57log_write(const char *type, const char *file)
58{
59 static Eina_Hash *s_hash = NULL;
60 static Eina_Hash *o_hash = NULL;
61 static Eina_Hash *d_hash = NULL;
62 char buf[2];
63
64 if ((e_precache_end) && (*e_precache_end))
65 {
66 log_close();
67 return;
68 }
69 if (type[0] == 's')
70 {
71 if (eina_hash_find(s_hash, file)) return;
72 if (!s_hash) s_hash = eina_hash_string_superfast_new(NULL);
73 eina_hash_add(s_hash, file, (void *)1);
74 }
75 else if (type[0] == 'o')
76 {
77 if (eina_hash_find(o_hash, file)) return;
78 if (!o_hash) o_hash = eina_hash_string_superfast_new(NULL);
79 eina_hash_add(o_hash, file, (void *)1);
80 }
81 else if (type[0] == 'd')
82 {
83 if (eina_hash_find(d_hash, file)) return;
84 if (!d_hash) d_hash = eina_hash_string_superfast_new(NULL);
85 eina_hash_add(d_hash, file, (void *)1);
86 }
87 buf[0] = type[0]; buf[1] = ' ';
88 write(log_fd, buf, 2);
89 write(log_fd, file, strlen(file));
90 write(log_fd, "\n", 1);
91}
92
93static void *
94lib_func(const char *lib1, const char *lib2, const char *fname, const char *libname, void **lib)
95{
96 void *func;
97
98 if (!*lib) *lib = dlopen(lib1, RTLD_GLOBAL | RTLD_LAZY);
99 if (!*lib) *lib = dlopen(lib2, RTLD_GLOBAL | RTLD_LAZY);
100 func = dlsym(*lib, fname);
101 if (!func)
102 {
103 printf("ABORT: Can't find %s() in %s or %s (%s = %p)\n",
104 fname, lib1, lib2, libname, *lib);
105 abort();
106 }
107 log_open();
108 return func;
109}
110
111/* intercepts */
112Eina_Module *
113eina_module_find(const Eina_Array *array, const char *module)
114{
115 static Eina_Module *(*func) (const Eina_Array *array, const char *module) = NULL;
116
117 if (!func)
118 func = lib_func("libeina.so", "libeina.so.1",
119 "eina_module_find", "lib_eina", &lib_eina);
120 if (do_log) log_write("o", module);
121 return (*func) (array, module);
122}
123
124void
125ecore_app_args_set(int argc, const char **argv)
126{
127 static void (*func) (int argc, const char **argv) = NULL;
128
129 if (!func)
130 func = lib_func("libecore.so", "libecore.so.1",
131 "ecore_app_args_set", "lib_ecore", &lib_ecore);
132 if (do_log) log_write("o", (const char *)argv);
133 (*func) (argc, argv);
134}
135
136long long
137ecore_file_mod_time(const char *file)
138{
139 static long long (*func) (const char *file) = NULL;
140
141 if (!func)
142 func = lib_func("libecore_file.so", "libecore_file.so.1",
143 "ecore_file_mod_time", "lib_ecore_file", &lib_ecore_file);
144 if (do_log) log_write("s", file);
145 return (*func) (file);
146}
147
148long long
149ecore_file_size(const char *file)
150{
151 static int (*func) (const char *file) = NULL;
152
153 if (!func)
154 func = lib_func("libecore_file.so", "libecore_file.so.1",
155 "ecore_file_size", "lib_ecore_file", &lib_ecore_file);
156 if (do_log) log_write("s", file);
157 return (*func) (file);
158}
159
160Eina_Bool
161ecore_file_exists(const char *file)
162{
163 static int (*func) (const char *file) = NULL;
164
165 if (!func)
166 func = lib_func("libecore_file.so", "libecore_file.so.1",
167 "ecore_file_exists", "lib_ecore_file", &lib_ecore_file);
168 if (do_log) log_write("s", file);
169 return (*func) (file);
170}
171
172Eina_Bool
173ecore_file_is_dir(const char *file)
174{
175 static int (*func) (const char *file) = NULL;
176
177 if (!func)
178 func = lib_func("libecore_file.so", "libecore_file.so.1",
179 "ecore_file_is_dir", "lib_ecore_file", &lib_ecore_file);
180 if (do_log) log_write("s", file);
181 return (*func) (file);
182}
183
184Eina_Bool
185ecore_file_can_read(const char *file)
186{
187 static int (*func) (const char *file) = NULL;
188
189 if (!func)
190 func = lib_func("libecore_file.so", "libecore_file.so.1",
191 "ecore_file_can_read", "lib_ecore_file", &lib_ecore_file);
192 if (do_log) log_write("s", file);
193 return (*func) (file);
194}
195
196Eina_Bool
197ecore_file_can_write(const char *file)
198{
199 static int (*func) (const char *file) = NULL;
200
201 if (!func)
202 func = lib_func("libecore_file.so", "libecore_file.so.1",
203 "ecore_file_can_write", "lib_ecore_file", &lib_ecore_file);
204 if (do_log) log_write("s", file);
205 return (*func) (file);
206}
207
208Eina_Bool
209ecore_file_can_exec(const char *file)
210{
211 static int (*func) (const char *file) = NULL;
212
213 if (!func)
214 func = lib_func("libecore_file.so", "libecore_file.so.1",
215 "ecore_file_can_exec", "lib_ecore_file", &lib_ecore_file);
216 if (do_log) log_write("s", file);
217 return (*func) (file);
218}
219
220Eina_List *
221ecore_file_ls(const char *file)
222{
223 static Eina_List * (*func) (const char *file) = NULL;
224
225 if (!func)
226 func = lib_func("libecore_file.so", "libecore_file.so.1",
227 "ecore_file_ls", "lib_ecore_file", &lib_ecore_file);
228 if (do_log) log_write("d", file);
229 return (*func) (file);
230}
231
232int
233ecore_x_init(const char *name)
234{
235 static int (*func) (const char *name) = NULL;
236
237 if (!func)
238 func = lib_func("libecore_x.so", "libecore_x.so.1",
239 "ecore_x_init", "lib_ecore_x", &lib_ecore_x);
240 if (do_log) log_write("o", name);
241 return (*func) (name);
242}
243
244void
245evas_object_image_file_set(Evas_Object *obj, const char *file, const char *key)
246{
247 static void (*func) (Evas_Object *obj, const char *file, const char *key) = NULL;
248
249 if (!func)
250 func = lib_func("libevas.so", "libevas.so.1",
251 "evas_object_image_file_set", "lib_evas", &lib_evas);
252 if (do_log) log_write("o", file);
253 (*func) (obj, file, key);
254}
255
256/* edje */
257Eina_Bool
258edje_object_file_set(Evas_Object *obj, const char *file, const char *group)
259{
260 static Eina_Bool (*func) (Evas_Object *obj, const char *file, const char *group) = NULL;
261
262 if (!func)
263 func = lib_func("libedje.so", "libedje.so.1",
264 "edje_object_file_set", "lib_edje", &lib_edje);
265 if (do_log) log_write("o", file);
266 return (*func) (obj, file, group);
267}
268
269Eet_File *
270eet_open(const char *file, Eet_File_Mode mode)
271{
272 static Eet_File * (*func) (const char *file, Eet_File_Mode mode) = NULL;
273
274 if (!func)
275 func = lib_func("libeet.so", "libeet.so.0",
276 "eet_open", "lib_eet", &lib_eet);
277 if (do_log) log_write("o", file);
278 return (*func) (file, mode);
279}
280
diff --git a/src/preload/e_precache.h b/src/preload/e_precache.h
deleted file mode 100644
index 0f98dbbbf..000000000
--- a/src/preload/e_precache.h
+++ /dev/null
@@ -1,18 +0,0 @@
1#include <stdio.h>
2#include <stdlib.h>
3#include <stdarg.h>
4#include <string.h>
5#include <dlfcn.h>
6#include <unistd.h>
7#include <sys/types.h>
8#include <sys/stat.h>
9#include <sys/utsname.h>
10#include <fcntl.h>
11#ifdef HAVE_ALLOCA_H
12#include <alloca.h>
13#endif
14#include <Eina.h>
15#include <Evas.h>
16#include <Ecore.h>
17#include <Ecore_File.h>
18#include <Eet.h>
diff --git a/x-ui.sh b/x-ui.sh
index 5b9d4e7ec..1266c8e28 100755
--- a/x-ui.sh
+++ b/x-ui.sh
@@ -273,7 +273,6 @@ sleep 1
273export DISPLAY=:1 273export DISPLAY=:1
274[ ! -z "$TEST_HOME" ] && export HOME="$TEST_HOME" 274[ ! -z "$TEST_HOME" ] && export HOME="$TEST_HOME"
275enlightenment_start \ 275enlightenment_start \
276 -no-precache \
277 -i-really-know-what-i-am-doing-and-accept-full-responsibility-for-it \ 276 -i-really-know-what-i-am-doing-and-accept-full-responsibility-for-it \
278 -profile $PROFILE \ 277 -profile $PROFILE \
279 $E_OPTIONS $xinerama_auto_args \ 278 $E_OPTIONS $xinerama_auto_args \