diff options
Diffstat (limited to 'libraries/embryo/src/bin/embryo_cc_prefix.c')
-rw-r--r-- | libraries/embryo/src/bin/embryo_cc_prefix.c | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/libraries/embryo/src/bin/embryo_cc_prefix.c b/libraries/embryo/src/bin/embryo_cc_prefix.c new file mode 100644 index 0000000..9b57704 --- /dev/null +++ b/libraries/embryo/src/bin/embryo_cc_prefix.c | |||
@@ -0,0 +1,61 @@ | |||
1 | #ifdef HAVE_CONFIG_H | ||
2 | # include <config.h> | ||
3 | #endif | ||
4 | |||
5 | #include <Eina.h> | ||
6 | |||
7 | #include "embryo_cc_prefix.h" | ||
8 | |||
9 | /* local subsystem functions */ | ||
10 | |||
11 | /* local subsystem globals */ | ||
12 | |||
13 | static Eina_Prefix *pfx = NULL; | ||
14 | |||
15 | /* externally accessible functions */ | ||
16 | int | ||
17 | e_prefix_determine(char *argv0) | ||
18 | { | ||
19 | if (pfx) return 1; | ||
20 | eina_init(); | ||
21 | pfx = eina_prefix_new(argv0, e_prefix_determine, | ||
22 | "EMBRYO", "embryo", "include/default.inc", | ||
23 | PACKAGE_BIN_DIR, | ||
24 | PACKAGE_LIB_DIR, | ||
25 | PACKAGE_DATA_DIR, | ||
26 | PACKAGE_DATA_DIR); | ||
27 | if (!pfx) return 0; | ||
28 | return 1; | ||
29 | } | ||
30 | |||
31 | void | ||
32 | e_prefix_shutdown(void) | ||
33 | { | ||
34 | eina_prefix_free(pfx); | ||
35 | pfx = NULL; | ||
36 | eina_shutdown(); | ||
37 | } | ||
38 | |||
39 | const char * | ||
40 | e_prefix_get(void) | ||
41 | { | ||
42 | return eina_prefix_get(pfx); | ||
43 | } | ||
44 | |||
45 | const char * | ||
46 | e_prefix_bin_get(void) | ||
47 | { | ||
48 | return eina_prefix_bin_get(pfx); | ||
49 | } | ||
50 | |||
51 | const char * | ||
52 | e_prefix_data_get(void) | ||
53 | { | ||
54 | return eina_prefix_data_get(pfx); | ||
55 | } | ||
56 | |||
57 | const char * | ||
58 | e_prefix_lib_get(void) | ||
59 | { | ||
60 | return eina_prefix_lib_get(pfx); | ||
61 | } | ||