aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/libraries/embryo/src/bin/embryo_cc_prefix.c
blob: 9b5770461791413aee31010d6f4a77a6c1d63117 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif

#include <Eina.h>

#include "embryo_cc_prefix.h"

/* local subsystem functions */

/* local subsystem globals */

static Eina_Prefix *pfx = NULL;

/* externally accessible functions */
int
e_prefix_determine(char *argv0)
{
   if (pfx) return 1;
   eina_init();
   pfx = eina_prefix_new(argv0, e_prefix_determine,
                         "EMBRYO", "embryo", "include/default.inc",
                         PACKAGE_BIN_DIR,
                         PACKAGE_LIB_DIR,
                         PACKAGE_DATA_DIR,
                         PACKAGE_DATA_DIR);
   if (!pfx) return 0;
   return 1;
}

void
e_prefix_shutdown(void)
{
   eina_prefix_free(pfx);
   pfx = NULL;
   eina_shutdown();
}

const char *
e_prefix_get(void)
{
   return eina_prefix_get(pfx);
}

const char *
e_prefix_bin_get(void)
{
   return eina_prefix_bin_get(pfx);
}

const char *
e_prefix_data_get(void)
{
   return eina_prefix_data_get(pfx);
}

const char *
e_prefix_lib_get(void)
{
   return eina_prefix_lib_get(pfx);
}