aboutsummaryrefslogtreecommitdiff
path: root/tst/conf.c
diff options
context:
space:
mode:
authorbeber <beber>2006-01-12 02:53:35 +0000
committerbeber <beber>2006-01-12 02:53:35 +0000
commitae70eb8b8f4e47a062422144bdb1549d03d5e149 (patch)
tree99506d85ab568bb844f0d9257175bc69cdd9862a /tst/conf.c
parentcomment and unused code (diff)
downloadespik-ae70eb8b8f4e47a062422144bdb1549d03d5e149.tar.xz
Missing files for git-import
Diffstat (limited to 'tst/conf.c')
-rw-r--r--tst/conf.c35
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;
+}
+
+