summaryrefslogtreecommitdiff
path: root/legacy
diff options
context:
space:
mode:
authorhandyande <handyande>2005-09-18 12:48:24 +0000
committerhandyande <handyande@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>2005-09-18 12:48:24 +0000
commitddf8e48b3594ed34342ab25d87b1c3b75de1bea2 (patch)
tree1e76a50abe4e6b367ed9f393703b9dccde8fdb8c /legacy
parent0e90a7998e144cd69d98f003f85d691b3b1e79b9 (diff)
update ecore_config app to match
SVN revision: 16754
Diffstat (limited to 'legacy')
-rw-r--r--legacy/ecore/src/bin/ecore_config.c56
1 files changed, 28 insertions, 28 deletions
diff --git a/legacy/ecore/src/bin/ecore_config.c b/legacy/ecore/src/bin/ecore_config.c
index 8474d4098e..3765e481f1 100644
--- a/legacy/ecore/src/bin/ecore_config.c
+++ b/legacy/ecore/src/bin/ecore_config.c
@@ -15,19 +15,19 @@ set(const char *key, int ec_type, const char *value)
15 float f; 15 float f;
16 16
17 switch (ec_type) { 17 switch (ec_type) {
18 case PT_INT: 18 case ECORE_CONFIG_INT:
19 case PT_BLN: 19 case ECORE_CONFIG_BLN:
20 i = atoi(value); 20 i = atoi(value);
21 if (ecore_config_typed_set(key, &i, ec_type) != ECORE_CONFIG_ERR_SUCC) return -1; 21 if (ecore_config_typed_set(key, &i, ec_type) != ECORE_CONFIG_ERR_SUCC) return -1;
22 break; 22 break;
23 case PT_FLT: 23 case ECORE_CONFIG_FLT:
24 f = atof(value); 24 f = atof(value);
25 if (ecore_config_typed_set(key, &f, ec_type) != ECORE_CONFIG_ERR_SUCC) return -1; 25 if (ecore_config_typed_set(key, &f, ec_type) != ECORE_CONFIG_ERR_SUCC) return -1;
26 break; 26 break;
27 case PT_STR: 27 case ECORE_CONFIG_STR:
28 case PT_RGB: 28 case ECORE_CONFIG_RGB:
29 case PT_THM: 29 case ECORE_CONFIG_THM:
30 case PT_NIL: 30 case ECORE_CONFIG_NIL:
31 if (ecore_config_typed_set(key, value, ec_type) != ECORE_CONFIG_ERR_SUCC) return -1; 31 if (ecore_config_typed_set(key, value, ec_type) != ECORE_CONFIG_ERR_SUCC) return -1;
32 break; 32 break;
33 } 33 }
@@ -45,25 +45,25 @@ get(const char *key)
45 } 45 }
46 46
47 switch (e->type) { 47 switch (e->type) {
48 case PT_NIL: 48 case ECORE_CONFIG_NIL:
49 printf("\n"); 49 printf("\n");
50 break; 50 break;
51 case PT_INT: 51 case ECORE_CONFIG_INT:
52 printf("%ld\n", ecore_config_int_get(key)); 52 printf("%ld\n", ecore_config_int_get(key));
53 break; 53 break;
54 case PT_BLN: 54 case ECORE_CONFIG_BLN:
55 printf("%d\n", ecore_config_boolean_get(key)); 55 printf("%d\n", ecore_config_boolean_get(key));
56 break; 56 break;
57 case PT_FLT: 57 case ECORE_CONFIG_FLT:
58 printf("%lf\n", ecore_config_float_get(key)); 58 printf("%lf\n", ecore_config_float_get(key));
59 break; 59 break;
60 case PT_STR: 60 case ECORE_CONFIG_STR:
61 printf("%s\n", ecore_config_string_get(key)); 61 printf("%s\n", ecore_config_string_get(key));
62 break; 62 break;
63 case PT_RGB: 63 case ECORE_CONFIG_RGB:
64 printf("%s\n", ecore_config_argbstr_get(key)); 64 printf("%s\n", ecore_config_argbstr_get(key));
65 break; 65 break;
66 case PT_THM: 66 case ECORE_CONFIG_THM:
67 printf("%s\n", ecore_config_theme_get(key)); 67 printf("%s\n", ecore_config_theme_get(key));
68 break; 68 break;
69 default: 69 default:
@@ -90,25 +90,25 @@ get_type(const char *key)
90 } 90 }
91 91
92 switch (e->type) { 92 switch (e->type) {
93 case PT_NIL: 93 case ECORE_CONFIG_NIL:
94 printf("nil\n"); 94 printf("nil\n");
95 break; 95 break;
96 case PT_INT: 96 case ECORE_CONFIG_INT:
97 printf("int\n"); 97 printf("int\n");
98 break; 98 break;
99 case PT_BLN: 99 case ECORE_CONFIG_BLN:
100 printf("bool\n"); 100 printf("bool\n");
101 break; 101 break;
102 case PT_FLT: 102 case ECORE_CONFIG_FLT:
103 printf("float\n"); 103 printf("float\n");
104 break; 104 break;
105 case PT_STR: 105 case ECORE_CONFIG_STR:
106 printf("string\n"); 106 printf("string\n");
107 break; 107 break;
108 case PT_RGB: 108 case ECORE_CONFIG_RGB:
109 printf("rgb\n"); 109 printf("rgb\n");
110 break; 110 break;
111 case PT_THM: 111 case ECORE_CONFIG_THM:
112 printf("theme\n"); 112 printf("theme\n");
113 break; 113 break;
114 default: 114 default:
@@ -122,19 +122,19 @@ int
122parse_type(const char *type) 122parse_type(const char *type)
123{ 123{
124 if (!strcmp("nil", type)) { 124 if (!strcmp("nil", type)) {
125 return PT_NIL; 125 return ECORE_CONFIG_NIL;
126 } else if (!strcmp("int", type)) { 126 } else if (!strcmp("int", type)) {
127 return PT_INT; 127 return ECORE_CONFIG_INT;
128 } else if (!strcmp("float", type)) { 128 } else if (!strcmp("float", type)) {
129 return PT_FLT; 129 return ECORE_CONFIG_FLT;
130 } else if (!strcmp("bool", type)) { 130 } else if (!strcmp("bool", type)) {
131 return PT_BLN; 131 return ECORE_CONFIG_BLN;
132 } else if (!strcmp("str", type)) { 132 } else if (!strcmp("str", type)) {
133 return PT_STR; 133 return ECORE_CONFIG_STR;
134 } else if (!strcmp("rgb", type)) { 134 } else if (!strcmp("rgb", type)) {
135 return PT_RGB; 135 return ECORE_CONFIG_RGB;
136 } else if (!strcmp("theme", type)) { 136 } else if (!strcmp("theme", type)) {
137 return PT_THM; 137 return ECORE_CONFIG_THM;
138 } 138 }
139 return -1; 139 return -1;
140} 140}