blob: 381ec404b76b9575a7e72d09e2b565fbbfe9324c (
plain) (
blame)
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
|
#include <Ecore_Config.h>
int main(int argc, char ** argv)
{
int i;
float j;
char *str;
if (ecore_config_init("foo") != ECORE_CONFIG_ERR_SUCC) {
printf("Cannot init Ecore_Config");
return 1;
}
ecore_config_int_default("/int_example", 1);
ecore_config_int_default("/int_example", 2);
ecore_config_string_default("/this/is/a/string/example", "String");
ecore_config_float_default("/float/example", 2.22);
ecore_config_load();
i = ecore_config_int_get("/int_example");
str = ecore_config_string_get("/this/is/a/string/example");
j = ecore_config_float_get("/float/example");
printf("str is (%s)\n", str);
printf("i is (%d)\n", i);
printf("j is (%f)\n", j);
free(str);
ecore_config_shutdown();
return 0;
}
|