diff options
author | beber <beber> | 2006-01-12 02:53:35 +0000 |
---|---|---|
committer | beber <beber> | 2006-01-12 02:53:35 +0000 |
commit | ae70eb8b8f4e47a062422144bdb1549d03d5e149 (patch) | |
tree | 99506d85ab568bb844f0d9257175bc69cdd9862a /tst/conf.c | |
parent | comment and unused code (diff) | |
download | espik-ae70eb8b8f4e47a062422144bdb1549d03d5e149.tar.xz |
Missing files for git-import
Diffstat (limited to 'tst/conf.c')
-rw-r--r-- | tst/conf.c | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/tst/conf.c b/tst/conf.c new file mode 100644 index 0000000..381ec40 --- /dev/null +++ b/tst/conf.c @@ -0,0 +1,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; +} + + |